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:
Emma Broman
2023-04-15 11:35:28 +02:00
committed by GitHub
parent adbe0a93f2
commit c714a7f57d
39 changed files with 4583 additions and 7 deletions

View File

@@ -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