|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractAttributeIO
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
modules/plugin/shapefile (gt-shapefile.jar)
Field Summary | |
---|---|
protected DbaseFileReader |
dbf
|
protected int[] |
dbfindexes
|
protected Object |
geometry
|
protected ShapefileReader.Record |
record
|
protected DbaseFileReader.Row |
row
|
protected ShapefileReader |
shp
|
protected Envelope |
targetBBox
|
Fields inherited from class AbstractAttributeIO |
---|
metaData |
Constructor Summary | |
---|---|
ShapefileAttributeReader(AttributeDescriptor[] atts,
ShapefileReader shp,
DbaseFileReader dbf)
Create the shapefile reader |
|
ShapefileAttributeReader(List<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. |
Object |
read(int param)
Read the attribute at the given index. |
void |
setSimplificationDistance(double distance)
|
void |
setTargetBBox(Envelope envelope)
Sets a search area. |
Methods inherited from class AbstractAttributeIO |
---|
copy, getAttributeCount, getAttributeType |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface AttributeReader |
---|
getAttributeCount, getAttributeType |
Field Detail |
---|
protected ShapefileReader shp
protected DbaseFileReader dbf
protected DbaseFileReader.Row row
protected ShapefileReader.Record record
protected int[] dbfindexes
protected Envelope targetBBox
protected Object geometry
Constructor Detail |
---|
public ShapefileAttributeReader(List<AttributeDescriptor> atts, ShapefileReader shp, DbaseFileReader dbf)
public ShapefileAttributeReader(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(Envelope envelope)
envelope
- public void setSimplificationDistance(double distance)
public void close() throws IOException
AttributeReader
close
in interface AttributeReader
IOException
public boolean hasNext() throws IOException
AttributeReader
hasNext
in interface AttributeReader
true
if additional content exists for
AttributeReader
IOException
public void next() throws IOException
AttributeReader
next
in interface AttributeReader
IOException
public Object read(int param) throws IOException, ArrayIndexOutOfBoundsException
AttributeReader
read
in interface AttributeReader
IOException
ArrayIndexOutOfBoundsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |