public class EsriShapefile
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
EsriShapefile.EsriFeature
EsriFeature.java
Created: Sat Feb 20 17:19:53 1999
|
class |
EsriShapefile.EsriMultipoint
Represents a Multipoint in an ESRI shapefile.
|
class |
EsriShapefile.EsriNull
A NULL shape in an ESRI shapefile.
|
class |
EsriShapefile.EsriPoint
Represents a single point in an ESRI shapefile.
|
class |
EsriShapefile.EsriPointZ
Class description
|
class |
EsriShapefile.EsriPolygon
Represents a Polygon in an ESRI shapefile as a List of
GisParts.
|
class |
EsriShapefile.EsriPolygonZ
Represents a PolygonZ in an ESRI shapefile as a List of
GisParts.
|
class |
EsriShapefile.EsriPolyline
Represents a Polyline in an ESRI shapefile as a List of
GisParts.
|
class |
EsriShapefile.EsriPolylineZ
Class description
|
Modifier and Type | Field and Description |
---|---|
static int |
MULTIPATCH
muti patch
|
static int |
MULTIPOINT
multipoint shape
|
static int |
MULTIPOINTM
Measured multi point
|
static int |
MULTIPOINTZ
multipoint with z
|
static int |
NULL
null shape
|
static int |
POINT
point shape
|
static int |
POINTM
Measured point
|
static int |
POINTZ
point with Z
|
static int |
POLYGON
polygon shape
|
static int |
POLYGONM
Measured polygon
|
static int |
POLYGONZ
polygon with z
|
static int |
POLYLINE
polyline shape
|
static int |
POLYLINEM
Measured polyline
|
static int |
POLYLINEZ
polyline with z
|
static int |
SHAPEFILE_CODE
shapefile magic number
|
Constructor and Description |
---|
EsriShapefile(java.io.InputStream iStream,
java.awt.geom.Rectangle2D bBox,
double coarseness)
Read an ESRI shapefile and extract the subset of features that
have bounding boxes that intersect a specified bounding box,
with control of time versus resolution.
|
EsriShapefile(java.lang.String filename)
Read an ESRI shapefile and extract all features into
an in-memory structure.
|
EsriShapefile(java.lang.String filename,
double coarseness)
Read an ESRI shapefile and extract all features into
an in-memory structure, with control of time versus resolution.
|
EsriShapefile(java.lang.String filename,
java.awt.geom.Rectangle2D bBox)
Read an ESRI shapefile and extract the subset of features that have
bounding boxes that intersect a specified bounding box.
|
EsriShapefile(java.lang.String filename,
java.awt.geom.Rectangle2D bBox,
double coarseness)
Read an ESRI shapefile and extract all features into an in-memory
structure, with control of time versus resolution.
|
EsriShapefile(java.net.URL url)
Read an ESRI shapefile from a URL and extract all features into
an in-memory structure.
|
EsriShapefile(java.net.URL url,
double coarseness)
Read an ESRI shapefile from a URL and extract all features into
an in-memory structure, with control of time versus resolution.
|
EsriShapefile(java.net.URL url,
java.awt.geom.Rectangle2D bBox)
Read an ESRI shapefile and extract the subset of features that have
bounding boxes that intersect a specified bounding box.
|
EsriShapefile(java.net.URL url,
java.awt.geom.Rectangle2D bBox,
double coarseness)
Read an ESRI shapefile and extract the subset of features that have
bounding boxes that intersect a specified bounding box.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getBoundingBox()
Get bounding box, according to file (not computed from features)
|
DbaseFile |
getDbFile()
Get the Dbase file object
|
java.util.List |
getFeatures()
Get a List of all the GisFeatures in the shapefile.
|
java.util.List |
getFeatures(java.awt.geom.Rectangle2D bBox)
Get a List of all the features in the shapefile that intersect
the specified bounding box.
|
int |
getFeatureType()
Get the feature type
|
int |
getNumFeatures() |
ProjFile |
getProjFile()
Get the projection file
|
int |
getVersion()
Returns shapefile format version (currently 1000)
|
static void |
main(java.lang.String[] args)
The main method.
|
int |
numShapes()
Deprecated.
|
double |
percentRead()
Return percent of file read, so far.
|
public static final int SHAPEFILE_CODE
public static final int NULL
public static final int POINT
public static final int POLYLINE
public static final int POLYGON
public static final int MULTIPOINT
public static final int POINTZ
public static final int POLYLINEZ
public static final int POLYGONZ
public static final int MULTIPOINTZ
public static final int POINTM
public static final int POLYLINEM
public static final int POLYGONM
public static final int MULTIPOINTM
public static final int MULTIPATCH
public EsriShapefile(java.lang.String filename) throws java.io.IOException
filename
- name of ESRI shapefile (typically has ".shp"
extension)java.io.IOException
- Signals that an I/O exception has occurred.public EsriShapefile(java.net.URL url) throws java.io.IOException
url
- URL of ESRI shapefilejava.io.IOException
- Signals that an I/O exception has occurred.public EsriShapefile(java.lang.String filename, double coarseness) throws java.io.IOException
filename
- name of ESRI shapefile (typically has ".shp"
extension)coarseness
- to tradeoff plot quality versus speed.java.io.IOException
- Signals that an I/O exception has occurred.public EsriShapefile(java.net.URL url, double coarseness) throws java.io.IOException
url
- URL of ESRI shapefilecoarseness
- to tradeoff plot quality versus speed.java.io.IOException
- Signals that an I/O exception has occurred.public EsriShapefile(java.net.URL url, java.awt.geom.Rectangle2D bBox, double coarseness) throws java.io.IOException
url
- URL of ESRI shapefilebBox
- bounding box specifying which features to select,
namely those whose bounding boxes intersect this one. If null,
bounding box of whole shapefile is usedcoarseness
- to tradeoff plot quality versus speed.java.io.IOException
- Signals that an I/O exception has occurred.public EsriShapefile(java.lang.String filename, java.awt.geom.Rectangle2D bBox, double coarseness) throws java.io.IOException
filename
- name of ESRI shapefilebBox
- bounding box specifying which features to select,
namely those whose bounding boxes intersect this one. If null,
bounding box of whole shapefile is usedcoarseness
- to tradeoff plot quality versus speed.java.io.IOException
- Signals that an I/O exception has occurred.public EsriShapefile(java.net.URL url, java.awt.geom.Rectangle2D bBox) throws java.io.IOException
url
- URL of ESRI shapefilebBox
- bounding box specifying which features to select,
namely those whose bounding boxes intersect this one. If null,
bounding box of whole shapefile is usedjava.io.IOException
- Signals that an I/O exception has occurred.public EsriShapefile(java.lang.String filename, java.awt.geom.Rectangle2D bBox) throws java.io.IOException
filename
- name of ESRI shapefilebBox
- bounding box specifying which features to select,
namely those whose bounding boxes intersect this one. If null,
bounding box of whole shapefile is usedjava.io.IOException
- Signals that an I/O exception has occurred.public EsriShapefile(java.io.InputStream iStream, java.awt.geom.Rectangle2D bBox, double coarseness) throws java.io.IOException
iStream
- input from which to readbBox
- bounding box specifying which features to select,
namely those whose bounding boxes intersect this one. If null,
bounding box of whole shapefile is usedcoarseness
- the coarsenessjava.io.IOException
- Signals that an I/O exception has occurred.public DbaseFile getDbFile()
public ProjFile getProjFile()
public double percentRead()
public int getNumFeatures()
public int numShapes()
public int getVersion()
public java.awt.geom.Rectangle2D getBoundingBox()
public java.util.List getFeatures()
public java.util.List getFeatures(java.awt.geom.Rectangle2D bBox)
bBox
- specifying the bounding box with which all
the returned features bounding boxes have a non-empty
intersection.public int getFeatureType()
public static void main(java.lang.String[] args) throws java.io.IOException
args
- the argumentsjava.io.IOException
- Signals that an I/O exception has occurred.