openspace.globebrowsing
Functions overview
Name |
Documentation |
---|---|
Retrieves all info files recursively in the directory passed as the first argument to this function |
|
Creates a new SceneGraphNode that can be used as focus node |
|
Retrieves all info files recursively in the directory passed as the first argument to this function |
|
Add a GeoJson layer specified by the given table to the globe specified by the ‘globeName’ argument |
|
Add a GeoJson layer from the given file name and add it to the current anchor node, if it is a globe |
|
Adds a new layer from NASA GIBS to the Earth globe |
|
Adds a layer to the specified globe |
|
Returns an array of tables that describe the available layers that are supported by the WMS server identified by the provided name |
|
Creates an XML configuration for a GIBS dataset |
|
Creates an XML configuration for a temporal GIBS dataset to be used in a TemporalTileprovider |
|
Remove the GeoJson layer specified by the given table or string identifier from the globe specified by the ‘globeName’ argument |
|
Removes a layer from the specified globe |
|
Fly the camera to geographic coordinates of a globe, using the path navigation system |
|
Get geographic coordinates of the camera position in latitude, longitude, and altitude (degrees and meters) |
|
Get geographic coordinates of the camera position in latitude, longitude, and altitude (degrees and meters) |
|
Returns the list of layers for the scene graph node specified in the first parameter |
|
Returns a position in the local Cartesian coordinate system of the globe identified by the first argument, that corresponds to the given geographic coordinates: latitude, longitude and altitude (in degrees and meters) |
|
Go to the chunk on a globe with given index x, y, level |
|
Go to geographic coordinates of a globe |
|
Returns the list of layers for the scene graph node specified in the first parameter |
|
Loads and parses the WMS capabilities xml file from a remote server |
|
Loads all WMS servers from the provided file and passes them to the ‘openspace |
|
Returns a position in the local Cartesian coordinate system of the globe identified by the first argument, that corresponds to the given geographic coordinates: latitude, longitude and altitude (in degrees and meters) |
|
Rearranges the order of a single layer on a globe |
|
Parses the passed info file and return the table with the information provided in the info file |
|
Removes the WMS server identified by the first argument from the list of available servers |
|
Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations |
|
Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations to match the camera |
Functions
addBlendingLayersFromDirectory
Retrieves all info files recursively in the directory passed as the first argument to this function. The color and height tables retrieved from these info files are then added to the RenderableGlobe identified by name passed to the second argument.Usage: openspace.globebrowsing.addBlendingLayersFromDirectory(directory, “Earth”)
directory
String
nodeName
String
Return type: void
openspace.globebrowsing.addBlendingLayersFromDirectory(directory, nodeName)
addFocusNodeFromLatLong
Creates a new SceneGraphNode that can be used as focus node. Usage: openspace.globebrowsing.addFocusNodeFromLatLong(“Olympus Mons”, “Mars”, -18.65, 226.2, optionalAltitude)
altitude
Number
globeIdentifier
String
latitude
Number
longitude
Number
name
String
Return type: void
openspace.globebrowsing.addFocusNodeFromLatLong(altitude, globeIdentifier, latitude, longitude, name)
addFocusNodesFromDirectory
Retrieves all info files recursively in the directory passed as the first argument to this function. The name and location retrieved from these info files are then used to create new SceneGraphNodes that can be used as focus nodes. Usage: openspace.globebrowsing.addFocusNodesFromDirectory(directory, “Mars”)
directory
String
nodeName
String
Return type: void
openspace.globebrowsing.addFocusNodesFromDirectory(directory, nodeName)
addGeoJson
Add a GeoJson layer specified by the given table to the globe specified by the ‘globeName’ argument
globeName
String
table
Table
Return type: void
openspace.globebrowsing.addGeoJson(globeName, table)
addGeoJsonFromFile
Add a GeoJson layer from the given file name and add it to the current anchor node, if it is a globe. Note that you might have to increase the height offset for the added feature to be visible on the globe, if using a height map
filename
String
name
String?
Return type: void
openspace.globebrowsing.addGeoJsonFromFile(filename, name)
addGibsLayer
Adds a new layer from NASA GIBS to the Earth globe. Arguments are: imagery layer name, imagery resolution, start date, end date, format. For all specifications, see https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+Available+Imagery+ProductsUsage:openspace.globebrowsing.addGibsLayer(‘AIRS_Temperature_850hPa_Night’, ‘2km’, ‘2013-07-15’, ‘Present’, ‘png’)
endDate
String
format
String
layer
String
resolution
String
startDate
String
Return type: void
openspace.globebrowsing.addGibsLayer(endDate, format, layer, resolution, startDate)
addLayer
Adds a layer to the specified globe. The first argument specifies the name of the scene graph node of which to add the layer. The renderable of the specified scene graph node needs to be a renderable globe. The second argument is the layer group which can be any of the supported layer groups. The third argument is the dictionary defining the layer.
globeName
String
layerGroupName
String
layer
Table
Return type: void
openspace.globebrowsing.addLayer(globeName, layerGroupName, layer)
capabilitiesWMS
Returns an array of tables that describe the available layers that are supported by the WMS server identified by the provided name. The ‘URL’ component of the returned table can be used in the ‘FilePath’ argument for a call to the ‘addLayer’ function to add the value to a globe.
name
String
Return type: Table[]
openspace.globebrowsing.capabilitiesWMS(name)
createGibsGdalXml
Creates an XML configuration for a GIBS dataset.Arguments are: layerName, date, resolution, format.For all specifications, see https://wiki.earthdata.nasa.gov/display/GIBS/GIBS+Available+Imagery+ProductsUsage:openspace.globebrowsing.addLayer(“Earth”,”ColorLayers”,{Name = “MODIS_Terra_Chlorophyll_A”,FilePath = openspace.globebrowsing.createGibsGdalXml(“MODIS_Terra_Chlorophyll_A”,”2013-07-02”,”1km”,”png”)})
date
String
format
String
layerName
String
resolution
String
Return type: void
openspace.globebrowsing.createGibsGdalXml(date, format, layerName, resolution)
createTemporalGibsGdalXml
Creates an XML configuration for a temporal GIBS dataset to be used in a TemporalTileprovider
format
String
layerName
String
resolution
String
Return type: void
openspace.globebrowsing.createTemporalGibsGdalXml(format, layerName, resolution)
deleteGeoJson
Remove the GeoJson layer specified by the given table or string identifier from the globe specified by the ‘globeName’ argument
globeName
String
tableOrIdentifier
String | Table
Return type: void
openspace.globebrowsing.deleteGeoJson(globeName, tableOrIdentifier)
deleteLayer
Removes a layer from the specified globe. The first argument specifies the name of the scene graph node of which to remove the layer. The renderable of the specified scene graph node needs to be a renderable globe. The second argument is the layer group which can be any of the supported layer groups. The third argument is either the identifier for the layer or a dictionary with the ‘Identifier’ key that is used instead.
globeName
String
layerGroupName
String
layerOrName
String | Table
Return type: void
openspace.globebrowsing.deleteLayer(globeName, layerGroupName, layerOrName)
flyToGeo
Fly the camera to geographic coordinates of a globe, using the path navigation system. The first (optional) argument is the identifier of a scene graph node with a RenderableGlobe. If the globe name is empty, the current anchor will be used. The second and third argument is latitude and longitude (degrees). The fourth argument is the altitude, in meters. The last two optional arguments are: a bool specifying whether the up vector at the target position should be set to the globe’s North vector, and a duration for the motion, in seconds. Either of the two can be left out.
globe
String
latitude
Number
longitude
Number
altitude
Number
duration
Number?
shouldUseUpVector
Boolean?
Return type: void
openspace.globebrowsing.flyToGeo(globe, latitude, longitude, altitude, duration, shouldUseUpVector)
geoPositionForCamera
Get geographic coordinates of the camera position in latitude, longitude, and altitude (degrees and meters). If the optional bool paramater is specified, the camera eye postion will be used instead
useEyePosition
Boolean?
- Default value:false
Return type: (Number, Number, Number)
openspace.globebrowsing.geoPositionForCamera(useEyePosition)
getGeoPositionForCamera
Get geographic coordinates of the camera position in latitude, longitude, and altitude (degrees and meters). If the optional bool paramater is specified, the camera eye postion will be used instead. Deprecated in favor of ‘geoPositionForCamera’.
useEyePosition
Boolean?
- Default value:false
Return type: (Number, Number, Number)
openspace.globebrowsing.getGeoPositionForCamera(useEyePosition)
getLayers
Returns the list of layers for the scene graph node specified in the first parameter. The second parameter specifies which layer type should be queried. Deprecated in favor of ‘layers’.
globeIdentifier
String
layer
String
Return type: String[]
openspace.globebrowsing.getLayers(globeIdentifier, layer)
getLocalPositionFromGeo
Returns a position in the local Cartesian coordinate system of the globe identified by the first argument, that corresponds to the given geographic coordinates: latitude, longitude and altitude (in degrees and meters). In the local coordinate system, the position (0,0,0) corresponds to the globe’s center. Deprecated in favor of ‘localPositionFromGeo’.
globeIdentifier
String
latitude
Number
longitude
Number
altitude
Number
Return type: (Number, Number, Number)
openspace.globebrowsing.getLocalPositionFromGeo(globeIdentifier, latitude, longitude, altitude)
goToChunk
Go to the chunk on a globe with given index x, y, level.
identifier
String
x
Integer
y
Integer
level
Integer
Return type: void
openspace.globebrowsing.goToChunk(identifier, x, y, level)
goToGeo
Go to geographic coordinates of a globe. The first (optional) argument is the identifier of a scene graph node that has a RenderableGlobe attached. If the name of the globe is empty, the current anchor will be used. The second argument is latitude and the third is longitude (degrees). North and East are expressed as positive angles, while South and West are negative. The optional fourth argument is the altitude in meters. If no altitude is provided, the altitude will be kept as the current distance to the surface of the specified globe.
globe
String
latitude
Number
longitude
Number
altitude
Number?
Return type: void
openspace.globebrowsing.goToGeo(globe, latitude, longitude, altitude)
layers
Returns the list of layers for the scene graph node specified in the first parameter. The second parameter specifies which layer type should be queried.
globeIdentifier
String
layer
String
Return type: String[]
openspace.globebrowsing.layers(globeIdentifier, layer)
loadWMSCapabilities
Loads and parses the WMS capabilities xml file from a remote server. The first argument is the name of the capabilities that can be used to later refer to the set of capabilities. The second argument is the globe for which this server is applicable. The third argument is the URL at which the capabilities file can be found.
name
String
globe
String
url
String
Return type: void
openspace.globebrowsing.loadWMSCapabilities(name, globe, url)
loadWMSServersFromFile
Loads all WMS servers from the provided file and passes them to the ‘openspace.globebrowsing.loadWMSCapabilities’ file.
filePath
String
Return type: void
openspace.globebrowsing.loadWMSServersFromFile(filePath)
localPositionFromGeo
Returns a position in the local Cartesian coordinate system of the globe identified by the first argument, that corresponds to the given geographic coordinates: latitude, longitude and altitude (in degrees and meters). In the local coordinate system, the position (0,0,0) corresponds to the globe’s center.
globeIdentifier
String
latitude
Number
longitude
Number
altitude
Number
Return type: (Number, Number, Number)
openspace.globebrowsing.localPositionFromGeo(globeIdentifier, latitude, longitude, altitude)
moveLayer
Rearranges the order of a single layer on a globe. The first parameter is the identifier of the globe, the second parameter specifies the name of the layer group, the third parameter is the original position of the layer that should be moved and the last parameter is the new position in the list. The third and fourth parameters can also acccept names, in which case these refer to identifiers of the layer to be moved. If the last parameter is a name, the source layer is moved below that destination layer. The first position in the list has index 0, and the last position is given by the number of layers minus one.
globeIdentifier
String
layerGroup
String
source
Integer | String
destination
Integer | String
Return type: void
openspace.globebrowsing.moveLayer(globeIdentifier, layerGroup, source, destination)
parseInfoFile
Parses the passed info file and return the table with the information provided in the info file. The return table contains the optional keys: ‘Color’, ‘Height’, ‘Node’, ‘Location’, ‘Identifier’.Usage: local t = openspace.globebrowsing.parseInfoFile(file)openspace.globebrowsing.addLayer(“Earth”, “ColorLayers”, t.color)openspace.globebrowsing.addLayer(“Earth”, “HeightLayers”, t.height)
file
String
Return type: void
openspace.globebrowsing.parseInfoFile(file)
removeWMSServer
Removes the WMS server identified by the first argument from the list of available servers. The parameter corrsponds to the first argument in the loadWMSCapabilities call that was used to load the WMS server.
name
String
Return type: void
openspace.globebrowsing.removeWMSServer(name)
setNodePosition
Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations. Usage: openspace.globebrowsing.setNodePosition(“Scale_StatueOfLiberty”, “Earth”, 40.000, -117.5, optionalAltitude)
altitude
Number
globeIdentifier
String
latitude
Number
longitude
Number
nodeIdentifer
String
Return type: void
openspace.globebrowsing.setNodePosition(altitude, globeIdentifier, latitude, longitude, nodeIdentifer)
setNodePositionFromCamera
Sets the position of a SceneGraphNode that has GlobeTranslation/GlobeRotations to match the camera. Only uses camera position not rotation. If useAltitude is true, then the position will also be updated to the camera’s altitude.Usage: openspace.globebrowsing.setNodePositionFromCamera(“Scale_StatueOfLiberty”, optionalUseAltitude)
nodeIdentifer
String
useAltitude
Boolean
Return type: void
openspace.globebrowsing.setNodePositionFromCamera(nodeIdentifer, useAltitude)