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.EsriPolygon
Represents a Polygon in an ESRI shapefile as a List of
GisParts.
|
class |
EsriShapefile.EsriPolyline
Represents a Polyline in an ESRI shapefile as a List of
GisParts.
|
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)
|
java.util.List |
getFeatures()
Get a List of all the GisFeatures in the shapefile.
|
java.util.List<EsriShapefile.EsriFeature> |
getFeatures(java.awt.geom.Rectangle2D bBox)
Get a List of all the features in the shapefile that intersect
the specified bounding box.
|
int |
getNumFeatures() |
int |
getVersion()
Returns shapefile format version (currently 1000)
|
static void |
main(java.lang.String[] args) |
double |
percentRead()
Return percent of file read, so far.
|
java.lang.String |
toString() |
public EsriShapefile(java.lang.String filename) throws java.io.IOException
filename
- name of ESRI shapefile (typically has ".shp"
extension)java.io.IOException
public EsriShapefile(java.net.URL url) throws java.io.IOException
url
- URL of ESRI shapefilejava.io.IOException
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
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
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
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
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
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
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 usedjava.io.IOException
public double percentRead()
public int getNumFeatures()
public int getVersion()
public java.awt.geom.Rectangle2D getBoundingBox()
public java.util.List getFeatures()
public java.util.List<EsriShapefile.EsriFeature> 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 java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException