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

Andy Colson andy at squeakycode.net
Thu Apr 15 10:29:12 PDT 2010


On 4/15/2010 12:07 PM, Mark Brooks wrote:
> Thanks for your insights and help.
>
> The lines I'm working with will have multiple points. They are hurricane
> tracks. The tracks are made of points, about 3-12 hours apart.
> Therefore, sometimes the points are close and other times very far away
> from each other. I can easily connect the track points to create a line.
> But I need the points in between each observation so that I can
> determine what county landfall occurs. The y=mx+b method will work, but
> I was hoping there may be an easier to do it. Or perhaps I'm making the
> problem too complicated to begin with??
>
> Mark
>
>

Well thats an interesting problem.  I'm not sure how to do it with lines 
or points.  If you had a line, you could tell if it intersects a polygon 
(a county), but then it might intersect many polygons... maybe?

On the other hand if you plot points along the line, checking each time 
if you intersect a polygon (a county), would you plug values into x or 
y?  Increasing or decreasing?  If your points are too far apart you 
might miss a polygon, but if they are too close together you'll waste a 
lot of time processing.

Hum... what if you use a line, find all polygons that intersect that 
line, then find the polygon nearest the start point?

On a side note.. aren't hurricane's really wide?  Wouldn't several 
counties get hit at the same time?

-Andy



More information about the MapServer-users mailing list