Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add query support to GeoWave data provider #24

Closed
djohnson729 opened this issue Apr 7, 2015 · 2 comments
Closed

Add query support to GeoWave data provider #24

djohnson729 opened this issue Apr 7, 2015 · 2 comments

Comments

@djohnson729
Copy link
Contributor

In map algebra, when a GeoWave data source is used, allow a query to be included to filter the data that GeoWave reads. The GeoWave api allows the use of Geotools CQL syntax for querying data. Modify the map algebra syntax so that a CQL query can be specified.

For example, assuming that the mrgeo.conf has a GeoWave data source defined named "geowave", and vector data named "roads" has been ingested into GeoWave, filter "roads" to a BBOX AOI and rasterize them to a MrsPyramid:

aoiRoads = [geowave:roads; BBOX(the_geom, -120.0, 20.0, -110.0, 30.0)];
aoiRoadsRaster = RasterizeVector(aoiRoads, "MASK", "12z");
djohnson729 added a commit that referenced this issue Apr 7, 2015
 - Provide support for querying GeoWave as a vector data source
 - Fix some geotools dependencies in the POM to use version 12.1
   instead of mixing in some 12.2 dependencies
 - Ensure that when vector resource names are stored in the Hadoop
   configuration (for in mappers and reducers), they include the
   data source's prefix so the resource can be properly accessed
   in the mappers and reducers.
@djohnson729
Copy link
Contributor Author

Currently, the map/reduce key for vector data is a LongWritable, and the GeoWave record reader assigns that value based on what is returned by SimpleFeature.getID(). It is hard-coded to recognize a string containing one period and the feature id after the period. However, this will not be appropriate for all GeoWave data sources. Look into:

  • Seeing if we can set the key to a record number rather than trying to use the feature's id
  • Switching the LongWritable map/reduce key to Text (which will be a lot more work)

@djohnson729
Copy link
Contributor Author

Since the map/reduce key is not used for processing in MrGeo, I hard-coded the key for GeoWave data to -1. This is also what happens in CsvInputFormat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant