Skip to main content

Geometry

Points, lines, polygons and GeoJSON. Created with kind geometry.

TypeClass
"line"LineGeometry
"point"PointGeometry
"polygon"PolygonGeometry
"geojson"hand-written factory

"line" — LineGeometry

{"type": "line", "poses":}
KeyTypeAlways requiredNotes
posesstruct std::vector<MapPos>yes
PropertyTypeAccessDescription
posesstruct std::vector<massif::MapPos>read-onlyReturns the list of of map positions defining the line.

Inherited from Geometry:

PropertyTypeAccessDescription
boundsstruct massif::MapBoundsread-onlyReturns the minimal bounds for the geometry.
centerPosstruct massif::MapPosread-only
geoJSONstringread-onlyReturns the geometry as a GeoJSON string, in its own coordinates. Here rather than only on Feature because serialising a shape otherwise means constructing a GeoJSONGeometryWriter, which no string-based binding can do.
typeenumread-only

"point" — PointGeometry

{"type": "point", "pos":}
KeyTypeAlways requiredNotes
posstruct MapPosyes
PropertyTypeAccessDescription
posstruct massif::MapPosread-onlyReturns the position of the point.

Inherited from Geometry:

PropertyTypeAccessDescription
boundsstruct massif::MapBoundsread-onlyReturns the minimal bounds for the geometry.
centerPosstruct massif::MapPosread-only
geoJSONstringread-onlyReturns the geometry as a GeoJSON string, in its own coordinates. Here rather than only on Feature because serialising a shape otherwise means constructing a GeoJSONGeometryWriter, which no string-based binding can do.
typeenumread-only

"polygon" — PolygonGeometry

{"type": "polygon", "poses":, "holes":}
{"type": "polygon", "poses":}
{"type": "polygon", "rings":}
KeyTypeAlways requiredNotes
posesstruct std::vector<MapPos>no
holesstruct std::vector<std::vector<MapPos> >no
ringsstruct std::vector<std::vector<MapPos> >no
PropertyTypeAccessDescription
holesstruct std::vector<std::vector<massif::MapPos> >read-onlyReturns the list of map position lists defining the inner rings of the polygon (holes).
posesstruct std::vector<massif::MapPos>read-onlyReturns the list of map positions defining the outer ring of the polygon.
ringsstruct std::vector<std::vector<massif::MapPos> >read-onlyReturns the list of map position lists defining the rings of the polygon.

Inherited from Geometry:

PropertyTypeAccessDescription
boundsstruct massif::MapBoundsread-onlyReturns the minimal bounds for the geometry.
centerPosstruct massif::MapPosread-only
geoJSONstringread-onlyReturns the geometry as a GeoJSON string, in its own coordinates. Here rather than only on Feature because serialising a shape otherwise means constructing a GeoJSONGeometryWriter, which no string-based binding can do.
typeenumread-only

"geojson"

A GeoJSON reader, not a constructor.

KeyTypeNotes
geojsonstring or objectthe document, inline or as a string
projectionstringtarget projection, by name — optional

Base classes

Not constructed directly. Their properties are reachable on every object above that derives from them.

Geometry

PropertyTypeAccessDescription
boundsstruct massif::MapBoundsread-onlyReturns the minimal bounds for the geometry.
centerPosstruct massif::MapPosread-only
geoJSONstringread-onlyReturns the geometry as a GeoJSON string, in its own coordinates. Here rather than only on Feature because serialising a shape otherwise means constructing a GeoJSONGeometryWriter, which no string-based binding can do.
typeenumread-only