Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.io.sde
Class SdeReader

    java.lang.Object
      com.vividsolutions.jts.io.sde.SdeReader

public class SdeReader
extends java.lang.Object

Reads a `Geometry` from an ESRI SDE Shape.

The SDE geometry model differs from the OGC model used by JTS. In particular:

- Simple lines are read as `LineString`s
- Inverted Polygons and Exverted Holes are read as is. These create invalid JTS polygons, and must be rectified if further operations are to be performed on them.

This class allows specifying the maximum number of coordinate dimensions to read. If dimensions higher than 2 are not required, it may be more efficient to not read them.

To use this class the ESRI SDE Java libraries must be present.

Currently reading measure (M) ordinates is not supported.

Author:
  Martin Davis

Constructor Summary
`SdeReader()` Creates a reader that creates geometries using the default `GeometryFactory`.
`SdeReader(GeometryFactory geometryFactory)` Creates a reader that creates geometries using the given `GeometryFactory`.

Method Summary
`int` | `getDimension()` Gets the maximum number of coordinate dimensions which will be read.
`Geometry` | `read(com.esri.sde.sdk.client.SeShape shape)` Reads a `Geometry` from a given SDE shape.
`void` | `setDimension(int dimension)` Sets the maximum number of coordinate dimensions to read.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SdeReader

    public SdeReader()

  Creates a reader that creates geometries using the default `GeometryFactory`.

### SdeReader

    public SdeReader(GeometryFactory geometryFactory)

  Creates a reader that creates geometries using the given `GeometryFactory`.

Parameters:
  `geometryFactory` -

Method Detail

### getDimension

    public int getDimension()

  Gets the maximum number of coordinate dimensions which will be read.

  Returns:
    the dimension which will be read

### setDimension

    public void setDimension(int dimension)

  Sets the maximum number of coordinate dimensions to read. If this is larger than the number of dimensions actually present in the input geometry, the higher ordinates will not be read, and NaN will be returned as their value.

  The default is to read only the X and Y ordinates (dimension = 2).

  Parameters:
    `dimension` - the dimension to read

### read

    public Geometry read(com.esri.sde.sdk.client.SeShape shape)
                  throws com.esri.sde.sdk.client.SeException

  Reads a `Geometry` from a given SDE shape.

  Parameters:
    `shape` - the shape to read
  Returns:
    the geometry which represents the input shape
  Throws:
    `com.esri.sde.sdk.client.SeException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD