com.esri.core.geometry
Class MapGeometry

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

public final class MapGeometry
extends Object
implements Serializable

The MapGeometry class bundles the geometry with its spatial reference together. To work with a geometry object in a map it is necessary to have a spatial reference defined for this geometry.

See Also:
Serialized Form

Constructor Summary
MapGeometry(Geometry g, SpatialReference _sr)
          Construct a MapGeometry instance using the specified geometry instance and its corresponding spatial reference.
 
Method Summary
 Geometry getGeometry()
          Gets the only geometry without the spatial reference from the MapGeometry.
 SpatialReference getSpatialReference()
          Gets the spatial reference for this MapGeometry.
 void setGeometry(Geometry geometry)
          Sets the geometry for this MapGeometry.
 void setSpatialReference(SpatialReference sr)
          Sets the spatial reference for this MapGeometry.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapGeometry

public MapGeometry(Geometry g,
                   SpatialReference _sr)
Construct a MapGeometry instance using the specified geometry instance and its corresponding spatial reference.

Parameters:
g - The geometry to construct the new MapGeometry object.
_sr - The spatial reference of the geometry.
Method Detail

getGeometry

public Geometry getGeometry()
Gets the only geometry without the spatial reference from the MapGeometry.


setGeometry

public void setGeometry(Geometry geometry)
Sets the geometry for this MapGeometry.

Parameters:
geometry - The geometry.

setSpatialReference

public void setSpatialReference(SpatialReference sr)
Sets the spatial reference for this MapGeometry.

Parameters:
sr - The spatial reference.

getSpatialReference

public SpatialReference getSpatialReference()
Gets the spatial reference for this MapGeometry.



Copyright © 2012. All Rights Reserved.