Help with a query
Luca Bertoncello <[email protected]>
| Newsgroups | gmane.comp.gis.postgis |
|---|---|
| Message-ID | <[email protected]> |
Hi list! I have a query that worked some years with my "old" Debian 10 and Postgres 11. Now with Debian 12 and Postgres 15 throws an error... So, my problem: I need to create a table with the _physical_ boundaries of the cities. I already asked you some years ago and now I have my query. So I create a Table `city_boundaries`. Now I must "compact" it, in order to have only the outer polygon. The table has a column `way` defined as geometry(MultiPolygon,3857). As suggested 2021, I aggregate the building using 4 temporary columns, wayn1, wayn2, wayn3 and wayn4. They are defined too as geometry(MultiPolygon,3857). Then I run my queries: UPDATE city_boundaries SET wayn1 = ST_Multi(ST_SimplifyPreserveTopology(way, 100)); UPDATE city_boundaries SET wayn2 = ST_Multi(ST_Buffer(wayn1, 50, 'join=miter')); UPDATE city_boundaries SET wayn3 = ST_Multi(ST_Buffer(wayn2, -50, 'join=miter')); UPDATE city_boundaries SET wayn4 = ST_Makevalid(wayn3); The last query throws the error: FEHLER: Geometry type (GeometryCollection) does not match column type (MultiPolygon) I suppose, in the last versions of PostGIS the Function ST_Makevalid will return something other than in the previous one. Can someone suggest me how to "convert" it as needed? Thanks a lot Luca Bertoncello ([email protected])