public class OpenStreetMapShapefileLoader extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
OpenStreetMapShapefileLoader.Label |
protected static class |
OpenStreetMapShapefileLoader.OSMShapes |
protected static class |
OpenStreetMapShapefileLoader.TextAndShapesLayer |
Constructor and Description |
---|
OpenStreetMapShapefileLoader() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isOSMPlacesSource(Object source)
Returns true if the specified Shapefile source is an OpenStreetMap Shapefile containing placemarks, and false
otherwise.
|
static Layer |
makeLayerFromOSMPlacesShapefile(gov.nasa.worldwind.formats.shapefile.Shapefile shp)
Creates a
Layer from an OpenStreetMap Shapefile of placemarks. |
static Layer |
makeLayerFromOSMPlacesSource(Object source)
Creates a
Layer from an OpenStreetMap Shapefile source of placemarks. |
public static boolean isOSMPlacesSource(Object source)
source
- the source of the Shapefile.IllegalArgumentException
- if the source is null or an empty string.public static Layer makeLayerFromOSMPlacesShapefile(gov.nasa.worldwind.formats.shapefile.Shapefile shp)
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 |
shp
- the Shapefile to create a layer for.IllegalArgumentException
- if the Shapefile is null, or if the Shapefile's primitive type is unrecognized.public static Layer makeLayerFromOSMPlacesSource(Object source)
Layer
from an OpenStreetMap Shapefile source of placemarks. The
source type may be one of the following: InputStream
URL
URI
File
String
containing a valid URL
description or a file or resource name available on the classpath.Type | Color |
---|---|
hamlet | Black |
village | Green |
town | Cyan |
city | Yellow |
source
- the source of the OpenStreetMap Shapefile.IllegalArgumentException
- if the source is null or an empty string.