[postgis-users] 2D linestring or multilinestring

Ed Linde edolinde at gmail.com
Thu Jun 21 02:03:27 PDT 2012


Also is there an easy way to count the total number of points that are in a
linestring? Cannot find the function to do so.
I want to keep track of how many points are left in a linestring as I go
ahead and do the simplify.

On Thu, Jun 21, 2012 at 10:43 AM, Ed Linde <edolinde at gmail.com> wrote:

> Hi All,
> I am building a linestring comprising of nearly 1000 points, now I want to
> pick every 10th point and reduce this to a linestring of 100 points!
> I will use ST_linesimplify for this, but now I am wondering if there is a
> measure that shows me the "difference" between the two linestrings.
> Some measure like the "sum of squared errors"... I want to know what I
> lose in accuracy by discarding all these points and simplifying my
> line segment. So if my line strings have (x,y) points in them, I would
> like to know the differences in "y" basically.
> Any ideas for a different kind of measure would be great too. I was
> initially thinking of measuring the distance between each point in the
> original linestring (1000 points) against the new simplified linestring
> and adding their squares... would that work? Just wondering if
> there is a nicer, easier way to do this in Postgis?
>
> Thanks,
> Ed
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120621/637047a8/attachment.html>


More information about the postgis-users mailing list