public class ShapefileAdapter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_POINTS
map xml attribute
|
protected visad.UnionSet |
mapLines
resulting maplines
|
protected EsriShapefile |
shapefile
shapefile
|
static java.lang.String |
TAG_POLYGON
map xml tag
|
Constructor and Description |
---|
ShapefileAdapter(EsriShapefile shapefile)
From an ESRI shapefile extract all features into an in-memory
structure.
|
ShapefileAdapter(java.io.InputStream iStream)
Read an ESRI shapefile and extract all features into an in-memory
structure.
|
ShapefileAdapter(java.io.InputStream iStream,
java.awt.geom.Rectangle2D bBox)
Read an ESRI shapefile and extract all features into an in-memory
structure.
|
ShapefileAdapter(java.io.InputStream iStream,
java.awt.geom.Rectangle2D bBox,
double coarseness)
Read an ESRI shapefile and extract all features into an in-memory
structure.
|
ShapefileAdapter(java.io.InputStream iStream,
java.lang.String filename)
constructor
|
ShapefileAdapter(java.io.InputStream iStream,
java.lang.String filename,
java.awt.geom.Rectangle2D dBox,
double coarseness)
_more_
|
ShapefileAdapter(java.lang.String filename)
Read an ESRI shapefile and extract all features into an in-memory
structure.
|
ShapefileAdapter(java.lang.String filename,
double coarseness)
Read an ESRI shapefile and extract all features into an in-memory
structure.
|
ShapefileAdapter(java.lang.String filename,
java.awt.geom.Rectangle2D bBox)
Read an ESRI shapefile and extract all features into an in-memory
structure.
|
ShapefileAdapter(java.lang.String filename,
java.awt.geom.Rectangle2D bBox,
double coarseness)
Read an ESRI shapefile and extract all features into an in-memory
structure.
|
ShapefileAdapter(java.net.URL url)
Read an ESRI shapefile from a URL and extract all features into
an in-memory structure.
|
ShapefileAdapter(java.net.URL url,
double coarseness)
Read an ESRI shapefile from a URL and extract all features into
an in-memory structure.
|
ShapefileAdapter(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
|
ShapefileAdapter(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 |
---|---|
visad.UnionSet |
getData()
getData creates a VisAD UnionSet type with the MathType
specified thru one of the other methods.
|
DbaseFile |
getDbFile()
Get the db file.
|
int |
getFeatureType()
What is the feature type
|
static void |
main(java.lang.String[] args)
Test this out
|
static visad.UnionSet |
makeSet(java.util.List sets)
Utility to make a set
|
public static final java.lang.String TAG_POLYGON
public static final java.lang.String ATTR_POINTS
protected EsriShapefile shapefile
protected visad.UnionSet mapLines
public ShapefileAdapter(java.lang.String filename) throws java.io.IOException, visad.VisADException
filename
- name of ESRI shapefile (typically has ".shp"
extension)java.io.IOException
visad.VisADException
public ShapefileAdapter(java.net.URL url) throws java.io.IOException, visad.VisADException
url
- URL of ESRI shapefilejava.io.IOException
visad.VisADException
public ShapefileAdapter(java.net.URL url, java.awt.geom.Rectangle2D bBox) throws java.io.IOException, visad.VisADException
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
visad.VisADException
public ShapefileAdapter(java.lang.String filename, java.awt.geom.Rectangle2D bBox) throws java.io.IOException, visad.VisADException
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
visad.VisADException
public ShapefileAdapter(java.lang.String filename, double coarseness) throws java.io.IOException, visad.VisADException
filename
- name of ESRI shapefile (typically has ".shp"
extension)coarseness
- resolution vs. speed parameter. 0.0 for best
resolution, 0.1 for good resolution with 10:1 zooms, etc.java.io.IOException
visad.VisADException
public ShapefileAdapter(java.net.URL url, double coarseness) throws java.io.IOException, visad.VisADException
url
- URL of ESRI shapefilecoarseness
- resolution vs. speed parameter. 0.0 for best
resolution, 0.1 for good resolution with 10:1 zooms, etc.java.io.IOException
visad.VisADException
public ShapefileAdapter(java.net.URL url, java.awt.geom.Rectangle2D bBox, double coarseness) throws java.io.IOException, visad.VisADException
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
- resolution vs. speed parameter. 0.0 for best
resolution, 0.1 for good resolution with 10:1 zooms, etc.java.io.IOException
visad.VisADException
public ShapefileAdapter(java.lang.String filename, java.awt.geom.Rectangle2D bBox, double coarseness) throws java.io.IOException, visad.VisADException
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
- resolution vs. speed parameter. 0.0 for best
resolution, 0.1 for good resolution with 10:1 zooms, etc.java.io.IOException
visad.VisADException
public ShapefileAdapter(java.io.InputStream iStream) throws java.io.IOException, visad.VisADException
iStream
- input from which to readjava.io.IOException
visad.VisADException
public ShapefileAdapter(java.io.InputStream iStream, java.awt.geom.Rectangle2D bBox) throws java.io.IOException, visad.VisADException
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
visad.VisADException
public ShapefileAdapter(java.io.InputStream iStream, java.lang.String filename) throws java.io.IOException, visad.VisADException
iStream
- Inputstreamfilename
- Filename where we got the input streamjava.io.IOException
- On badnessvisad.VisADException
- On badnesspublic ShapefileAdapter(java.io.InputStream iStream, java.lang.String filename, java.awt.geom.Rectangle2D dBox, double coarseness) throws java.io.IOException, visad.VisADException
iStream
- _more_filename
- _more_dBox
- _more_coarseness
- _more_java.io.IOException
- _more_visad.VisADException
- _more_public ShapefileAdapter(java.io.InputStream iStream, java.awt.geom.Rectangle2D bBox, double coarseness) throws java.io.IOException, visad.VisADException
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
- of plotting, 0.0 for best resolution, 0.1 for
good resoution at 10:1 zoom, etc. Higher values make things
display a bit faster.java.io.IOException
visad.VisADException
public ShapefileAdapter(EsriShapefile shapefile) throws visad.VisADException
shapefile
- input from which to extract featuresvisad.VisADException
public static visad.UnionSet makeSet(java.util.List sets) throws visad.VisADException
sets
- List of setsvisad.VisADException
- On badnesspublic int getFeatureType()
public DbaseFile getDbFile()
public visad.UnionSet getData()
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- filenamejava.lang.Exception
- problem