Polygon Layer

Polygon layer can display GeoJSON features. GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon.

Studio supports all the GeoJSON types above. You can pass in either a single Feature or a FeatureCollection

Polygon LayerPolygon Layer

Polygon Layer

A path GeoJSON layer can display data like trip routes or contours. Stroke color can be set with a numerical field.

Polygon Layer, filled and coloredPolygon Layer, filled and colored

Polygon Layer, filled and colored

A polygon GeoJSON layer is essentially a choropleth layer and works best for rendering geofences. Fill color or height can be set with a numerical field. For example, it can display population by census tracts.

Polygon layer showing 3D buildings.Polygon layer showing 3D buildings.

Polygon layer showing 3D buildings.

To add a polygon layer, your dataset must contain geometry data.

GeoJSON dataset as input

When upload a GeoJSON file contains FeatureCollection, a polygon layer will be auto-created.

Example GeoJSON

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [102.0, 0.5]
      },
      "properties": {
        "prop0": "value0"
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [102.0, 0.0],
          [103.0, 1.0],
          [104.0, 0.0],
          [105.0, 1.0]
        ]
      },
      "properties": {
        "prop0": "value0"
      }
    }
  ]
}

Geometries (Polygons, Points, LindStrings etc) can be embedded into CSV as a GeoJSON or WKT formatted string.

  1. GeoJSON string
id,_geojson
1,"{""type"":""Polygon"",""coordinates"":[[[-74.158491,40.835947],[-74.157914,40.83902]]]}"
  1. WKT string

Example data.csv with WKT string The Well-Known Text (WKT) representation of geometry values is designed for exchanging geometry data in ASCII form.

id,_geojson
1,"POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7, 5 5))"

Columnar dataset as input data (CSV)

Paths can be created by joining a list of points from latitude and longitude, sort by an index field (e.g. timestamp) and group by uniq ids.

Layer columns:

  • id: - required - A id column is used to group by points. Points with the same id will be joined into a single path.
  • lat: - required - The latitude of the point
  • lon: - required - The longitude of the point
  • alt: - optional - The altitude of the point
  • sort by: - optional - A sort by column is used to sort the points, if not specified, points will be sorted by row index.

Example CSV

idlatitudelongitudesort by
A40.81773-74.209860
A40.81765-74.209871
A40.81746-74.209982
B40.64375-74.332420
B40.64353-74.209871
B40.64222-74.330012

Configuration

Inside polygon layer settings stroke color, and stroke width settings are available.

Label

You can apply labels to all polygons on your map.

Select which fields you would like to display in the label, then expand the options to change the font size, text anchor, and alignment of the label.

Polygons with labels.Polygons with labels.

Polygons with labels.

Fixed Height

A fixed height toggle is provided for visualizing polygon data with actual height values (such as building footprints) instead of relative height values (e.g. population density).

Polygon layer visualizing building footprints with fixed heights.Polygon layer visualizing building footprints with fixed heights.

Polygon layer visualizing building footprints with fixed heights.

Properties

For details on how to programmatically specify layer properties, refer to the Layer Configuration specification.


Sign In