[postgis-devel] Promote Geometry to MultiGeometry on Insert
Even Rouault
even.rouault at spatialys.com
Fri Feb 17 12:02:56 PST 2023
Le 17/02/2023 à 20:28, Regina Obe a écrit :
>
> Would that be a breaking change for any down the stream apps. Suddenly
> mixing multi with singles?
>
> That would be my main concern.
>
Yes that would be. Typically GeoPackage has the same strong/pedantic
typing constraints as PostGIS on geometry columns. So a "ogr2ogr
out.gpkg PG:...." scenario would currently break if a PostGIS
multipolygon layer would contain polygons (well, to be more exact, the
GPKG driver would actually accept a mix of polygons & multipolygons in a
multipolygon layer, but would emit a warning that this is non conformant
to the GPKG spec)
GML has also different types for single vs multi.
Shapefile is a bit weird, where it has the same type for
Polygon/MultiPolygon and LineString/MultiLineString, but distinguishes
Point from MultiPoint...
I agree with Darafei that, in an ideal world, a punctual / linear /
areal separation, that would encompass single vs multi, "straight" vs
"curvy" variants, would make much more sense. If you could know for a
geometry colum of type "linear", if it actually contains rows with
single, multi, straight or curvy, that could make the translation to
other formats easier, but I guess that would involve triggers to keep
such metadata up-to-date. Changing the whole ecosystem of formats is tricky.
PostGIS being lax on ingestion and automatically converting single to
multipart however is non breaking.
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20230217/cd3a4221/attachment.htm>
More information about the postgis-devel
mailing list