[postgis-users] st_linemerge not working with 4d coords

Paolo Importuni imppao at gmail.com
Mon May 12 00:38:38 PDT 2014


Thanks all for your replies.
I''l try to do some post-processing on the linestring as you Paul suggested.
Best regards

Paolo


2014-05-10 17:35 GMT+02:00 Paul Ramsey <pramsey at cleverelephant.ca>:

> LineMerge is implemented via the GEOS library which, unlike PostGIS,
> only understands 3 dimensions max. So the 4th is sacrificed in the
> process. There's no good / easy way to retain it. you could write a
> post-process routine that took every output vertex and compared it to
> the input geometry to try and figure out what the original M dimension
> was, I suppose.
>
> P.
>
> On Thu, May 8, 2014 at 8:38 AM, Paolo Importuni <imppao at gmail.com> wrote:
> > Hi everybody,
> >
> > I am trying to merge two linestring like in the following example:
> >
> > select st_astext(st_linemerge(st_collect(ST_GeomFromEWKT('LINESTRING(5 5
> 5
> > 5, 10 10 10 10)'),ST_GeomFromEWKT('LINESTRING(10 10 10 10 , 15 15 15
> > 15)'))));
> >
> >
> > but the output is
> > "LINESTRING Z (5 5 5,10 10 10,15 15 15)"
> >
> > that is,  the 4th dimension is lost.
> >
> > Can anyone please explain  me the reason  and how to overcome this
> problem?
> >
> > Thanks and best regards
> >
> > Paolo
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140512/c3406e33/attachment.html>


More information about the postgis-users mailing list