com.esri.aims.mtier.model.map.projection
Class Project

java.lang.Object
  extended by com.esri.aims.mtier.model.map.projection.Project

public class Project
extends Object

Converts the given geometry from one coordinate system to another coordinate system based on specified from coordsys and to coordsys. This class will send ArcXML request GET_PROJECT.


Constructor Summary
Project()
           
 
Method Summary
 int getAccuracy()
          Return the accuracy value.
 boolean getCompact()
          Return the compact value.
 double getDensifyTolerance()
          Return the DensifyTolerance value.
 boolean getEnvelope()
          Returns the boolean value.
 Collection getEnvelopeCollection()
          Returns the Collection object containing instance of Envelope object.
 String getErrorString()
          Returns the error message from the ArcIMS Spatial Server.
 CoordSys getFromCoordsys()
          Returns the current coordinate system.
 Collection getMultiPointCollection()
          Returns the Collection object containing instance of Points object.
 Collection getPolygonCollection()
          Returns the Collection object containing instance of Polygon object.
 Collection getPolylineCollection()
          Returns the Collection object containing instance of Polyline object.
 Project getProjectResponse(ConnectionProxy connection)
          Return Project object which has the converted geometry.
 Separators getSeparators()
          Returns the Separators Object.
 CoordSys getToCoordsys()
          Returns the coordinate system the geometry will be projected to.
 void setAccuracy(int value)
          Sets the accuracy for the projection.
 void setCompact(boolean value)
          Compact value switches geometry to compact form in the response.
 void setDensifyTolerance(double value)
          DensifyTolerance defines the distance (tolerance) between points and is applied on the geometry before projecting takes place.
 void setEnvelope(boolean value)
          Setting to "true", geometry is returned as an ENVELOPE.
 void setEnvelopeCollection(Collection envelopes)
          Sets the Collection object containing instance of Envelope Object.
 void setFromCoordsys(CoordSys value)
          Sets the current coordinate system of the geometry.
 void setMultiPointCollection(Collection points)
          Sets the Collection object containing instance of Points Object.
 void setPolygonCollection(Collection polygons)
          Sets the Collection object containing instance of Polygon Object.
 void setPolylineCollection(Collection polylines)
          Sets the Collection object containing instance of Polyline Object.
 void setSeparators(Separators value)
          Set the Separators object when setCompact(true).
 void setToCoordsys(CoordSys value)
          Sets the coordinate system the geometry will be projected to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Project

public Project()
Method Detail

getAccuracy

public int getAccuracy()
Return the accuracy value.

Returns:
int

setAccuracy

public void setAccuracy(int value)
Sets the accuracy for the projection. Please refer to ArcXML Programmer's Reference Guide for ArcIMS 9.1 element <GET_PROJECT> attribute "accuracy" for more information.

Parameters:
value - int

getCompact

public boolean getCompact()
Return the compact value.

Returns:
boolean

setCompact

public void setCompact(boolean value)
Compact value switches geometry to compact form in the response. When "true", the response uses COORDS to return the geometry data in a compact format. Set the coordinate separators with com.esri.aims.mtier.model.map.environment.Separators. Please refer to ArcXML Programmer's Reference Guide for ArcIMS 9.1 element <GET_PROJECT> attribute "compact" for more information.

Parameters:
value - boolean

getDensifyTolerance

public double getDensifyTolerance()
Return the DensifyTolerance value.

Returns:
double

setDensifyTolerance

public void setDensifyTolerance(double value)
DensifyTolerance defines the distance (tolerance) between points and is applied on the geometry before projecting takes place. Please refer to ArcXML Programmer's Reference Guide for ArcIMS 9.1 element <GET_PROJECT> attribute "densifytolerance" for more information.

Parameters:
value - double

getEnvelope

public boolean getEnvelope()
Returns the boolean value.

Returns:
boolean

setEnvelope

public void setEnvelope(boolean value)
Setting to "true", geometry is returned as an ENVELOPE. Setting to "false", the input and output geometry are the same, but when envelope is the input, output geometry is polygon.

Parameters:
value - boolean

getFromCoordsys

public CoordSys getFromCoordsys()
Returns the current coordinate system.

Returns:
CoordSys

setFromCoordsys

public void setFromCoordsys(CoordSys value)
Sets the current coordinate system of the geometry.

Parameters:
value - CoordSys

getToCoordsys

public CoordSys getToCoordsys()
Returns the coordinate system the geometry will be projected to.

Returns:
CoordSys

setToCoordsys

public void setToCoordsys(CoordSys value)
Sets the coordinate system the geometry will be projected to.

Parameters:
value - CoordSys

getSeparators

public Separators getSeparators()
Returns the Separators Object.

Returns:
Separators

setSeparators

public void setSeparators(Separators value)
Set the Separators object when setCompact(true). By default space is a coordinate separator and ; is a tuple separators.

Parameters:
value - Separators

getErrorString

public String getErrorString()
Returns the error message from the ArcIMS Spatial Server.

Returns:
String

getEnvelopeCollection

public Collection getEnvelopeCollection()
Returns the Collection object containing instance of Envelope object.

Returns:
Collection

setEnvelopeCollection

public void setEnvelopeCollection(Collection envelopes)
Sets the Collection object containing instance of Envelope Object.

Parameters:
envelopes - Collection

getPolygonCollection

public Collection getPolygonCollection()
Returns the Collection object containing instance of Polygon object.

Returns:
Collection

setPolygonCollection

public void setPolygonCollection(Collection polygons)
Sets the Collection object containing instance of Polygon Object.
 Collection polygons = new ArrayList();
 Polygon polygon = new Polygon();
 Ring ring = new Ring();
 ring.setPoints(points);
 Hole hole = new Hole();
 hole.setPoints(points);
 ring.addHoles(hole);
 polygon.addRing(ring);
 polygons.add(polygon);
 project.setPolygonCollection(polygons);
 

Parameters:
polygons - Collection

getPolylineCollection

public Collection getPolylineCollection()
Returns the Collection object containing instance of Polyline object.
 Collection coll = returnProjection.getPolylineCollection();
 Polyline polyline = null;
  for (Iterator iter = coll.iterator();iter.hasNext();){
     Object obj = iter.next();
     if (obj instanceof Polyline) polyline = (Polyline)obj;
  }
 

Returns:
Collection

setPolylineCollection

public void setPolylineCollection(Collection polylines)
Sets the Collection object containing instance of Polyline Object.

Parameters:
polylines - Collection

getMultiPointCollection

public Collection getMultiPointCollection()
Returns the Collection object containing instance of Points object.

Returns:
Collection

setMultiPointCollection

public void setMultiPointCollection(Collection points)
Sets the Collection object containing instance of Points Object.

Parameters:
points - Collection

getProjectResponse

public Project getProjectResponse(ConnectionProxy connection)
Return Project object which has the converted geometry.

Parameters:
connection - ConnectionProxy
Returns:
Project