Package com.esri.core.geometry
Class MapGeometry
- java.lang.Object
-
- com.esri.core.geometry.MapGeometry
-
- All Implemented Interfaces:
java.io.Serializable
public class MapGeometry extends java.lang.Object implements java.io.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
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Geometry
m_geometry
private static long
serialVersionUID
(package private) SpatialReference
sr
-
Constructor Summary
Constructors Constructor Description MapGeometry(Geometry g, SpatialReference _sr)
Construct a MapGeometry instance using the specified geometry instance and its corresponding spatial reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
long
estimateMemorySize()
Returns an estimate of this object size in bytes.Geometry
getGeometry()
Gets the only geometry without the spatial reference from the MapGeometry.SpatialReference
getSpatialReference()
Gets the spatial reference for this MapGeometry.int
hashCode()
void
setGeometry(Geometry geometry)
Sets the geometry for this MapGeometry.void
setSpatialReference(SpatialReference sr)
Sets the spatial reference for this MapGeometry.java.lang.String
toString()
The output of this method can be only used for debugging.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_geometry
Geometry m_geometry
-
sr
SpatialReference sr
-
-
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.
-
toString
public java.lang.String toString()
The output of this method can be only used for debugging. It is subject to change without notice.- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
estimateMemorySize
public long estimateMemorySize()
Returns an estimate of this object size in bytes.This estimate doesn't include the size of the
SpatialReference
object because instances ofSpatialReference
are expected to be shared among geometry objects.- Returns:
- Returns an estimate of this object size in bytes.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-