Building Spatial APIs in PostgreSQL with PostgREST
11-21, 09:30–09:55 (Pacific/Auckland), WG308 TE IRINGA

Learn how to turn your PostgreSQL database into a powerful RESTful API using PostgREST. This talk focuses on exposing geospatial data and leveraging PostGIS functions to build scalable, efficient spatial APIs—all without writing a single line of backend code.


In this talk, we’ll explore how you can create powerful, production-ready spatial APIs directly from your PostgreSQL database using PostgREST. PostgREST is an open-source tool that automatically generates a RESTful API from your database schema, eliminating the need for custom backend code. By integrating PostGIS, the geospatial extension for PostgreSQL, we’ll see how spatial data like points, polygons, and raster layers can be exposed through clean, performant REST endpoints.
We'll walk through the setup process, including enabling PostGIS, configuring PostgREST, and writing SQL views or functions to expose spatial operations. You'll learn how to use PostGIS functions—like distance calculations, spatial joins, and bounding box filters—directly through the API. We’ll also discuss how to secure, paginate, and filter spatial data, making your API both powerful and user-friendly.
Whether you're a GIS developer, a backend engineer, or just curious about spatial data, this session will give you practical tools to build and scale spatial APIs using only SQL. By the end, you'll have a clear roadmap to go from a PostgreSQL database to a fully-featured geospatial API ready for frontend integration or data sharing.

Krishna Lodha is the founder and director of Rotten Grapes Private Limited, a software development company specializing in open-source GIS solutions. With a strong background in geospatial technologies and a passion for FOSS, Krishna has led the development of several impactful Web GIS applications for clients across forestry, agriculture, water management, and urban planning sectors. Under his leadership, the company has successfully deployed solutions that leverage platforms like GeoServer, OpenLayers, and QGIS, helping government and private organizations optimize their spatial data workflows.

Krishna is also a content creator who shares knowledge through YouTube tutorials and technical blogs focused on open-source GIS development. His work emphasizes practical, scalable solutions using open standards and tools, aiming to make geospatial technology more accessible to developers and analysts alike.

An advocate for community-driven innovation, Krishna regularly mentors students and professionals interested in building careers in geospatial software. He actively participates in open-source projects and contributes to the broader FOSS4G ecosystem.

This speaker also appears in: