public class OpenStreetMapShapefileLoader
extends java.lang.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(java.lang.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(java.lang.Object source)
Creates a
Layer from an OpenStreetMap Shapefile source of placemarks. |
public static boolean isOSMPlacesSource(java.lang.Object source)
source
- the source of the Shapefile.java.lang.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.java.lang.IllegalArgumentException
- if the Shapefile is null, or if the Shapefile's primitive type is unrecognized.public static Layer makeLayerFromOSMPlacesSource(java.lang.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.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 |
source
- the source of the OpenStreetMap Shapefile.java.lang.IllegalArgumentException
- if the source is null or an empty string.