mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 04:00:37 -06:00
Feature/geojson (#2595)
Add the option to add geojson components to globes, from geojson files. One geojson file creates one GeoJsonComponent, which in turn may contain multiple GlobeGeometryFeatures
Geojson is a format that supports points, lines, and polygons. In addition to the basic functionality, extra features have been added that will long-term allow rendering the geometry needed to represent KML files (another format for geospatial geometry data). Here are links to references for both formats:
Geojson: https://geojson.org/
KML: https://developers.google.com/kml/documentation/kmlreference
data/assets/examples/geojson includes some example files that I have used for testing. Any geojson file can also be added through drag-n-drop. Note however that you might need to change the AltitudeMode or HeightOffset properties for the feature to be visible.
This commit is contained in:
@@ -46,4 +46,6 @@ elseif extension == ".asset" then
|
||||
openspace.asset.add("]] .. filename .. '");' .. ReloadUIScript
|
||||
elseif extension == ".osrec" or extension == ".osrectxt" then
|
||||
return 'openspace.sessionRecording.startPlayback("' .. filename .. '")'
|
||||
elseif extension == ".geojson" then
|
||||
return 'openspace.globebrowsing.addGeoJsonFromFile("' .. filename .. '")' .. ReloadUIScript
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user