proprietary.datasources.arcsde
Class ArcSDEWKTFactory

java.lang.Object
  extended byproprietary.datasources.arcsde.ArcSDEWKTFactory

public class ArcSDEWKTFactory
extends java.lang.Object

Class for converting Well Known Text(WKT) representations of a shape into their Shape counterparts.

Author:
schullto

Constructor Summary
ArcSDEWKTFactory()
          Creates new WKTFactory
 
Method Summary
static void main(java.lang.String[] inArgs)
          Test the Parser
static com.esri.sde.sdk.client.SeShape parseLineString(com.esri.sde.sdk.client.SeCoordinateReference coordRef, java.lang.String inWKT)
          Convert the Well Know Text (WKT) representation of a line string into a LineString.
static com.esri.sde.sdk.client.SeShape parseMultiLineString(com.esri.sde.sdk.client.SeCoordinateReference coordRef, java.lang.String inWKT)
          Convert the Well Known Text (WKT) representaion of a multi line string into a MultiLineString.
static com.esri.sde.sdk.client.SeShape parseMultiPoint(com.esri.sde.sdk.client.SeCoordinateReference coordRef, java.lang.String inWKT)
          Convert the Well Known Text (WKT) representation of a multi point into a MultiPoint.
static com.esri.sde.sdk.client.SeShape parseMultiPolygon(com.esri.sde.sdk.client.SeCoordinateReference coordRef, java.lang.String inWKT)
          Convert the Well Known Text (WKT) representation of multi polygon into a MultiPolygon.
static com.esri.sde.sdk.client.SeShape parsePoint(com.esri.sde.sdk.client.SeCoordinateReference coordRef, java.lang.String inWKT)
          Convert the Well Know Text (WKT) representation of a point into a Point.
protected static com.esri.sde.sdk.client.SDEPoint parsePoint(java.lang.String inWKT, int inStartIndex, int inEndIndex)
          parse a point from a space separated set of numbers.
protected static com.esri.sde.sdk.client.SDEPoint[][] parsePointGroups(java.lang.String inWKT, int inStartIndex, int inEndIndex)
          Parse muliple sets of points from a space separated comma delimited, and parenthetically grouped set of numbers.
protected static com.esri.sde.sdk.client.SDEPoint[] parsePoints(java.lang.String inWKT, int inStartIndex, int inEndIndex)
          parse a set of points from a space separated coma delimited set of numbers.
static com.esri.sde.sdk.client.SeShape parsePolygon(com.esri.sde.sdk.client.SeCoordinateReference coordRef, java.lang.String inWKT)
          Convert the Well Know Text (WKT) representation of a polygon into a Polygon.
static com.esri.sde.sdk.client.SeShape parseShape(com.esri.sde.sdk.client.SeCoordinateReference coordRef, java.lang.String inWKT)
          Retrieve the shape from the text string
static void writePoints(com.esri.sde.sdk.client.SeShape shape)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcSDEWKTFactory

public ArcSDEWKTFactory()
Creates new WKTFactory

Method Detail

parseShape

public static com.esri.sde.sdk.client.SeShape parseShape(com.esri.sde.sdk.client.SeCoordinateReference coordRef,
                                                         java.lang.String inWKT)
                                                  throws java.lang.Exception
Retrieve the shape from the text string

Throws:
java.lang.Exception

parsePoint

public static com.esri.sde.sdk.client.SeShape parsePoint(com.esri.sde.sdk.client.SeCoordinateReference coordRef,
                                                         java.lang.String inWKT)
                                                  throws java.lang.Exception
Convert the Well Know Text (WKT) representation of a point into a Point.

Throws:
java.lang.Exception

parseLineString

public static com.esri.sde.sdk.client.SeShape parseLineString(com.esri.sde.sdk.client.SeCoordinateReference coordRef,
                                                              java.lang.String inWKT)
                                                       throws java.lang.Exception
Convert the Well Know Text (WKT) representation of a line string into a LineString.

Throws:
java.lang.Exception

parsePolygon

public static com.esri.sde.sdk.client.SeShape parsePolygon(com.esri.sde.sdk.client.SeCoordinateReference coordRef,
                                                           java.lang.String inWKT)
                                                    throws java.lang.Exception
Convert the Well Know Text (WKT) representation of a polygon into a Polygon.

Throws:
java.lang.Exception

parseMultiPoint

public static com.esri.sde.sdk.client.SeShape parseMultiPoint(com.esri.sde.sdk.client.SeCoordinateReference coordRef,
                                                              java.lang.String inWKT)
                                                       throws java.lang.Exception
Convert the Well Known Text (WKT) representation of a multi point into a MultiPoint.

Throws:
java.lang.Exception

parseMultiLineString

public static com.esri.sde.sdk.client.SeShape parseMultiLineString(com.esri.sde.sdk.client.SeCoordinateReference coordRef,
                                                                   java.lang.String inWKT)
                                                            throws java.lang.Exception
Convert the Well Known Text (WKT) representaion of a multi line string into a MultiLineString.

Throws:
java.lang.Exception

parseMultiPolygon

public static com.esri.sde.sdk.client.SeShape parseMultiPolygon(com.esri.sde.sdk.client.SeCoordinateReference coordRef,
                                                                java.lang.String inWKT)
                                                         throws java.lang.Exception
Convert the Well Known Text (WKT) representation of multi polygon into a MultiPolygon.

Throws:
java.lang.Exception

parsePoint

protected static com.esri.sde.sdk.client.SDEPoint parsePoint(java.lang.String inWKT,
                                                             int inStartIndex,
                                                             int inEndIndex)
                                                      throws java.lang.Exception
parse a point from a space separated set of numbers. An example of input may be "1.2 2.3 3.4".

Throws:
java.lang.Exception

parsePoints

protected static com.esri.sde.sdk.client.SDEPoint[] parsePoints(java.lang.String inWKT,
                                                                int inStartIndex,
                                                                int inEndIndex)
                                                         throws java.lang.Exception
parse a set of points from a space separated coma delimited set of numbers. An example of input may be "1.2 2.3 3.4, 100 200.2, 25 35 45".

Throws:
java.lang.Exception

parsePointGroups

protected static com.esri.sde.sdk.client.SDEPoint[][] parsePointGroups(java.lang.String inWKT,
                                                                       int inStartIndex,
                                                                       int inEndIndex)
                                                                throws java.lang.Exception
Parse muliple sets of points from a space separated comma delimited, and parenthetically grouped set of numbers. An example of the type of string that should be sent in is the following. (1.2 2.3 3.4, 1.3 3.4 4.5, 1.4 2.5 3.6),(9.8 8.7,3.4 4.3,1.2 1.3, 1.5 2.3)

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] inArgs)
Test the Parser


writePoints

public static void writePoints(com.esri.sde.sdk.client.SeShape shape)