org.progeeks.geo
Class EsriShapeReader
java.lang.Object
org.progeeks.geo.EsriShapeReader
- All Implemented Interfaces:
- java.util.Iterator
public class EsriShapeReader
- extends java.lang.Object
- implements java.util.Iterator
Reads Geo shapes from an ESRI SHP file. This really belongs in
a sub-package but I'm simplifying in the interest of time.
- Version:
- $Revision: 1.2 $
- Author:
- Paul Speed
Method Summary |
static java.lang.String |
getShapeTypeString(int type)
|
boolean |
hasNext()
Returns true if there are still more shapes in the file. |
java.lang.Object |
next()
Returns the next shape in the file. |
java.lang.Object |
readGeoShape()
Reads the next shape from the file. |
protected void |
readHeader()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHAPE_NULL
public static final int SHAPE_NULL
- See Also:
- Constant Field Values
SHAPE_POINT
public static final int SHAPE_POINT
- See Also:
- Constant Field Values
SHAPE_POLYLINE
public static final int SHAPE_POLYLINE
- See Also:
- Constant Field Values
SHAPE_POLYGON
public static final int SHAPE_POLYGON
- See Also:
- Constant Field Values
SHAPE_MULTIPOINT
public static final int SHAPE_MULTIPOINT
- See Also:
- Constant Field Values
SHAPE_POINT_Z
public static final int SHAPE_POINT_Z
- See Also:
- Constant Field Values
SHAPE_POLYLINE_Z
public static final int SHAPE_POLYLINE_Z
- See Also:
- Constant Field Values
SHAPE_POLYGON_Z
public static final int SHAPE_POLYGON_Z
- See Also:
- Constant Field Values
SHAPE_MULTIPOINT_Z
public static final int SHAPE_MULTIPOINT_Z
- See Also:
- Constant Field Values
SHAPE_POINT_M
public static final int SHAPE_POINT_M
- See Also:
- Constant Field Values
SHAPE_POLYLINE_M
public static final int SHAPE_POLYLINE_M
- See Also:
- Constant Field Values
SHAPE_POLYGON_M
public static final int SHAPE_POLYGON_M
- See Also:
- Constant Field Values
SHAPE_MULTIPOINT_M
public static final int SHAPE_MULTIPOINT_M
- See Also:
- Constant Field Values
SHAPE_MULTIPATCH
public static final int SHAPE_MULTIPATCH
- See Also:
- Constant Field Values
EsriShapeReader
public EsriShapeReader(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
readHeader
protected void readHeader()
throws java.io.IOException
- Throws:
java.io.IOException
hasNext
public boolean hasNext()
- Returns true if there are still more shapes in the file.
- Specified by:
hasNext
in interface java.util.Iterator
next
public java.lang.Object next()
- Returns the next shape in the file.
- Specified by:
next
in interface java.util.Iterator
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator
readGeoShape
public java.lang.Object readGeoShape()
throws java.io.IOException
- Reads the next shape from the file.
- Throws:
java.io.IOException
getShapeTypeString
public static java.lang.String getShapeTypeString(int type)
Copyright © 2002-2003 Paul Speed. All Rights Reserved.