[mapserver-users] converting line object to series of points

Andy Colson andy at squeakycode.net
Thu Apr 15 08:49:38 PDT 2010


On 4/15/2010 10:24 AM, Mark Brooks wrote:
> I have a line object that I need to to turn into points.  How can I
> create a series of points from the line object?
>
> Mark
> NC State University

A line has many many points.  Which are you interested in?  Just the 
first and last?  Any one point on the line?  The mid-point?  A point 
every meter along the line?  The closes point on the line to some other 
object?

I know of two options:
1) use PostGIS:
select st_centroid(the_geom) from layer

2) use mapscript


-Andy



More information about the MapServer-users mailing list