Class SpatialReference
java.lang.Object
com.esri.core.geometry.SpatialReference
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SpatialReferenceImpl
A class that represents the spatial reference for the geometry.
This class provide tolerance value for the topological and relational operations.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpatialReferencecreate(int wkid) Creates an instance of the spatial reference based on the provided well known ID for the horizontal coordinate system.static SpatialReferenceCreates an instance of the spatial reference based on the provided well known text representation for the horizontal coordinate system.static SpatialReferencefromJson(JsonReader parser) static SpatialReferencefromJson(com.fasterxml.jackson.core.JsonParser parser) Returns spatial reference from the JsonParser.static SpatialReferenceabstract intgetID()Returns the well known ID for the horizontal coordinate system of the spatial reference.(package private) abstract intReturns the latest value of the well known ID for the horizontal coordinate system of the spatial reference.(package private) abstract intgetOldID()Returns the oldest value of the well known ID for the horizontal coordinate system of the spatial reference.abstract StringgetText()doubleReturns the XY tolerance of the spatial reference.(package private) abstract doublegetTolerance(int semantics) Get the XY tolerance of the spatial reference(package private) booleanisLocal()toString()Returns string representation of the class for debugging purposes.(package private) Object
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
SpatialReference
public SpatialReference()
-
-
Method Details
-
create
Creates an instance of the spatial reference based on the provided well known ID for the horizontal coordinate system.- Parameters:
wkid- The well-known ID.- Returns:
- SpatialReference The spatial reference.
- Throws:
IllegalArgumentException- if wkid is not supported or does not exist.
-
create
Creates an instance of the spatial reference based on the provided well known text representation for the horizontal coordinate system.- Parameters:
wktext- The well-known text string representation of spatial reference.- Returns:
- SpatialReference The spatial reference.
-
isLocal
boolean isLocal()- Returns:
- boolean Is spatial reference local?
-
fromJson
public static SpatialReference fromJson(com.fasterxml.jackson.core.JsonParser parser) throws Exception Returns spatial reference from the JsonParser.- Parameters:
parser- The JSON parser.- Returns:
- The spatial reference or null if there is no spatial reference information, or the parser does not point to an object start.
- Throws:
Exception- if parsing has failed
-
fromJson
- Throws:
Exception
-
fromJson
- Throws:
Exception
-
getID
public abstract int getID()Returns the well known ID for the horizontal coordinate system of the spatial reference.- Returns:
- wkid The well known ID.
-
getText
-
getOldID
abstract int getOldID()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. Not public. -
getLatestID
abstract int getLatestID()Returns the latest value of the well known ID for the horizontal coordinate system of the spatial reference. This ID is used for JSON serialization. Not public. -
getTolerance
public double getTolerance()Returns the XY tolerance of the spatial reference. The tolerance value defines the precision of topological operations, and "thickness" of boundaries of geometries for relational operations. When two points have xy coordinates closer than the tolerance value, they are considered equal. As well as when a point is within tolerance from the line, the point is assumed to be on the line. During topological operations the tolerance is increased by a factor of about 1.41 and any two points within that distance are snapped together.- Returns:
- The XY tolerance of the spatial reference.
-
getTolerance
abstract double getTolerance(int semantics) Get the XY tolerance of the spatial reference- Returns:
- The XY tolerance of the spatial reference as double.
-
writeReplace
- Throws:
ObjectStreamException
-
toString
-