[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] st_linemerge not working with 4d coords
From:       Paolo Importuni <imppao () gmail ! com>
Date:       2014-05-12 7:38:38
Message-ID: CAGoRbyezJjaTDTQLTOBAVNQm6hLtW_RiKLyRY6mgaPTDJxb8VA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@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@lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div>Thanks all for your replies.<br></div>I&#39;&#39;l try \
to do some post-processing on the linestring as you Paul suggested.<br></div>Best \
regards<br><br></div>Paolo<br></div><div class="gmail_extra"> <br><br><div \
class="gmail_quote">2014-05-10 17:35 GMT+02:00 Paul Ramsey <span dir="ltr">&lt;<a \
href="mailto:pramsey@cleverelephant.ca" \
target="_blank">pramsey@cleverelephant.ca</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> LineMerge is implemented via the GEOS library which, unlike \
PostGIS,<br> only understands 3 dimensions max. So the 4th is sacrificed in the<br>
process. There&#39;s no good / easy way to retain it. you could write a<br>
post-process routine that took every output vertex and compared it to<br>
the input geometry to try and figure out what the original M dimension<br>
was, I suppose.<br>
<br>
P.<br>
<div><div class="h5"><br>
On Thu, May 8, 2014 at 8:38 AM, Paolo Importuni &lt;<a \
href="mailto:imppao@gmail.com">imppao@gmail.com</a>&gt; wrote:<br> &gt; Hi \
everybody,<br> &gt;<br>
&gt; I am trying to merge two linestring like in the following example:<br>
&gt;<br>
&gt; select st_astext(st_linemerge(st_collect(ST_GeomFromEWKT(&#39;LINESTRING(5 5 \
5<br> &gt; 5, 10 10 10 10)&#39;),ST_GeomFromEWKT(&#39;LINESTRING(10 10 10 10 , 15 15 \
15<br> &gt; 15)&#39;))));<br>
&gt;<br>
&gt;<br>
&gt; but the output is<br>
&gt; &quot;LINESTRING Z (5 5 5,10 10 10,15 15 15)&quot;<br>
&gt;<br>
&gt; that is,   the 4th dimension is lost.<br>
&gt;<br>
&gt; Can anyone please explain   me the reason   and how to overcome this \
problem?<br> &gt;<br>
&gt; Thanks and best regards<br>
&gt;<br>
&gt; Paolo<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; postgis-users mailing list<br>
&gt; <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
 &gt; <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" \
target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br> \
_______________________________________________<br> postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" \
target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br> \
</blockquote></div><br></div>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic