[postgis-users] simplify a linestring to n points

Obe, Regina robe.dnd at cityofboston.gov
Mon Nov 24 06:31:42 PST 2008


Richard,

I'm curious why you want to do this?

The answer is I think NO, but someone correct me if I am wrong.  I think
the tolerance argument of ST_Simplify is the max distance allowed
between any 2 closest points of the original and simplified.  Though
that's a bit vague to me.

Also I would recommend using ST_SimplifyPreserveTopology if you are
running 1.3.3 with Geos 3+ over ST_Simplify.

I suppose if you insist on min number of points, you could play around
with a combination
of ST_LineMerge and ST_Line_SubString and maybe even throw in a low
number for ST_Simplify

As described here
http://postgis.refractions.net/documentation/manual-svn/ST_Line_Substrin
g.html

Hope that helps,
Regina



 

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
richard -rw- weinberger
Sent: Friday, November 21, 2008 8:35 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] simplify a linestring to n points

hi list!

does postgis provide a method to reduce/simplify a linestring to a
specific number of points?
i'm aware of st_simplify() but i have to set an lower limit.

thanks,
//richard
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.



More information about the postgis-users mailing list