public class FeatureIndexer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
chunkLimit
Query single chunk limit
|
| Constructor and Description |
|---|
FeatureIndexer(Context context,
FeatureDao featureDao)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the database connection in the feature indexer
|
long |
count()
Query for all Geometry Metadata count
|
long |
count(BoundingBox boundingBox)
Query for Geometry Metadata count within the bounding box, projected
correctly
|
long |
count(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection)
Query for Geometry Metadata count within the bounding box in
the provided projection
|
long |
count(mil.nga.sf.GeometryEnvelope envelope)
Query for Geometry Metadata count within the Geometry Envelope
|
int |
countFeatures(BoundingBox boundingBox)
Count the features within the bounding box
|
int |
countFeatures(BoundingBox boundingBox,
Map<String,Object> fieldValues)
Count the features within the bounding box
|
int |
countFeatures(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection)
Count the features within the bounding box in the provided projection
|
int |
countFeatures(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection,
Map<String,Object> fieldValues)
Count the features within the bounding box in the provided projection
|
int |
countFeatures(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection,
String where)
Count the features within the bounding box in the provided projection
|
int |
countFeatures(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection,
String where,
String[] whereArgs)
Count the features within the bounding box in the provided projection
|
int |
countFeatures(BoundingBox boundingBox,
String where)
Count the features within the bounding box
|
int |
countFeatures(BoundingBox boundingBox,
String where,
String[] whereArgs)
Count the features within the bounding box
|
int |
countFeatures(mil.nga.sf.GeometryEnvelope envelope)
Count the features within the geometry envelope
|
int |
countFeatures(mil.nga.sf.GeometryEnvelope envelope,
Map<String,Object> fieldValues)
Count the features within the geometry envelope
|
int |
countFeatures(mil.nga.sf.GeometryEnvelope envelope,
String where)
Count the features within the geometry envelope
|
int |
countFeatures(mil.nga.sf.GeometryEnvelope envelope,
String where,
String[] whereArgs)
Count the features within the geometry envelope
|
int |
countFeatures(Map<String,Object> fieldValues)
Count features
|
int |
countFeatures(String where)
Count features
|
int |
countFeatures(String where,
String[] whereArgs)
Count features
|
boolean |
deleteIndex()
Delete the feature table index
|
boolean |
deleteIndex(FeatureRow row)
Delete the index for the feature row
|
boolean |
deleteIndex(long geomId)
Delete the index for the geometry id
|
BoundingBox |
getBoundingBox()
Query for the bounds of the feature table index
|
BoundingBox |
getBoundingBox(mil.nga.sf.proj.Projection projection)
Query for the feature index bounds and return in the provided projection
|
int |
getChunkLimit()
Get the SQL query chunk limit
|
FeatureRow |
getFeatureRow(Cursor cursor)
Get the feature row for the current place in the cursor
|
FeatureRow |
getFeatureRow(GeometryMetadata geometryMetadata)
Get the feature row for the Geometry Metadata
|
long |
getGeometryId(Cursor cursor)
Get the Geometry Metadata id for the current place in the cursor
|
GeometryMetadata |
getGeometryMetadata(Cursor cursor)
Get the Geometry Metadata for the current place in the cursor
|
Date |
getLastIndexed()
Get the date last indexed
|
double |
getTolerance()
Get the query range tolerance
|
int |
index()
Index the feature table if needed
|
int |
index(boolean force)
Index the feature table
|
boolean |
index(FeatureRow row)
Index the feature row.
|
boolean |
isIndexed()
Determine if the database table is indexed after database modifications
|
Cursor |
query()
Query for all Geometry Metadata
|
Cursor |
query(BoundingBox boundingBox)
Query for Geometry Metadata within the bounding box, projected
correctly
|
Cursor |
query(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection)
Query for Geometry Metadata within the bounding box in
the provided projection
|
Cursor |
query(mil.nga.sf.GeometryEnvelope envelope)
Query for Geometry Metadata within the Geometry Envelope
|
FeatureCursor |
queryFeatures()
Query for all features
|
FeatureCursor |
queryFeatures(BoundingBox boundingBox)
Query for features within the bounding box
|
FeatureCursor |
queryFeatures(BoundingBox boundingBox,
Map<String,Object> fieldValues)
Query for features within the bounding box
|
FeatureCursor |
queryFeatures(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection)
Query for features within the bounding box in the provided projection
|
FeatureCursor |
queryFeatures(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection,
Map<String,Object> fieldValues)
Query for features within the bounding box in the provided projection
|
FeatureCursor |
queryFeatures(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection,
String where)
Query for features within the bounding box in the provided projection
|
FeatureCursor |
queryFeatures(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection,
String where,
String[] whereArgs)
Query for features within the bounding box in the provided projection
|
FeatureCursor |
queryFeatures(BoundingBox boundingBox,
String where)
Query for features within the bounding box
|
FeatureCursor |
queryFeatures(BoundingBox boundingBox,
String where,
String[] whereArgs)
Query for features within the bounding box
|
FeatureCursor |
queryFeatures(mil.nga.sf.GeometryEnvelope envelope)
Query for features within the geometry envelope
|
FeatureCursor |
queryFeatures(mil.nga.sf.GeometryEnvelope envelope,
Map<String,Object> fieldValues)
Query for features within the geometry envelope
|
FeatureCursor |
queryFeatures(mil.nga.sf.GeometryEnvelope envelope,
String where)
Query for features within the geometry envelope
|
FeatureCursor |
queryFeatures(mil.nga.sf.GeometryEnvelope envelope,
String where,
String[] whereArgs)
Query for features within the geometry envelope
|
FeatureCursor |
queryFeatures(Map<String,Object> fieldValues)
Query for features
|
FeatureCursor |
queryFeatures(String where)
Query for features
|
FeatureCursor |
queryFeatures(String where,
String[] whereArgs)
Query for features
|
Cursor |
queryIds()
Query for all Geometry Metadata ids
|
Cursor |
queryIds(BoundingBox boundingBox)
Query for Geometry Metadata ids within the bounding box, projected
correctly
|
Cursor |
queryIds(BoundingBox boundingBox,
mil.nga.sf.proj.Projection projection)
Query for Geometry Metadata ids within the bounding box in
the provided projection
|
Cursor |
queryIds(mil.nga.sf.GeometryEnvelope envelope)
Query for Geometry Metadata idswithin the Geometry Envelope
|
void |
setChunkLimit(int chunkLimit)
Set the SQL query chunk limit
|
void |
setProgress(GeoPackageProgress progress)
Set the progress tracker
|
void |
setTolerance(double tolerance)
Set the query range tolerance
|
public FeatureIndexer(Context context, FeatureDao featureDao)
context - contextfeatureDao - feature daopublic void close()
public void setProgress(GeoPackageProgress progress)
progress - progress trackerpublic int getChunkLimit()
public void setChunkLimit(int chunkLimit)
chunkLimit - chunk limitpublic int index()
public int index(boolean force)
force - true to force re-indexingpublic boolean index(FeatureRow row)
row - feature rowpublic boolean deleteIndex()
public boolean deleteIndex(FeatureRow row)
row - feature rowpublic boolean deleteIndex(long geomId)
geomId - geometry idpublic boolean isIndexed()
public Date getLastIndexed()
public Cursor query()
public Cursor queryIds()
public long count()
public FeatureCursor queryFeatures()
public FeatureCursor queryFeatures(Map<String,Object> fieldValues)
fieldValues - field valuespublic int countFeatures(Map<String,Object> fieldValues)
fieldValues - field valuespublic FeatureCursor queryFeatures(String where)
where - where clausepublic int countFeatures(String where)
where - where clausepublic FeatureCursor queryFeatures(String where, String[] whereArgs)
where - where clausewhereArgs - where argumentspublic int countFeatures(String where, String[] whereArgs)
where - where clausewhereArgs - where argumentspublic BoundingBox getBoundingBox()
public BoundingBox getBoundingBox(mil.nga.sf.proj.Projection projection)
projection - desired projectionpublic Cursor query(BoundingBox boundingBox)
boundingBox - bounding boxpublic Cursor queryIds(BoundingBox boundingBox)
boundingBox - bounding boxpublic long count(BoundingBox boundingBox)
boundingBox - bounding boxpublic FeatureCursor queryFeatures(BoundingBox boundingBox)
boundingBox - bounding boxpublic int countFeatures(BoundingBox boundingBox)
boundingBox - bounding boxpublic FeatureCursor queryFeatures(BoundingBox boundingBox, Map<String,Object> fieldValues)
boundingBox - bounding boxfieldValues - field valuespublic int countFeatures(BoundingBox boundingBox, Map<String,Object> fieldValues)
boundingBox - bounding boxfieldValues - field valuespublic FeatureCursor queryFeatures(BoundingBox boundingBox, String where)
boundingBox - bounding boxwhere - where clausepublic int countFeatures(BoundingBox boundingBox, String where)
boundingBox - bounding boxwhere - where clausepublic FeatureCursor queryFeatures(BoundingBox boundingBox, String where, String[] whereArgs)
boundingBox - bounding boxwhere - where clausewhereArgs - where argumentspublic int countFeatures(BoundingBox boundingBox, String where, String[] whereArgs)
boundingBox - bounding boxwhere - where clausewhereArgs - where argumentspublic Cursor query(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection)
boundingBox - bounding boxprojection - projection of the provided bounding boxpublic Cursor queryIds(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection)
boundingBox - bounding boxprojection - projection of the provided bounding boxpublic long count(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection)
boundingBox - bounding boxprojection - projection of the provided bounding boxpublic FeatureCursor queryFeatures(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection)
boundingBox - bounding boxprojection - projectionpublic int countFeatures(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection)
boundingBox - bounding boxprojection - projectionpublic FeatureCursor queryFeatures(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection, Map<String,Object> fieldValues)
boundingBox - bounding boxprojection - projectionfieldValues - field valuespublic int countFeatures(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection, Map<String,Object> fieldValues)
boundingBox - bounding boxprojection - projectionfieldValues - field valuespublic FeatureCursor queryFeatures(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection, String where)
boundingBox - bounding boxprojection - projectionwhere - where clausepublic int countFeatures(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection, String where)
boundingBox - bounding boxprojection - projectionwhere - where clausepublic FeatureCursor queryFeatures(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection, String where, String[] whereArgs)
boundingBox - bounding boxprojection - projectionwhere - where clausewhereArgs - where argumentspublic int countFeatures(BoundingBox boundingBox, mil.nga.sf.proj.Projection projection, String where, String[] whereArgs)
boundingBox - bounding boxprojection - projectionwhere - where clausewhereArgs - where argumentspublic Cursor query(mil.nga.sf.GeometryEnvelope envelope)
envelope - geometry envelopepublic Cursor queryIds(mil.nga.sf.GeometryEnvelope envelope)
envelope - geometry envelopepublic long count(mil.nga.sf.GeometryEnvelope envelope)
envelope - geometry envelopepublic FeatureCursor queryFeatures(mil.nga.sf.GeometryEnvelope envelope)
envelope - geometry envelopepublic int countFeatures(mil.nga.sf.GeometryEnvelope envelope)
envelope - geometry envelopepublic FeatureCursor queryFeatures(mil.nga.sf.GeometryEnvelope envelope, Map<String,Object> fieldValues)
envelope - geometry envelopefieldValues - field valuespublic int countFeatures(mil.nga.sf.GeometryEnvelope envelope,
Map<String,Object> fieldValues)
envelope - geometry envelopefieldValues - field valuespublic FeatureCursor queryFeatures(mil.nga.sf.GeometryEnvelope envelope, String where)
envelope - geometry envelopewhere - where clausepublic int countFeatures(mil.nga.sf.GeometryEnvelope envelope,
String where)
envelope - geometry envelopewhere - where clausepublic FeatureCursor queryFeatures(mil.nga.sf.GeometryEnvelope envelope, String where, String[] whereArgs)
envelope - geometry envelopewhere - where clausewhereArgs - where argumentspublic int countFeatures(mil.nga.sf.GeometryEnvelope envelope,
String where,
String[] whereArgs)
envelope - geometry envelopewhere - where clausewhereArgs - where argumentspublic GeometryMetadata getGeometryMetadata(Cursor cursor)
cursor - cursorpublic long getGeometryId(Cursor cursor)
cursor - cursorpublic FeatureRow getFeatureRow(Cursor cursor)
cursor - cursorpublic FeatureRow getFeatureRow(GeometryMetadata geometryMetadata)
geometryMetadata - geometry metadatapublic double getTolerance()
public void setTolerance(double tolerance)
tolerance - query range tolerance