com.esri.core.geometry
Class SpatialReference

java.lang.Object
  extended by com.esri.core.geometry.SpatialReference
All Implemented Interfaces:
Serializable

public abstract class SpatialReference
extends Object
implements Serializable

An abstract class that represent the SpatialReference for the Geometry instances. SpatialReference classes are immutable.

See Also:
Serialized Form

Nested Class Summary
static class SpatialReference.Type
           
 
Constructor Summary
protected SpatialReference()
          Creates an empty Spatial Reference
 
Method Summary
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 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 createLocal()
           
static SpatialReference createLocal(Unit unit)
          Creates a local SpatialReference.
static SpatialReference fromJson(org.codehaus.jackson.JsonParser parser)
           
abstract  Point[] fromMilitaryGrid(String[] mgrsStrings, int mode)
          Converts Military Grid strings into coordinates.
abstract  int getID()
          Returns the well known ID for the horizontal coordinate system of the SpatialReference.
abstract  String getText()
          Returns the well known text for the for the horizontal coordinate system of the SpatialReference.
abstract  SpatialReference.Type getType()
          Returns Map Projection type.
abstract  Unit getUnit()
          Returns the Unit from a spatial reference
abstract  String[] toMilitaryGrid(int numOfDigits, boolean rounding, int mode, Point[] coordinates)
          Converts a list of coordinates into military grid strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpatialReference

protected SpatialReference()
Creates an empty Spatial Reference

Method Detail

create

public static SpatialReference create(int wkid)
Creates an instance of the spatial reference based on the provided well known ID for the horizontal coordinate system.


create

public 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.


createLocal

public static SpatialReference createLocal(Unit unit)
Creates a local SpatialReference. Local SpatialReference is not associated with any Map coordinate system. (This is UnknownCoordinateSystem of ArcObjects)


createLocal

public static SpatialReference createLocal()

fromJson

public static SpatialReference fromJson(org.codehaus.jackson.JsonParser parser)
                                 throws org.codehaus.jackson.JsonParseException,
                                        IOException
Throws:
org.codehaus.jackson.JsonParseException
IOException

getType

public abstract SpatialReference.Type getType()
Returns Map Projection type.


getID

public abstract int getID()
Returns the well known ID for the horizontal coordinate system of the SpatialReference.


getText

public abstract String getText()
Returns the well known text for the for the horizontal coordinate system of the SpatialReference.


toMilitaryGrid

public abstract String[] toMilitaryGrid(int numOfDigits,
                                        boolean rounding,
                                        int mode,
                                        Point[] coordinates)
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).


fromMilitaryGrid

public abstract Point[] fromMilitaryGrid(String[] mgrsStrings,
                                         int mode)
Converts Military Grid strings into coordinates.


getUnit

public abstract Unit getUnit()
Returns the Unit from a spatial reference

Returns:
Unit spatial reference unit


Copyright © 2010. All Rights Reserved.