RE: Help with a query

"Regina Obe" <[email protected]>
Newsgroups gmane.comp.gis.postgis
Message-ID <[email protected]>
By example of query, I meant a simple self-standing query that has the geometry in question that is being converted to a geometry collection.

> > > I suppose, in the last versions of PostGIS the Function ST_Makevalid
> > > will return something other than in the previous one.
> >
> > Some information more...
> >
> > It seems, in some cases, the function ST_Makevalid returns
> > ST_GeometryCollection instead of ST_MultiPolygon...
> > Why?!?
> >
> > Thanks
> > Luca Bertoncello
> > ([email protected])
> 
> Yes there have been changes over the years to ST_MakeValid and additional
> arguments added to control behavior.
> 
> How all that works depends on the version of GEOS you are running as well as
> the PostGIS version.  Most of the ST_MakeValid work is delegated to GEOS, but
> what is passed on to GEOS is controlled by version of PostGIS.
> 
> As you can see noted in the docs -- https://postgis.net/docs/ST_MakeValid.html
> 
> The PostGIS 3.2.0 added ability to control algorithm used, but that hinges on if
> you are running GEOS 3.10 or greater.
> 
> It would be also useful if you provided an example of the query you are hitting
> that returns a Geometry Collection.
> In some cases ST_MakeValid would return a geometry collection and I remember
> that being the case in older versions as well.  That is because ST_MakeValid by
> default tries to preserve as much linework as was there before as I recall.
> Returning a Multipolygon would be invalid in those cases since polygons can't
> overlap in a Multipolygon.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.