Import and visualize 2D or 2.5D GIS vector features using the
GeoJSON format.
Overview
GeoJSONLoader converts GeoJSON features into xeokit scene and data
models, while GeoJSONExporter serializes compatible SceneModel
geometry back to a GeoJSON FeatureCollection:
Point and MultiPoint become point primitives.
LineString and MultiLineString become line primitives.
Polygon and MultiPolygon become triangulated surface meshes.
Feature.properties become a GeoJSONProperties property set on the
matching DataObject.
Coordinates are imported in GeoJSON's native XY ground plane:
GeoJSON [x, y, elevation] becomes xeokit [x, y, elevation] after
subtracting GeoJSONLoadOptions.origin and applying
GeoJSONLoadOptions.scale. Use the target
SceneModel.coordinateSystem
when an application wants to place that XY/Z-up data into another scene
basis. When no origin is supplied, the loader uses the first coordinate in
the file to keep geospatial coordinate magnitudes small.
geojson - GeoJSON Importer / Exporter
Import and visualize 2D or 2.5D GIS vector features using the GeoJSON format.
Overview
GeoJSONLoader converts GeoJSON features into xeokit scene and data models, while GeoJSONExporter serializes compatible SceneModel geometry back to a GeoJSON
FeatureCollection:PointandMultiPointbecome point primitives.LineStringandMultiLineStringbecome line primitives.PolygonandMultiPolygonbecome triangulated surface meshes.Feature.propertiesbecome aGeoJSONPropertiesproperty set on the matching DataObject.Coordinates are imported in GeoJSON's native XY ground plane: GeoJSON
[x, y, elevation]becomes xeokit[x, y, elevation]after subtracting GeoJSONLoadOptions.origin and applying GeoJSONLoadOptions.scale. Use the target SceneModel.coordinateSystem when an application wants to place that XY/Z-up data into another scene basis. When no origin is supplied, the loader uses the first coordinate in the file to keep geospatial coordinate magnitudes small.Example
Export Example