Paul Ramsey
Paul Ramsey
Where are you? Go ahead and figure out your answer, I'll wait. No matter what your answer, whether you said "sitting in my office chair" or "500 meters south-west of city hall" or "48.43° north by 123.36° west", you expressed your location relative to something else, whether that thing was your office layout, your city, or Greenwich . A geospatial database like PostGIS has to have able to convert between these different reference frames, known as "coordinate reference systems". The math for the...
Read MoreJonathan S. Katz
Jonathan S. Katz
The PostgreSQL Operator provides users with a few different methods to perform PostgreSQL cluster operations, via: • a REST API • , PostgreSQL Operator Command Line Interface ( CLI ) • Directly interfacing with Kubernetes, including various APIs and custom resource definitions ( CRDs ). a REST API , PostgreSQL Operator Command Line Interface ( CLI ) Directly interfacing with Kubernetes, including various APIs and custom resource definitions ( CRDs ). While the REST API and pgo provide...
Read MoreJonathan S. Katz
Jonathan S. Katz
PostgreSQL 12, the latest version of the "world's most advanced open source relational database," is being released in the next few weeks, barring any setbacks. This follows the project's cadence of providing a raft of new database features once a year, which is quite frankly, amazing and one of the reasons why I wanted to be involved in the PostgreSQL community. In my opinion, and this is a departure from previous years, PostgreSQL 12 does not contain one or two single features that everyone c...
Read MorePaul Ramsey
Paul Ramsey
While PostGIS includes lots of algorithms and functionality we have built ourselves, it also adds geospatial smarts to PostgreSQL by linking in specialized libraries to handle particular problems: • Proj for coordinate reference support; • GDAL for raster functions and formats; • GEOS for computational geometry (basic operations); • CGAL for more computational geometry (3D operations); and • for format support, libxml2, libjsonc, libprotobuf-c Proj for coordinate reference support; GDAL...
Read MorePaul Ramsey
Paul Ramsey
Parallel query has been a part of PostgreSQL since 2016 with the release of version 9.6 and in theory PostGIS should have been benefiting from parallelism ever since. In practice, the complex nature of PostGIS has meant that very few queries would parallelize under normal operating configurations -- they could only be forced to parallelize using oddball configurations . With PostgreSQL 12 and PostGIS 3, parallel query plans will be generated and executed far more often, because of changes t...
Read MorePaul Ramsey
Paul Ramsey
With the availability of MVT tile format in PostGIS via ST_AsMVT() , more and more people are generating tiles directly from the database. Doing so usually involves a couple common steps: • exposing a tiled web map API over HTTP • converting tile coordinates to ground coordinates to drive tile generation exposing a tiled web map API over HTTP converting tile coordinates to ground coordinates to drive tile generation Tile coordinates consist of three values: • zoom , the level of the tile...
Read MorePaul Ramsey
Paul Ramsey
The raster functionality in PostGIS has been part of the main extension since it was introduced. When PostGIS 3 is released, if you want raster functionality you will need to install both the core extension, and also the extension. Breaking out the raster functionality allows packagers to more easily build stripped down "just the basics" PostGIS without also building the raster dependencies, which include the somewhat heavy GDAL library. The raster functionality remains intact however, a...
Read MoreDavid Thomas
David Thomas
Version 2.28 ( release notes ) of the GNU C library introduces many changes to the collations it provides. Collations determine how strings are compared and by default, PostgreSQL uses the operating system’s collations which on Linux means glibC. When your operating system updates to this version of glibc and you aren't using the “C” or “POSIX” collation, you may encounter some differently ordered indexes. This unexpected change in the order of indexes will lead to incorrectly ordered query resu...
Read MorePaul Ramsey
Paul Ramsey
Vector tiles are the new hotness , allowing large amounts of dynamic data to be sent for rendering right on web clients and mobile devices, and making very beautiful and highly interactive maps possible. Since the introduction of ST_AsMVT() , people have been generating their tiles directly in the database more and more, and as a result wanting tile generation to go faster and faster. Every tile generation query has to carry out the following steps: • Gather all the relevant rows for the tile...
Read MorePaul Ramsey
Paul Ramsey
With the release of PostGIS 3.0 , queries that geometry columns will return rows using a Hilbert curve ordering, and do so about twice as fast. Whuuuut!?! The history of "ordering by geometry" in PostGIS is mostly pretty bad. Up until version 2.4 (2017), if you did on a geometry column, your rows would be returned using the ordering of the minimum X coordinate value in the geometry. One of the things users expect of "ordering" is that items that are "close" to each other in the ordered li...
Read More