I am not sure of any mapscript approaches for this type of problem. I
currently do this to create a grid that shows how many flights cross a given
grid cell in my application at http://maps.macnoise.com/interactive/ (select
flight tracks grid from the layer list) using postgis.
The general approach that I have is to either use a pre-built grid or a
plpgsql function that builds the grid on the fly and to create a layer in
mapserver that does an on the fly intersection between the two with a data
statement similar to this:
DATA "the_geom from (select count(f.id) as count, g.geom as the_geom from
grid as g,flighttracks as f where g.geom && f.geom and crosses(g.geom,f.geom))
using unique the_geom using srid=-1"
David
On 1/26/07, Rodrigo Del C. Andrade <[EMAIL PROTECTED]> wrote:
Hi dear list.
I am trying to implement in java mapscript an application that draws
on-the-fly contours around areas with a high ocurrence rate of a given
event, something like the topics discussed in here:
http://article.gmane.org/gmane.comp.gis.mapserver.user/17924.
I understand it is not easy, so I am taking my steps one at a time.
Being quite new to GIS programming, I am going trough the usual misteps.
My first problem is actually dividing the area into subzones where I
can count the ocurrences of said events inside each rectangle to feed the
statistic analysis. I have tried using a graticule item on a line layer, but
I cant seem to find a query method that will give me something I can work
with (boundaries, polygons, the works), even though the grid has been drawn
quite nicelly.
I understand I probably missed completelly the point of a GRID object
inside a LINE type layer, but is there some built in way (trough grid or any
other method) to chop a layer in equal rectangles so I can iterate trough
each of them checking for ocorrences?
Thanks a lot.
--
*Rodrigo Del C. Andrade*
*Estagiário Nível Superior*
*SIC - SSE - Soluções Segurança Pública*
*DÍGITRO TECNOLOGIA*
*E-mail:* [EMAIL PROTECTED]
*Fone:* +55 48 3281-7390 / +55 48 3281-7000
*Fax:* +55 48 3281-7299
*Site:* www.digitro.com
--
************************************
David William Bitner