|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.eq.cat.filters.PolygonFilter
public class PolygonFilter
This class filters catalogs down to those events that fall within a polygon of lat/lon points. TODO: Algorithm results as yet are unspecified for polygons that traverse the International Date Line or encircle polar regions. TODO clean up error checking etc
| Field Summary |
|---|
| Fields inherited from interface org.opensha.commons.eq.cat.filters.CatalogFilter |
|---|
FILTER_ERROR, FILTER_ERROR_NO_RESULT, FILTER_STATUS_IDLE, FILTER_STATUS_WORKING |
| Constructor Summary | |
|---|---|
PolygonFilter()
Constructs a new empty polygon filter that will pruduce no results. |
|
PolygonFilter(double[] lats,
double[] lons)
Constructs a new polygon filter with the specified vertices. |
|
| Method Summary | |
|---|---|
int[] |
process(MutableCatalog catalog)
Processes a given MutableCatalog against a filter. |
void |
setPolygon(double[] lats,
double[] lons)
Sets the vertices of the polygon filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PolygonFilter()
public PolygonFilter(double[] lats,
double[] lons)
lats - latitude vertex values of the polygonlons - longitude vertex values of the polygon| Method Detail |
|---|
public void setPolygon(double[] lats,
double[] lons)
lats - latitude vertex values of the polygonlons - longitude vertex values of the polygon arrays are different
lengthspublic int[] process(MutableCatalog catalog)
CatalogFilterMutableCatalog against a filter. Returns
an array of valid event indices. Returns null if filter produces no results.
process in interface CatalogFiltercatalog - to process
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||