public class USGS_Gazetteer
extends java.lang.Object
implements edu.asu.jmars.layer.util.features.FeatureProvider
When the load(java.lang.String)
method is invoked, the operator is presented with a
dialog to choose from a variety of feature types. A checkbox allows the
operator to include the features' bounding boxes in the resulting shapes;
the bounding boxes are more useful for small, regular features, such as
impact craters, and less useful for large, irregular features such as
planitia.
The functionality of the feature provider relies on the gazetteer's URL and back-end service. If these change, the provider will fail to return useful shape date. (It changed in July of 2010, requiring a non-trivial modification of the URL and field names.)
Coordinates: The gazetteer of planetary nomenclature is able to supply coordinates in a variety of systems: latitude may be planetographic or planetocentric; and longitude may be east- or west leading and may be 0 to 360 or -180 to 180. The shape layer takes planetocentric, west-leading data, but to keep parity with the JMARS coordinate display, east-leading longitude is requested (for display in the shape table) and then converted to west-leading coordinates; planetocentric latitudes are requested.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Class identification name with source code version and date.
|
static java.lang.String |
SERVICE_DESCRIPTION
The name of this feature provider.
|
Constructor and Description |
---|
USGS_Gazetteer()
Creates a new feature provider.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Gets a description of this feature provider.
|
java.io.File[] |
getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
java.lang.String baseName)
Gets the names of the files output by a save with the given base name and
feature collection.
|
java.lang.String |
getExtension()
Gets the file extension.
|
boolean |
isFileBased()
Tests whether this provider pulls data from a file.
|
boolean |
isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
Tests whether the given collection can be completely represented in the
source format of this provider.
|
edu.asu.jmars.layer.util.features.FeatureCollection |
load(java.lang.String filename)
Gets a new feature collection containing data from the USGS Gazetteer of
Planetary Nomenclature web service.
|
int |
save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection,
java.lang.String filename)
Writes the specified features to the source from which the feature provider
was constructed.
|
public static final java.lang.String ID
public static final java.lang.String SERVICE_DESCRIPTION
getDescription()
method.public USGS_Gazetteer()
public java.lang.String getDescription()
getDescription
in interface edu.asu.jmars.layer.util.features.FeatureProvider
public java.io.File[] getExistingSaveToFiles(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, java.lang.String baseName)
getExistingSaveToFiles
in interface edu.asu.jmars.layer.util.features.FeatureProvider
featureCollection
- the feature collection in question.baseName
- the base name in question.public java.lang.String getExtension()
getExtension
in interface edu.asu.jmars.layer.util.features.FeatureProvider
public boolean isFileBased()
isFileBased
in interface edu.asu.jmars.layer.util.features.FeatureProvider
public boolean isRepresentable(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection)
isRepresentable
in interface edu.asu.jmars.layer.util.features.FeatureProvider
featureCollection
- the collection to be tested.public edu.asu.jmars.layer.util.features.FeatureCollection load(java.lang.String filename)
load
in interface edu.asu.jmars.layer.util.features.FeatureProvider
filename
- unused, but required by the interface.public int save(edu.asu.jmars.layer.util.features.FeatureCollection featureCollection, java.lang.String filename)
UnsupportedOperationException
is thrown if this method is called.save
in interface edu.asu.jmars.layer.util.features.FeatureProvider
featureCollection
- the collection of features in question.filename
- a filename.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona