Keeping GIS data in full-resolution and simplifying it on demand is a known challenge: simplification has to be fast and its output has to be topologically consistent.
We saw how to get a topologically consistent simplified version of a full layer, but that method isn’t fast enough for on-demand usage. Also, we saw how to perform a fast simplification by sacrificing the degree or generalization so that the introduced inconsistency would not be visible on a rendering surface.
Read more →
Following a recent research about how to simplify a multipolygon layer while keeping topological relationships intact, here’s my take on that, using the PostGIS topological support. The data French administrative subdivisions, called “départements”, will be used. Data can be downloaded here.
It is composed by 96 multipolygons for a total of 47036 vertices.
Principle of simplification We convert a layer’s Geometries to TopoGeometries We simplify all edges of the built topology We convert the (now-simplified) TopoGeometries back to Geometries Steps The following steps assume you loaded the shapefile into a table named “france_dept”.
Read more →
The long-awaited full featured PostGIS 2.0.0 is finally out. Coupled with GEOS 3.3.3 (released a few days before) and GDAL-1.9.0, it brings you the best spatial database system in town, complete with raster analysis and topology modeling support.
Complete announcement, with list of changes, here.
It’s been an great pleasure to work with the rest of the team on getting this release ready for shipping, drawing a line after over two years of hard work on new features.
Read more →
I’ve been spending the last few days profiling and optimizing the new simple-to-topological converter you will find in PostGIS 2.0.0 thanks to a community effort.
The most expensive operation was found to be the ST_AddEdgeModFace function, which adds an edge and checks if such edge creates a new face.
Face-splitting detection was implemented using a brute force approach consisting in invoking the GEOS polygonizer and then checking if any polygon created contained the newly added edge in its boundary.
Read more →
The second bugfix release in the 3.3 branch of GEOS was released today.
This is the version required by the topology support shipped with the upcoming PostGIS 2.0 release.
Everyone is recommended to upgrade. Changes can be read here, package can be downloaded here.
An early tester of the new PostGIS Topology submitted an interesting dataset which kept me busy for a couple of weeks fixing a bunch of bugs related to numerical stability/robustness.
Finally, the ST_CreateTopoGeo function succeeded and imported the dataset as a proper topological schema. Here’s what it looks like:
Edges of the built topology At a first glance it doesn’t seem to be particularly problematic. Here’s the composition summary:
=# select topologysummary('small_sample_topo');
topologysummary
--------------------------------------------------------
Topology small_sample_topo (2042), SRID 0, precision 0
83 nodes, 156 edges, 74 faces, 0 topogeoms in 0 layers But the devil hides at high zoom levels.
Read more →
PostGIS implementation of the ISO SQL/MM Topology-Geometry model is finally complete.
The SQL/MM model is just a portion of the whole topology support, but an important one, including schema definition and functions to create and populate the schema with primitive components (nodes, edges, faces).
In addition to the base model, PostGIS adds a TopoGeometry data type for use wherever you would normally use a Geometry type, except the former will be defined by references to primitive, shared, topological components.
Read more →