Geo-Infographics created dynamically from PostGIS using ST_AsSVG
Formal Metadata
| Title | Geo-Infographics created dynamically from PostGIS using ST_AsSVG |
|
| Title of Series | |
| Number of Parts | 351 |
| Author | |
| License | You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. |
| Identifiers | |
| Publisher | |
| Release Date | |
| Language | |
| Production Year | 2022 |
Content Metadata
| Subject Area | |
| Genre | |
| Abstract | ## The Problem
Let's assume you have an attribute-focused table, but you would still like to see a thumbnail of the associated geometry. Or more generally: How to dynamically render polygon geometries in a HTML page without any mapping library. *Enter ST_AsSVG (PostGIS function)!*
## Context
Last year I showed how we display geo data in our webapps using vector tiles (ST_AsMVT) (YouTube: watch?v=s_dWBOiuFiY&t=139s). This year I will explain how we apply ST_AsSVG of PostGIS on database records to *create beautiful geo-infographics* in pure HTML. The result is a geo-visualization similar to this one: Comparison maps of Australian Cities (Size, Population) (imgur.com/OQClpbc). The trickiest part will be the sizing of the SVG objects (viewport vs. viewBox (webdesign.tutsplus.com/tutorials/svg-viewport-and-viewbox-for-beginners--cms-30844)).
## Content
The talk will contain some theory on SVG. It will then show basic setups for FastAPI, SQLModel, Jinja2 and, of course, PostGIS. All code will be made available via GitHub.
## Aim
After the talk you will master sizing of SVG and be capable of creating your own dynamic geo-infographics directly from data stored in your PostGIS database. |
|
| Keywords | |