Contribute Media
A thank you to everyone who makes this possible: Read More

Geospatial Validations Using FastAPI and PostGIS

Description

Given the results it can deliver (and its inherent complexity), geospatial data often takes center stage in projects it's incorporated into. Its star power and intimidating array of fellow-travelers (GDAL, et al) can make it easy to discount its value in simpler supporting roles or behind-the-scenes. Looking beyond the typical analysis and visualization toolchains--and their extreme learning curves--this talk demonstrates some comparatively low-lift patterns for leveraging geodata in a web application back end.

We'll begin by briefly discussing how geospatial data differs from other data types, how it is commonly formatted and made available, and which aspects (spatial reference identifiers, e.g.) are crucial to maintaining data correctness. Having laid out a few fundamentals we will look at PostGIS, an open-source extension to PostgreSQL which enables support for spatial datatypes, functions, and indexes. Finally, we'll look at an example application based on the FastAPI web framework which uses features of Pydantic and SQLAlchemy + GeoAlchemy 2 to implement custom geospatial validations for inbound requests.

Details

Improve this page