|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.javel.gisbeans.io.esri.ShapeFile
public class ShapeFile
This class reads ESRI-shapefiles and returns the shape object
Field Summary | |
---|---|
static int |
MULTIPATCH
the MULTIPATCH as defined by ESRI |
static int |
MULTIPOINT
the MULTIPOINT as defined by ESRI |
static int |
MULTIPOINTM
the MULTIPOINTM as defined by ESRI |
static int |
MULTIPOINTZ
the MULTIPOINTZ as defined by ESRI |
static int |
NULLSHAPE
the NULLSHAPE as defined by ESRI |
static int |
POINT
the POINT as defined by ESRI |
static int |
POINTM
the POINM as defined by ESRI |
static int |
POINTZ
the POINTZ as defined by ESRI |
static int |
POLYGON
the POLYGON as defined by ESRI |
static int |
POLYGONM
the POLYGONM as defined by ESRI |
static int |
POLYGONZ
the POLYGONZ as defined by ESRI |
static int |
POLYLINE
the POLYLINE as defined by ESRI |
static int |
POLYLINEM
the POLYLINEM as defined by ESRI |
static int |
POLYLINEZ
the POLYLINEZ as defined by ESRI |
Constructor Summary | |
---|---|
ShapeFile(URL url)
constructs a new ESRI ShapeFile |
Method Summary | |
---|---|
String[][] |
getAttributes()
returns the attribute data |
String[] |
getColumnNames()
returns the columnNames of the attribute data |
URL |
getDataSource()
returns the URL of the datasource |
int |
getNumShapes()
returns the number of shapes of the particular datasource |
GisObject |
getShape(int index)
getter for a specific shape at a certain index point in shapefile |
List |
getShapes()
getter for all shapes in a shapefile |
List |
getShapes(Rectangle2D extent)
getter for all shapes intersecting with a certain extent |
List |
getShapes(String attribute,
String columnName)
getter for all shapes intersecting with a certain extent |
int |
getType()
getter for the type |
boolean |
isCache()
|
void |
setCache(boolean cache)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NULLSHAPE
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
Constructor Detail |
---|
public ShapeFile(URL url) throws IOException
url
- URL may or may not end with their extension.
IOException
- throws an IOException if the shxFile is not
accessableMethod Detail |
---|
public boolean isCache()
public void setCache(boolean cache)
cache
- The cache to set.public String[] getColumnNames()
DataSourceInterface
getColumnNames
in interface DataSourceInterface
DataSourceInterface.getColumnNames()
public String[][] getAttributes() throws IOException
DataSourceInterface
getAttributes
in interface DataSourceInterface
IOException
- on IOExceptionDataSourceInterface.getAttributes()
public URL getDataSource()
DataSourceInterface
getDataSource
in interface DataSourceInterface
DataSourceInterface.getDataSource()
public int getNumShapes()
DataSourceInterface
getNumShapes
in interface DataSourceInterface
DataSourceInterface.getNumShapes()
public GisObject getShape(int index) throws IOException
getShape
in interface DataSourceInterface
index
- the index of the shape
IOException
- on IOfailurepublic List getShapes() throws IOException
getShapes
in interface DataSourceInterface
IOException
- on IOfailurepublic List getShapes(Rectangle2D extent) throws IOException
getShapes
in interface DataSourceInterface
extent
- the extent to get
IOException
- on IOfailurepublic List getShapes(String attribute, String columnName) throws IOException
getShapes
in interface DataSourceInterface
attribute
- the attributecolumnName
- the name of the dbfColumn
IOException
- on IO exceptionpublic int getType()
getType
in interface DataSourceInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |