|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ala.layers.intersect.SimpleShapeFile
public class SimpleShapeFile
SimpleShapeFile is a representation of a Shape File for intersections with points .shp MULTIPOLYGON only .dbf can read values from String and Number columns only TODO: finish serialization
| Constructor Summary | |
|---|---|
SimpleShapeFile(java.lang.String fileprefix,
java.lang.String column)
Constructor for a SimpleShapeFile, requires .dbf and .shp files present on the fileprefix provided. |
|
| Method Summary | |
|---|---|
int |
getColumnIdx(java.lang.String column_name)
returns the position, zero indexed, of the provided column_name from within the .dbf |
java.lang.String[] |
getColumnLookup()
|
java.lang.String[] |
getColumnLookup(int column)
returns set of values found in the .dbf file at a column number, zero base. |
java.lang.String |
getHeaderString()
gets shape header as String |
java.lang.String |
getValueString(int idx)
|
int[] |
intersect(double[][] points,
java.lang.String[] lookup,
int column,
int threadcount)
use when created from a shape file identifies the index within a lookup list provided for each provided point, or -1 for not found. |
java.lang.String |
intersect(double longitude,
double latitude)
|
int |
intersectInt(double longitude,
double latitude)
|
java.lang.String[] |
listColumns()
returns a list of column names in the .dbf file |
boolean |
loadRegion(java.lang.String filename)
save partial file (enough to reload and use intersect function) |
static ComplexRegion |
loadShapeInRegion(java.lang.String filename,
int idx)
save partial file (enough to reload and use intersect function) |
static SimpleRegion |
parseWKT(java.lang.String pointsString)
defines a region by a points string, POLYGON only TODO: define better format for parsing, including BOUNDING_BOX and CIRCLE |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleShapeFile(java.lang.String fileprefix,
java.lang.String column)
fileprefix - file path for valid files after appending .shp and .dbf| Method Detail |
|---|
public boolean loadRegion(java.lang.String filename)
filename -
public static ComplexRegion loadShapeInRegion(java.lang.String filename,
int idx)
filename - public java.lang.String[] listColumns()
public java.lang.String[] getColumnLookup(int column)
column - integer representing column whose set of values
is to be returned. see listColumns() for listing
column names.
public int getColumnIdx(java.lang.String column_name)
column_name -
public int[] intersect(double[][] points,
java.lang.String[] lookup,
int column,
int threadcount)
points - double [n][2]
where
n is number of points
[][0] is longitude
[][1] is latitudelookup - String [], same as output from getColumnLookup(column)column - .dbf column value to use
public java.lang.String intersect(double longitude,
double latitude)
public int intersectInt(double longitude,
double latitude)
public java.lang.String getHeaderString()
public java.lang.String getValueString(int idx)
public java.lang.String[] getColumnLookup()
public static SimpleRegion parseWKT(java.lang.String pointsString)
pointsString - points separated by ',' with longitude and latitude separated by ':'
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||