public class ShapefileReader
extends java.lang.Object
name.shp
containing the
geometry; name.shx
containing the file offsets for the components that make
up the geometry; and name.dbf
containing the attributes.Constructor and Description |
---|
ShapefileReader(processing.core.PApplet parent)
Creates a shapefile reader that will scale any geographic data read to be within the given bounds.
|
Modifier and Type | Method and Description |
---|---|
AttributeTable |
getAttributes()
Deprecated.
Use getAttributeTable instead that uses Processing's own Table class to store attributes.
|
processing.data.Table |
getAttributeTable()
Provides the attribute table that has been extracted from the shapefile.
|
java.util.Map<java.lang.Integer,Feature> |
getFeatures()
Provides the features that have been extracted from the shapefile.
|
float |
getMaxX()
Reports the maximum geographic value in the x-direction.
|
float |
getMaxY()
Reports the maximum geographic value in the y-direction.
|
float |
getMinX()
Reports the minimum geographic value in the x-direction.
|
float |
getMinY()
Reports the minimum geographic value in the y-direction.
|
int |
getNumLines()
Reports the number of line objects that have been read by this reader.
|
int |
getNumPoints()
Reports the number of point objects that have been read by this reader.
|
int |
getNumPolys()
Reports the number of polygon objects that have been read by this reader.
|
boolean |
read(java.io.InputStream geomInputStream,
java.io.InputStream dbInputStream)
Reads the given shapefile (requires stream representing the .shp file and the .dbf file).
|
public ShapefileReader(processing.core.PApplet parent)
parent
- Parent sketch that will draw the data to be read.public boolean read(java.io.InputStream geomInputStream, java.io.InputStream dbInputStream)
geomInputStream
- Input stream representing the geometry (.shp) file.dbInputStream
- Input stream representing the attributes (.dbf) file.public java.util.Map<java.lang.Integer,Feature> getFeatures()
@Deprecated public AttributeTable getAttributes()
public processing.data.Table getAttributeTable()
public float getMinX()
public float getMinY()
public float getMaxX()
public float getMaxY()
public int getNumPoints()
public int getNumLines()
public int getNumPolys()