Forked from aws-samples/h3-udf-for-athena for use at Neighbor. Differences include the following changes:
- Readded
@Test
annotations for JUnit tests - Modified functions to work with GeoJSON-style WKT text, where coordinates are in the form of
longitude
latitude
, as opposed tolatitude
longitude
- Using the NGA Simple Features Java to perform WKT parsing and Geometry manipulation
This repository contains example code to support the blog post Extend geospatial queries in Amazon Athena with UDFs and AWS Lambda. The UDF makes it straightforward for Amazon Athena to find out which Uber H3 hexagon a pair of (lat, long) coordinates are in. This can be used for subsequent analysis and visualisation.
We include code for the AWS Lambda function that powers the new Athena UDF. Also included is an example Jupyter Notebook which may be used in an Amazon SageMaker Notbook Instance to render a choropleth map.
- Package the UDF by going to the
udf
directory and runningmvn clean package
- Run tests by going to the
udf
directory and runningmvn clean test
- Run
cdk deploy
in the infrastructure directory of the repository
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.