|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.io.shpapi.ShapeFile
Class representing an ESRI Shape File.
This is a modification of the ShapeFile class within the shpapi package of sfcorba2java project performed by the EXSE-Working group of of the geogr. institute of the university of Bonn (http://www.giub.uni-bonn.de/exse/results/welcome.html).
------------------------------------------------------------------------
Field Summary | |
private java.util.Hashtable |
dBaseIndexes
|
private DBaseFile |
dbf
|
private boolean |
hasDBaseFile
|
private boolean |
hasRTreeIndex
|
private RTree |
rti
|
private MainFile |
shp
|
private SHP2WKS |
shpwks
|
private java.lang.String |
url
|
Constructor Summary | |
ShapeFile(java.lang.String url)
constructor: Construct a ShapeFile from a file name. |
|
ShapeFile(java.lang.String url,
java.lang.String rwflag)
constructor: Construct a ShapeFile from a file name. |
Method Summary | |
void |
close()
|
int[] |
getDataLengths()
|
java.lang.String[] |
getDataTypes()
returns the datatype of each column of the database file associated to the shape-file |
java.lang.String[] |
getDataTypes(java.lang.String[] fields)
returns the datatype of each column of the dBase associated to the shape-file specified by fields |
private GM_Object |
getFeatureAsGeometry(FeatureCollection fc,
int n)
returns the n'th feature of a featurecollection as a GM_Object |
Feature |
getFeatureByRecNo(int RecNo)
returns the RecNo'th entry of the shape file as Feature. |
FeatureProperty[] |
getFeatureProperties(FeatureCollection fc,
int n)
|
GM_Envelope |
getFileMBR()
returns the minimum bounding rectangle of all geometries within the shape-file |
private int |
getGeometryCount(FeatureCollection fc)
returns the number of geometries within a feature collection |
private int |
getGeometryType(FeatureCollection fc,
int n)
returns the type of the n'th feature in a featurecollection |
int[] |
getGeoNumbersByAttribute(java.lang.String column,
java.lang.Comparable value)
returns a int array that containts all the record numbers that matches the search operation |
int[] |
getGeoNumbersByRect(GM_Envelope r)
returns a ArrayList that contains all geomeries of the shape file which mbr's are completly or partly within the rectangle r only Points, MultiPoints, PolyLines and Polygons are handled |
GM_Object |
getGM_ObjectByRecNo(int RecNo)
returns RecNo'th Geometrie |
GM_Envelope |
getMBRByRecNo(int recNo)
returns the minimum bound rectangle of RecNo'th Geometrie |
java.lang.String[] |
getProperties()
returns the properties (column headers) of the dBase-file associated to the shape-file |
int |
getRecordNum()
returns the number of records within a shape-file |
java.lang.Object[] |
getRow(int rowNo)
returns a row of the dBase-file associated to the shape-file |
int |
getShapeTypeByRecNo(int RecNo)
returns the type of the RecNo'th Geometrie per definition a shape file contains onlay one shape type but null shapes are possible too! |
boolean |
hasDBaseFile()
returns true if a dBase-file is associated to the shape-file |
boolean |
hasDBaseIndex(java.lang.String column)
returns true if a column is indexed |
boolean |
hasRTreeIndex()
returns true if an R-tree index is associated to the shape-file |
void |
initDBaseFile(FeatureCollection fc)
|
boolean |
isUnique(java.lang.String property)
is a property unique? |
void |
writeShape(FeatureCollection fc)
writes a OGC FeatureCollection to a ESRI shape file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private DBaseFile dbf
private SHP2WKS shpwks
private java.util.Hashtable dBaseIndexes
private MainFile shp
private RTree rti
private java.lang.String url
private boolean hasDBaseFile
private boolean hasRTreeIndex
Constructor Detail |
public ShapeFile(java.lang.String url) throws java.io.IOException
public ShapeFile(java.lang.String url, java.lang.String rwflag) throws java.io.IOException
Method Detail |
public void close()
public boolean hasDBaseIndex(java.lang.String column)
public boolean hasDBaseFile()
public boolean hasRTreeIndex()
public int getRecordNum()
public GM_Envelope getFileMBR()
public GM_Envelope getMBRByRecNo(int recNo) throws java.io.IOException
java.io.IOException
public Feature getFeatureByRecNo(int RecNo) throws java.io.IOException, GM_Exception, HasNoDBaseFileException, DBaseException
java.io.IOException
GM_Exception
HasNoDBaseFileException
DBaseException
public GM_Object getGM_ObjectByRecNo(int RecNo) throws java.io.IOException, GM_Exception
java.io.IOException
GM_Exception
public int getShapeTypeByRecNo(int RecNo) throws java.io.IOException
java.io.IOException
public int[] getGeoNumbersByAttribute(java.lang.String column, java.lang.Comparable value) throws java.io.IOException, DBaseIndexException
java.io.IOException
DBaseIndexException
public int[] getGeoNumbersByRect(GM_Envelope r) throws java.io.IOException
java.io.IOException
public boolean isUnique(java.lang.String property)
public java.lang.String[] getProperties() throws HasNoDBaseFileException, DBaseException
HasNoDBaseFileException
DBaseException
public java.lang.String[] getDataTypes() throws HasNoDBaseFileException, DBaseException
HasNoDBaseFileException
DBaseException
public int[] getDataLengths() throws HasNoDBaseFileException, DBaseException
HasNoDBaseFileException
DBaseException
public java.lang.String[] getDataTypes(java.lang.String[] fields) throws HasNoDBaseFileException, DBaseException
HasNoDBaseFileException
DBaseException
public java.lang.Object[] getRow(int rowNo) throws HasNoDBaseFileException, DBaseException
HasNoDBaseFileException
DBaseException
private int getGeometryCount(FeatureCollection fc)
fc
- : featurecollection which is checked for the number geomtriesprivate int getGeometryType(FeatureCollection fc, int n)
fc
- : FeatureCollectionn
- : number of the feature which should be examined
starts with 0private GM_Object getFeatureAsGeometry(FeatureCollection fc, int n)
fc
- : FeatureCollectionn
- : number of the feature which should be returnedpublic FeatureProperty[] getFeatureProperties(FeatureCollection fc, int n)
public void initDBaseFile(FeatureCollection fc) throws DBaseException
DBaseException
public void writeShape(FeatureCollection fc) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |