« Return to Thread: Odd behavior with PostGIS

Re: Odd behavior with PostGIS

by Robert Coup :: Rate this Message:

Reply to Author | View in Thread

(cc'ing to mapnik-devel)

On Sat, Jun 13, 2009 at 5:55 AM, Lennard <ldp@...> wrote:
Robert Coup wrote:


I've been wondering whether we do something like:

 table= -> current behaviour

The current behaviour already breaks if you add a filter without adding it to the select in a subquery, unless you're doing 'select *' there.

Very true.
 

 sql= -> all on your own, you need to make sure the fields/geometries/everything are correct.

+1 though, although I hope it would still add the bbox, obviously.

Except the "though" part makes a mess of it :(

Maybe the ability to do a simple substitution in the querystring would suffice: 
"SELECT ... FROM ... WHERE my_geom && %(bbox)s"

%(bbox)s gets replaced with st_geomfromtext('POLYGON(( ... ))', 1234)

Make it substitutable multiple times, and if people are doing clever [stupid] things with projections (like i do) then they can always wrap it in st_setsrid() or st_transform() or whatever they need.

Improvements? What am i missing?

Rob :)

_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users

 « Return to Thread: Odd behavior with PostGIS