|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.AbstractAttributeIO
org.geotools.data.shapefile.ShapefileAttributeReader
public class ShapefileAttributeReader
An AttributeReader implementation for Shapefile. Pretty straightforward.
The default geometry is at position 0, and all dbf columns follow.
The dbf file may not be necessary, if not, just pass null as the
DbaseFileReader
Field Summary | |
---|---|
protected DbaseFileReader |
dbf
|
protected int[] |
dbfindexes
|
protected java.lang.Object |
geometry
|
protected ShapefileReader.Record |
record
|
protected DbaseFileReader.Row |
row
|
protected ShapefileReader |
shp
|
protected com.vividsolutions.jts.geom.Envelope |
targetBBox
|
Fields inherited from class org.geotools.data.AbstractAttributeIO |
---|
metaData |
Constructor Summary | |
---|---|
ShapefileAttributeReader(org.opengis.feature.type.AttributeDescriptor[] atts,
ShapefileReader shp,
DbaseFileReader dbf)
Create the shapefile reader |
|
ShapefileAttributeReader(java.util.List<org.opengis.feature.type.AttributeDescriptor> atts,
ShapefileReader shp,
DbaseFileReader dbf)
|
Method Summary | |
---|---|
void |
close()
Release any resources associated with this reader |
boolean |
hasNext()
Does another set of attributes exist in this reader? |
void |
next()
Advance the reader to the next set of attributes. |
java.lang.Object |
read(int param)
Read the attribute at the given index. |
void |
setSimplificationDistance(double distance)
|
void |
setTargetBBox(com.vividsolutions.jts.geom.Envelope envelope)
Sets a search area. |
Methods inherited from class org.geotools.data.AbstractAttributeIO |
---|
copy, getAttributeCount, getAttributeType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.data.AttributeReader |
---|
getAttributeCount, getAttributeType |
Field Detail |
---|
protected ShapefileReader shp
protected DbaseFileReader dbf
protected DbaseFileReader.Row row
protected ShapefileReader.Record record
protected int[] dbfindexes
protected com.vividsolutions.jts.geom.Envelope targetBBox
protected java.lang.Object geometry
Constructor Detail |
---|
public ShapefileAttributeReader(java.util.List<org.opengis.feature.type.AttributeDescriptor> atts, ShapefileReader shp, DbaseFileReader dbf)
public ShapefileAttributeReader(org.opengis.feature.type.AttributeDescriptor[] atts, ShapefileReader shp, DbaseFileReader dbf)
atts
- -
the attributes that we are going to read.shp
- -
the shapefile reader, requireddbf
- -
the dbf file reader. May be null, in this case no
attributes will be read from the dbf fileMethod Detail |
---|
public void setTargetBBox(com.vividsolutions.jts.geom.Envelope envelope)
envelope
- public void setSimplificationDistance(double distance)
public void close() throws java.io.IOException
AttributeReader
close
in interface AttributeReader
java.io.IOException
public boolean hasNext() throws java.io.IOException
AttributeReader
hasNext
in interface AttributeReader
true
if additional content exists for
AttributeReader
java.io.IOException
public void next() throws java.io.IOException
AttributeReader
next
in interface AttributeReader
java.io.IOException
public java.lang.Object read(int param) throws java.io.IOException, java.lang.ArrayIndexOutOfBoundsException
AttributeReader
read
in interface AttributeReader
java.io.IOException
java.lang.ArrayIndexOutOfBoundsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |