Skip to content

Commit

Permalink
docs update (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron authored Oct 5, 2023
1 parent a9702c8 commit 79c49bf
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 77 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# lonboard

<img src="assets/longboard-wikimedia.jpeg" height="300" />
![](docs/img/scatterplot-layer-network-speeds.jpg)

[CC-BY from Wikipedia](https://commons.wikimedia.org/wiki/File:Longboard.JPG)
## Install

> This is a new binding to the [deck.gl](https://deck.gl) geospatial data visualization library. A "deck" is the part of a skateboard you ride on. What's a fast, geospatial skateboard? A <em>lon</em>board.
```
pip install --pre lonboard
```

## Install
## Why the name?

This project requires [npm](https://www.npmjs.com/), [python](https://www.python.org/downloads/)>=3.11 and [poetry](https://python-poetry.org/).
<img src="assets/longboard-wikimedia.jpeg" height="300" />

```bash
npm install esbuild
npm run build
poetry install
```
[CC-BY from Wikipedia](https://commons.wikimedia.org/wiki/File:Longboard.JPG)

> This is a new binding to the [deck.gl](https://deck.gl) geospatial data visualization library. A "deck" is the part of a skateboard you ride on. What's a fast, geospatial skateboard? A <em>lon</em>board.
89 changes: 89 additions & 0 deletions docs/layers/path-layer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# PathLayer

The `PathLayer` renders lists of coordinate points as extruded polylines with mitering.

## Properties

<!-- Inherits from all [Base Layer](https://deck.gl/docs/api-reference/core/layer) properties. -->

### Render Options

#### `width_units`

- Type: `str`, optional
- Default: `'meters'`

The units of the line width, one of `'meters'`, `'common'`, and `'pixels'`. See [unit system](https://deck.gl/docs/developer-guide/coordinate-systems#supported-units).

#### `width_scale`

- Type: `float`, optional
- Default: `1`

The path width multiplier that multiplied to all paths.

#### `width_min_pixels`

- Type: `float`, optional
- Default: `0`

The minimum path width in pixels. This prop can be used to prevent the path from getting too thin when zoomed out.

#### `width_max_pixels`

- Type: `float`, optional
- Default: `None`

The maximum path width in pixels. This prop can be used to prevent the path from getting too thick when zoomed in.

#### `cap_rounded`

- Type: `bool`, optional
- Default: `false`

Type of caps. If `true`, draw round caps. Otherwise draw square caps.

#### `joint_rounded`

- Type: `bool`, optional
- Default: `false`

Type of joint. If `true`, draw round joints. Otherwise draw miter joints.

#### `billboard`

- Type: `bool`, optional
- Default: `false`

If `true`, extrude the path in screen space (width always faces the camera).
If `false`, the width always faces up.

#### `miter_limit`

- Type: `float`, optional
- Default: `4`

The maximum extent of a joint in ratio to the stroke width.
Only works if `jointRounded` is `false`.

### Data Accessors

#### `get_color`

- Type: Array, optional
- Default `[0, 0, 0, 255]`

The rgba color of each object, in `r, g, b, [a]`. Each component is in the 0-255 range.

- If an array is provided, it is used as the color for all objects.
- If a function is provided, it is called on each object to retrieve its color.

#### `get_width`

- Type: Number, optional
- Default: `1`

The width of each path, in units specified by `width_units` (default `'meters'`).

- If a number is provided, it is used as the width for all paths.
- If a function is provided, it is called on each path to retrieve its width.
133 changes: 66 additions & 67 deletions docs/layers/scatterplot-layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,134 +19,133 @@ layer = ScatterplotLayer.from_geopandas(

## Properties

Inherits from all [Base Layer](https://deck.gl/docs/api-reference/core/layer) properties.
<!-- Inherits from all [Base Layer](https://deck.gl/docs/api-reference/core/layer) properties. -->

### Render Options

#### `radiusUnits` (`str`, optional)
#### `radius_units`

* Default: `'meters'`
- Type: `str`, optional
- Default: `'meters'`

The units of the radius, one of `'meters'`, `'common'`, and `'pixels'`. See [unit system](https://deck.gl/docs/developer-guide/coordinate-systems#supported-units).

#### `radiusScale` (`float`, optional)
#### `radius_scale`

* Default: `1`
- Type: `float`, optional
- Default: `1`

A global radius multiplier for all points.

#### `lineWidthUnits` (`str`, optional)
#### `line_width_units`

* Default: `'meters'`
- Type: `str`, optional
- Default: `'meters'`

The units of the line width, one of `'meters'`, `'common'`, and `'pixels'`. See [unit system](https://deck.gl/docs/developer-guide/coordinate-systems#supported-units).

#### `lineWidthScale` (`float`, optional)
#### `line_width_scale`

* Default: `1`
- Type: `float`, optional
- Default: `1`

A global line width multiplier for all points.

#### `stroked` (`bool`, optional)
#### `stroked`

* Default: `false`
- Type: `bool`, optional
- Default: `False`

Draw the outline of points.

#### `filled` (`bool`, optional)
#### `filled`

* Default: `true`
- Type: `bool`, optional
- Default: `True`

Draw the filled area of points.

#### `radiusMinPixels` (`float`, optional)
#### `radius_min_pixels`

* Default: `0`
- Type: `float`, optional
- Default: `0`

The minimum radius in pixels. This prop can be used to prevent the circle from getting too small when zoomed out.
The minimum radius in pixels. This can be used to prevent the circle from getting too small when zoomed out.

#### `radiusMaxPixels` (`float`, optional)
#### `radius_max_pixels`

* Default: `Number.MAX_SAFE_INTEGER`
- Type: `float`, optional
- Default: `None`

The maximum radius in pixels. This prop can be used to prevent the circle from getting too big when zoomed in.
The maximum radius in pixels. This can be used to prevent the circle from getting too big when zoomed in.

#### `lineWidthMinPixels` (`float`, optional)
#### `line_width_min_pixels`

* Default: `0`
- Type: `float`, optional
- Default: `0`

The minimum line width in pixels. This prop can be used to prevent the stroke from getting too thin when zoomed out.
The minimum line width in pixels. This can be used to prevent the stroke from getting too thin when zoomed out.

#### `lineWidthMaxPixels` (`float`, optional)
#### `line_width_max_pixels`

* Default: `Number.MAX_SAFE_INTEGER`
- Type: `float`, optional
- Default: `None`

The maximum line width in pixels. This prop can be used to prevent the path from getting too thick when zoomed in.
The maximum line width in pixels. This can be used to prevent the stroke from getting too thick when zoomed in.

#### `billboard` (`bool`, optional)
#### `billboard`

- Default: `false`
- Type: `bool`, optional
- Default: `False`

If `true`, rendered circles always face the camera. If `false` circles face up (i.e. are parallel with the ground plane).
If `True`, rendered circles always face the camera. If `False` circles face up (i.e. are parallel with the ground plane).

#### `antialiasing` (`bool`, optional)
#### `antialiasing`

- Default: `true`
- Type: `bool`, optional
- Default: `True`

If `true`, circles are rendered with smoothed edges. If `false`, circles are rendered with rough edges. Antialiasing can cause artifacts on edges of overlapping circles. Also, antialiasing isn't supported in FirstPersonView.
If `True`, circles are rendered with smoothed edges. If `False`, circles are rendered with rough edges. Antialiasing can cause artifacts on edges of overlapping circles.

### Data Accessors

#### `getRadius` ([Function](../../developer-guide/using-layers.md#accessors)|Number, optional)
#### `get_radius`

* Default: `1`
- Type: (Number, optional)
- Default: `1`

The radius of each object, in units specified by `radiusUnits` (default meters).
The radius of each object, in units specified by `radius_units` (default `'meters'`).

* If a number is provided, it is used as the radius for all objects.
* If a function is provided, it is called on each object to retrieve its radius.
- If a number is provided, it is used as the radius for all objects.
- If a function is provided, it is called on each object to retrieve its radius.

#### `getColor` ([Function](../../developer-guide/using-layers.md#accessors)|Array, optional)
#### `get_fill_color`

* Default: `[0, 0, 0, 255]`
- Type: (Array, optional)
- Default: `[0, 0, 0, 255]`

The rgba color is in the format of `[r, g, b, [a]]`. Each channel is a number between 0-255 and `a` is 255 if not supplied.

* If an array is provided, it is used as the color for all objects.
* If a function is provided, it is called on each object to retrieve its color.
- If an array is provided, it is used as the filled color for all objects.
- If a function is provided, it is called on each object to retrieve its color.

It will be overridden by `getLineColor` and `getFillColor` if these new accessors are specified.
#### `get_line_color`

#### `getFillColor` ([Function](../../developer-guide/using-layers.md#accessors)|Array, optional)

* Default: `[0, 0, 0, 255]`

The rgba color is in the format of `[r, g, b, [a]]`. Each channel is a number between 0-255 and `a` is 255 if not supplied.

* If an array is provided, it is used as the filled color for all objects.
* If a function is provided, it is called on each object to retrieve its color.
* If not provided, it falls back to `getColor`.

#### `getLineColor` ([Function](../../developer-guide/using-layers.md#accessors)|Array, optional)

* Default: `[0, 0, 0, 255]`
- Type: (Array, optional)
- Default: `[0, 0, 0, 255]`

The rgba color is in the format of `[r, g, b, [a]]`. Each channel is a number between 0-255 and `a` is 255 if not supplied.

* If an array is provided, it is used as the outline color for all objects.
* If a function is provided, it is called on each object to retrieve its color.
* If not provided, it falls back to `getColor`.

#### `getLineWidth` ([Function](../../developer-guide/using-layers.md#accessors)|Number, optional)

* Default: `1`
- If an array is provided, it is used as the outline color for all objects.
- If a function is provided, it is called on each object to retrieve its color.

The width of the outline of each object, in units specified by `lineWidthUnits` (default meters).
#### `get_line_width`

* If a number is provided, it is used as the outline width for all objects.
* If a function is provided, it is called on each object to retrieve its outline width.
* If not provided, it falls back to `strokeWidth`.
- Type: (Number, optional)
- Default: `1`

## Source
The width of the outline of each object, in units specified by `line_width_units` (default `'meters'`).

[modules/layers/src/scatterplot-layer](https://github.com/visgl/deck.gl/tree/master/modules/layers/src/scatterplot-layer)
- If a number is provided, it is used as the outline width for all objects.
- If a function is provided, it is called on each object to retrieve its outline width.
- If not provided, it falls back to `stroke_width`.

0 comments on commit 79c49bf

Please sign in to comment.