GeoRefine is a geospatial processing extension for OpenRefine.
point
: creates a point from latitude and longitude in the WGS84 coordinate reference systemdistance
: computes the distance between two points in metersparseGeoJson
: parses GeoJSON stringparseWkt
: parses WKT string- All geometry relationship functions described here:
equals
contains
within
overlaps
crosses
touches
intersects
disjoint
relate
Download GeoRefine and place the unzipped folder in the extensions
directory of your OpenRefine workspace.
On OS X, this will be /Applications/Google Refine.app/Contents/Resources/webapp/extensions
.
Using GREL to facet places based on whether they're contained by the Barrington Atlas capgrid for Byzantium:
contains(parseGeoJson("{\"type\": \"Polygon\", \"coordinates\": [[[31.0, 40.0], [31.0, 42.0], [27.0, 42.0], [27.0, 40.0], [31.0, 40.0]]]}"),parseGeoJson(value))
- parsing geospatial information from and to GeoJSON/WKT
- spatial operations in GREL: distance, area, contains, overlaps, touches, equals, crosses, disjoint, within
- spatial faceting on spatial operations
- spatial clustering
- simple spatial visualization
Unlike most OpenRefine extensions, GeoRefine uses maven instead of ant, due to the need for complicated GeoTools dependencies. Run mvn compile
to compile Java source to classes. If you update dependencies, run mvn dependency:copy-dependencies
to install them into target
. You'll then need to manually move them into module/MOD-INF/lib
, taking care to remove conflicting jars already provided by OpenRefine such as openrefine-1.0.jar
and json-20100208.jar
. GeoRefine is expected to be built in the extensions
directory of an OpenRefine source tree, with the OpenRefine system jar built in that tree with the ant jar
task.