|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ala.layers.intersect.SimpleRegion
org.ala.layers.intersect.ComplexRegion
public class ComplexRegion
ComplexRegion is a collection of SimpleRegion, expect POLYGONs for now. treat as a shape file, overlapping regions cancel out presence. TODO: clockwise/anticlockwise identification
| Field Summary |
|---|
| Fields inherited from class org.ala.layers.intersect.SimpleRegion |
|---|
BOUNDING_BOX, CIRCLE, GI_ABSENCE, GI_FULLY_PRESENT, GI_PARTIALLY_PRESENT, GI_UNDEFINED, POLYGON, UNDEFINED |
| Constructor Summary | |
|---|---|
ComplexRegion()
Constructor for empty ComplexRegion |
|
| Method Summary | |
|---|---|
void |
addPolygon(SimpleRegion sr)
adds a new polygon note: if a mask is in use must call useMask again |
int[][] |
fillAccMask_EPSG900913(int startPolygon,
int endPolygon,
double longitude1,
double latitude1,
double longitude2,
double latitude2,
int width,
int height,
byte[][] three_state_map,
boolean noCellsReturned)
|
int[][] |
fillAccMask(int startPolygon,
int endPolygon,
double longitude1,
double latitude1,
double longitude2,
double latitude2,
int width,
int height,
byte[][] three_state_map,
boolean noCellsReturned)
|
double[][] |
getBoundingBox()
gets the bounding box for shapes in this ComplexRegion |
int[][] |
getOverlapGridCells_EPSG900913(double longitude1,
double latitude1,
double longitude2,
double latitude2,
int width,
int height,
byte[][] three_state_map,
boolean noCellsReturned)
|
int[][] |
getOverlapGridCells(double longitude1,
double latitude1,
double longitude2,
double latitude2,
int width,
int height,
byte[][] three_state_map,
boolean noCellsReturned)
determines overlap with a grid for type POLYGON when three_state_map is not null populate it with one of:
GI_UNDEFINED
GI_PARTIALLY_PRESENT
GI_FULLY_PRESENT
GI_ABSENCE |
int |
getValue()
gets integer value stored |
boolean |
isWithin_EPSG900913(double longitude,
double latitude)
|
boolean |
isWithin(double longitude,
double latitude)
returns true when the point provided is within the ComplexRegion uses mask when available
note: type UNDEFINED implies no boundary, always returns true. |
static SimpleRegion |
parseComplexRegion(java.lang.String[] polygons)
|
void |
setValue(int value_)
sets integer value stored |
void |
useMask(int width,
int height,
int depthThreashold)
builds a grid (mask) to speed up isWithin. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ComplexRegion()
| Method Detail |
|---|
public static SimpleRegion parseComplexRegion(java.lang.String[] polygons)
public void setValue(int value_)
value_ - as intpublic int getValue()
public double[][] getBoundingBox()
getBoundingBox in class SimpleRegionpublic void addPolygon(SimpleRegion sr)
useMask again
points_ - points = double[n][2]
where
n is number of points
[][0] is longitude
[][1] is latitude
public boolean isWithin(double longitude,
double latitude)
mask when available
note: type UNDEFINED implies no boundary, always returns true.
isWithin in class SimpleRegionlongitude - latitude -
public void useMask(int width,
int height,
int depthThreashold)
width - height -
public int[][] getOverlapGridCells(double longitude1,
double latitude1,
double longitude2,
double latitude2,
int width,
int height,
byte[][] three_state_map,
boolean noCellsReturned)
three_state_map is not null populate it with one of:
GI_UNDEFINED
GI_PARTIALLY_PRESENT
GI_FULLY_PRESENT
GI_ABSENCE
getOverlapGridCells in class SimpleRegionlongitude1 - latitude1 - longitude2 - latitude2 - xres - number of longitude segements as intyres - number of latitude segments as int
public boolean isWithin_EPSG900913(double longitude,
double latitude)
isWithin_EPSG900913 in class SimpleRegion
public int[][] getOverlapGridCells_EPSG900913(double longitude1,
double latitude1,
double longitude2,
double latitude2,
int width,
int height,
byte[][] three_state_map,
boolean noCellsReturned)
getOverlapGridCells_EPSG900913 in class SimpleRegion
public int[][] fillAccMask(int startPolygon,
int endPolygon,
double longitude1,
double latitude1,
double longitude2,
double latitude2,
int width,
int height,
byte[][] three_state_map,
boolean noCellsReturned)
public int[][] fillAccMask_EPSG900913(int startPolygon,
int endPolygon,
double longitude1,
double latitude1,
double longitude2,
double latitude2,
int width,
int height,
byte[][] three_state_map,
boolean noCellsReturned)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||