gov.nasa.worldwind.examples.util
Class OpenStreetMapShapefileLoader
java.lang.Object
gov.nasa.worldwind.examples.util.OpenStreetMapShapefileLoader
public class OpenStreetMapShapefileLoader
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OpenStreetMapShapefileLoader
public OpenStreetMapShapefileLoader()
isOSMPlacesSource
public static boolean isOSMPlacesSource(Object source)
- Returns true if the specified Shapefile source is an OpenStreetMap Shapefile containing placemarks, and false
otherwise. The source is considered to be an OpenStreetMap source if it can be converted to an abstract path, and
the path's filename is equal to "places.shp", ignoring case.
- Parameters:
source
- the source of the Shapefile.
- Returns:
- true if the Shapefile is an OpenStreetMap Shapefile; false otherwise.
- Throws:
IllegalArgumentException
- if the source is null or an empty string.
makeLayerFromOSMPlacesShapefile
public static Layer makeLayerFromOSMPlacesShapefile(gov.nasa.worldwind.formats.shapefile.Shapefile shp)
- Creates a
Layer
from an OpenStreetMap Shapefile of placemarks.
The returned Layer renders each Shapefile record as a surface circle with an associated screen label. The label
text is taken from the Shapefile record attribute key "name". This determines each surface circle's appearance
from the Shapefile record attribute key "type" as follows: Type | Color |
hamlet | Black |
village | Green |
town | Cyan |
city | Yellow |
- Parameters:
shp
- the Shapefile to create a layer for.
- Returns:
- a Layer that renders the Shapefile's contents on the surface of the Globe.
- Throws:
IllegalArgumentException
- if the Shapefile is null, or if the Shapefile's primitive type is unrecognized.
makeLayerFromOSMPlacesSource
public static Layer makeLayerFromOSMPlacesSource(Object source)
- Creates a
Layer
from an OpenStreetMap Shapefile source of placemarks. The
source type may be one of the following:
The returned Layer renders each Shapefile record as a surface circle with an associated screen label. The label
text is taken from the Shapefile record attribute key "name". This determines each surface circle's appearance
from the Shapefile record attribute key "type" as follows: Type | Color |
hamlet | Black |
village | Green |
town | Cyan |
city | Yellow |
- Parameters:
source
- the source of the OpenStreetMap Shapefile.
- Returns:
- a Layer that renders the Shapefile's contents on the surface of the Globe.
- Throws:
IllegalArgumentException
- if the source is null or an empty string.