public final class

MapGeometry

extends Object
implements Serializable
java.lang.Object
   ↳ com.esri.core.geometry.MapGeometry

Class Overview

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.

Summary

Public Constructors
MapGeometry(Geometry g, SpatialReference _sr)
Construct a MapGeometry instance using the specified geometry instance and its corresponding spatial reference.
Public Methods
Geometry getGeometry()
Gets the geometry from the MapGeometry, without the spatial reference.
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.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MapGeometry (Geometry g, SpatialReference _sr)

Construct a MapGeometry instance using the specified geometry instance and its corresponding spatial reference.

Parameters
g Geometry: The geometry to construct the new MapGeometry object.
_sr SpatialReference: The spatial reference of the geometry.

Public Methods

public Geometry getGeometry ()

Gets the geometry from the MapGeometry, without the spatial reference.

Returns
Geometry

public SpatialReference getSpatialReference ()

Gets the spatial reference for this MapGeometry.

Returns
SpatialReference

public void setGeometry (Geometry geometry)

Sets the geometry for this MapGeometry.

Parameters
geometry Geometry: The geometry.

public void setSpatialReference (SpatialReference sr)

Sets the spatial reference for this MapGeometry.

Parameters
sr SpatialReference: The spatial reference.