Reference for parse_geojson
Utility to parse GeoJSON into a series of GeoPolygons. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
parse_geojson
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Shape
Sound (future)
Style
System
Text
Transform
Purpose
Utility to parse GeoJSON into a series of GeoPolygons which currently only supports MultiPolygon and Polygon.
Snippet
Load a GeoJSON file at example.geojson and make a closed shape.
source = sketch.get_data_layer().get_json('example.geojson') geo_polygons = sketch.parse_geojson(source) geo_polygon = geo_polygons[0] shape = geo_polygon.to_shape()
Parameters
- source: The loaded GeoJSON source to parse.
Examples
Availability
Available for all platforms.