Skip to main content
100%

Gist 457a39b7788e49db95f32294a6b921d8

✓ Published0🌍 Public
CConorAspell
Last edited Mar 27, 2022
Created on Mar 27, 2022

This example demonstrates a geocoding API built with AWS Lambda that converts Irish postal addresses into geographic coordinates. It loads county and townland boundary data from GeoJSON files using GeoPandas, then parses the incoming address string to match the county, townland, and road components. The code uses the Shapely geometry objects within the GeoDataFrames to extract point coordinates, falling back from townland-level to county-level precision when a townland match fails. The implementation handles JSON request bodies, returns appropriate HTTP status codes, and formats coordinate responses as JSON, with boto3 included for potential AWS service integration.

AI-generated description

Similar vizzes