|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.web.data.geometry.WebGeometry
com.esri.adf.web.data.geometry.WebPolygon
public class WebPolygon
WebPolygon is a class used for representing polygons. A WebPolygon holds a list of
WebRings.
| Field Summary |
|---|
| Fields inherited from class com.esri.adf.web.data.geometry.WebGeometry |
|---|
spatialReference |
| Constructor Summary | |
|---|---|
WebPolygon()
Constructs an empty instance of WebPolygon |
|
WebPolygon(java.util.List<? extends WebRing> rings)
Constructs an instance of WebPolygon that contains the passed rings. |
|
WebPolygon(WebSpatialReference spatialReference)
Constructs an empty instance of WebPolyhon with the given spatial reference. |
|
| Method Summary | |
|---|---|
void |
addRing(WebRing ring)
Adds a given ring to the polygon. |
void |
addRings(java.util.List<? extends WebRing> webRings)
Adds all rings from the given list to the polygon. |
boolean |
equals(java.lang.Object obj)
|
WebPolygon |
fromMapGeometry(WebExtent extent,
int width,
int height)
Converts a geometry in map coordinates to a geometry of the same type in screen coordinates. |
WebPolygon |
fromMapGeometry(WebMap webMap)
Converts a geometry in map coordinates to a geometry of the same type in screen coordinates. |
java.lang.String |
getGeometryType()
Returns a text representing the type of the geometry. |
WebRing |
getRing(int index)
Returns a ring with the given index. |
java.util.List<WebRing> |
getRings()
Returns the list of WebRings constituting this WebPolygon. |
int |
hashCode()
|
WebPolygon |
project(WebSpatialReference toSpatialReference)
Converts the geometry in map coordinates from the spatialReference of this geometry to a geometry in
the desired spatial reference. |
WebPolygon |
toMapGeometry(WebExtent extent,
int width,
int height)
Converts a geometry in screen coordinates to a geometry of the same type in map coordinates. |
WebPolygon |
toMapGeometry(WebMap webMap)
Converts a geometry in screen coordinates to a geometry of the same type in map coordinates. |
java.lang.String |
toString()
|
| Methods inherited from class com.esri.adf.web.data.geometry.WebGeometry |
|---|
getSpatialReference, setSpatialReference |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WebPolygon(java.util.List<? extends WebRing> rings)
rings - the rings constituting the polygonpublic WebPolygon(WebSpatialReference spatialReference)
spatialReference - spatial referencepublic WebPolygon()
| Method Detail |
|---|
public java.lang.String getGeometryType()
WebGeometry
Returns a text representing the type of the geometry. WebGeometry objects of the same type must
return the same text.
getGeometryType in class WebGeometrypublic java.util.List<WebRing> getRings()
public WebRing getRing(int index)
index - index of the ring to be returned
public void addRing(WebRing ring)
ring - a ring to be added to the polygonpublic void addRings(java.util.List<? extends WebRing> webRings)
webRings - a list of rings to be added to the polygonpublic WebPolygon toMapGeometry(WebMap webMap)
WebGeometry
Converts a geometry in screen coordinates to a geometry of the same type in map coordinates. The coordinate system
of the converted geometry is the same as the coordinate system of the WebMap.
toMapGeometry in class WebGeometrywebMap - The WebMap based on which the coordinates need to be converted
WebGeometry in map coordinates
public WebPolygon toMapGeometry(WebExtent extent,
int width,
int height)
WebGeometryConverts a geometry in screen coordinates to a geometry of the same type in map coordinates. The coordinate system of the converted geometry is the same as the coordinate system of the specified extent.
toMapGeometry in class WebGeometryextent - the WebExtent of the map imagewidth - the width of the map imageheight - the height of the map image
WebGeometry in map coordinatespublic WebPolygon fromMapGeometry(WebMap webMap)
WebGeometry
Converts a geometry in map coordinates to a geometry of the same type in screen coordinates. Since the converted
geometry is a screen geometry, the coordinate system of the converted geometry will be null.
fromMapGeometry in class WebGeometrywebMap - The WebMap based on which the coordinates need to be converted
WebGeometry in screen coordinates
public WebPolygon fromMapGeometry(WebExtent extent,
int width,
int height)
WebGeometry
Converts a geometry in map coordinates to a geometry of the same type in screen coordinates. Since the converted
geometry is a screen geometry, the coordinate system of the converted geometry will be null.
fromMapGeometry in class WebGeometryextent - the WebExtent of the map imagewidth - the width of the map imageheight - the height of the map image
WebGeometry in screen coordinatespublic java.lang.String toString()
toString in class java.lang.Objectpublic WebPolygon project(WebSpatialReference toSpatialReference)
WebGeometry
Converts the geometry in map coordinates from the spatialReference of this geometry to a geometry in
the desired spatial reference. If the desired spatial reference is same as that of this geometry, this same
geometry is returned. Otherwise, a new WebGeometry object is created and populated with the converted
coordinates. The type of the projected geometry is same as this geometry.
project in class WebGeometrytoSpatialReference - the desired spatial reference of the projected geometry
WebGeometrypublic int hashCode()
hashCode in class WebGeometrypublic boolean equals(java.lang.Object obj)
equals in class WebGeometry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||