java.lang.Object | |
↳ | com.esri.core.geometry.SpatialReference |
An abstract class that represent the spatial reference for the geometry. SpatialReference classes are immutable.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | SpatialReference.Type | The spatial reference type can be local, geographic, or projected. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static int | WKID_WGS84 | The WKID for WGS 84. | |||||||||
public static int | WKID_WGS84_WEB_MERCATOR | The WKID for WGS 1984 Web Mercator (102113). | |||||||||
public static int | WKID_WGS84_WEB_MERCATOR_AUXILIARY_SPHERE | The WKID for WGS 1984 Web Mercator Auxiliary Sphere (102100). | |||||||||
public static int | WKID_WGS84_WEB_MERCATOR_AUXILIARY_SPHERE_10 | The WKID for WGS 1984 Web Mercator Auxiliary Sphere starting at ArcGIS 10.0. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SpatialReference(String wktext) |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SpatialReference()
Creates an empty Spatial Reference
| |||||||||||
SpatialReference(int wkid) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static SpatialReference |
create(String wktext)
Creates an instance of the spatial reference based on the provided well known text representation for the
horizontal coordinate system.
| ||||||||||
static SpatialReference |
create(int wkid)
Creates an instance of the spatial reference based on the provided well known ID for the horizontal coordinate
system.
| ||||||||||
static SpatialReference |
createLocal(Unit unit)
Creates a local spatial reference.
| ||||||||||
static SpatialReference |
createLocal()
Creates a local spatial reference.
| ||||||||||
static SpatialReference |
fromJson(JsonParser parser)
Returns spatial reference from JsonParser.
| ||||||||||
Point[] |
fromMilitaryGrid(String[] mgrsStrings, int mgrsConversionMode)
Converts Military Grid strings into coordinates.
| ||||||||||
SpatialReference.Type |
getCoordinateSystemType()
Returns map projection type.
| ||||||||||
SpatialReference |
getGCS()
Get the Geographic Coordinate System of the spatial reference.
| ||||||||||
int |
getID()
Returns the well known ID for the horizontal coordinate system of the spatial reference.
| ||||||||||
int |
getLatestID()
Returns the most current well known ID, the Geometry engine knows about, for the horizontal coordinate system.
| ||||||||||
int |
getOldID()
Returns the oldest value of the well known ID for the horizontal coordinate system of the spatial reference.
| ||||||||||
Envelope |
getPannableExtent()
Returns the pannable extent.
| ||||||||||
String |
getText()
Returns the well known text for the for the horizontal coordinate system of the spatial reference.
| ||||||||||
double |
getTolerance()
Get the XY tolerance of the spatial reference
| ||||||||||
Unit |
getUnit()
Returns the unit from a spatial reference
| ||||||||||
boolean |
isAnyWebMercator()
Returns true/false if the spatial reference is web mercator projection.
| ||||||||||
boolean |
isWGS84()
Returns true/false if the spatial reference is 4326.
| ||||||||||
String[] |
toMilitaryGrid(int mgrsConversionMode, int numOfDigits, boolean rounding, boolean addSpaces, Point[] coordinates)
Converts a list of coordinates into military grid strings.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The WKID for WGS 84.
The WKID for WGS 1984 Web Mercator (102113). It was added at 9.3
The WKID for WGS 1984 Web Mercator Auxiliary Sphere (102100).
The WKID for WGS 1984 Web Mercator Auxiliary Sphere starting at ArcGIS 10.0.
Creates an empty Spatial Reference
Creates an instance of the spatial reference based on the provided well known text representation for the horizontal coordinate system.
wktext | The well-known text string representation of spatial reference. |
---|
Creates an instance of the spatial reference based on the provided well known ID for the horizontal coordinate system.
wkid | The well know ID. |
---|
IllegalArgumentException | if wkid is not supported or does not exist. |
---|
Creates a local spatial reference. A local spatial reference is not associated with any map coordinate system.
unit | The unit of the local coordinate system. |
---|
Creates a local spatial reference. A local spatial reference is not associated with any map coordinate system.
Returns spatial reference from JsonParser.
parser | The JSON parser. |
---|
Exception | if parsing has failed |
---|
Converts Military Grid strings into coordinates.
mgrsStrings | Strings to convert to points. |
---|---|
mgrsConversionMode | use the MgrsConversionMode interface for conversion options. |
Returns map projection type.
Get the Geographic Coordinate System of the spatial reference.
Returns the well known ID for the horizontal coordinate system of the spatial reference.
Returns the most current well known ID, the Geometry engine knows about, for the horizontal coordinate system.
Returns the oldest value of the well known ID for the horizontal coordinate system of the spatial reference. This ID is used for JSON serialization.
Returns the well known text for the for the horizontal coordinate system of the spatial reference.
Get the XY tolerance of the spatial reference
Returns the unit from a spatial reference
Returns true/false if the spatial reference is web mercator projection.
Returns true/false if the spatial reference is 4326.
Converts a list of coordinates into military grid strings. Each string is 15 characters (2 numbers, 3 letters, 10 numbers OR 3 letters plus 10 numbers [polar region]). Default should be (5 for 2 #s, 3 letters and 10 numbers, and a total of 15).
mgrsConversionMode | use the MgrsConversionMode interface for conversion options |
---|