PostGIS Question

Paul Ramsey pramsey at REFRACTIONS.NET
Tue Jun 21 15:48:48 EDT 2005


"thecolumn from thegeom" get re-written into SQL for PostGIS. The SQL 
does include a call to the spatial index, so you do not need to be 
explicit about it.

The only time you need to be explicit is if you use embedded SQL, and it 
is particularly complex. Even for complex SQL, mapserver will add the 
bounding box to the request, but it just might not add it in the most 
effective/efficient place.

To see a log, turn on statement logging in PostgreSQL, or turn on DEBUG 
in your postgis layer.

Paul

Stephen Woodbridge wrote:

> I'm newbie to PostGIS, I am wondering if the mapserver integration uses 
> the PostGIS spatial indexes when rendering a map or if it needs to be 
> made explicitly in the layer definition?
> 
> Does the final SQL do something like:
> 
> select whatever, the_geom
>   from table
> where the_geom && bbox2d(image_extents) and ...
> 
> I am guessing/hoping it probably does. Is there an easy way to get 
> mapserver to  dump the SQL to a log file for inspection?
> 
> Thanks,
>   -Steve W.



More information about the mapserver-users mailing list