artemp/mapnik — Issue #414: Use Find_SRID in postgis driver
Author: artemp
Created: 2011-10-11 16:17:25+00:00
State: open
Labels: PostGIS_Input_Driver

We might be able to simplify the postgis driver code slightly by using this query to get the srid on the fly when the geometry is requested:

http://postgis.refractions.net/documentation/manual-svn/Find_SRID.html

An example query could be:

{{{
#!sql
select AsBinary(force_2d("web_geometry"),'NDR') as geom,
"gid"
from table
where geometry && GeomFromText('POLYGON((-7401525.8578125 1695023.0321875,-7401525.8578125 2318749.0478125,-6777799.8421875 2318749.0478125,-6777799.8421875 1695023.0321875,-7401525.8578125 1695023.0321875))',
find_srid('','table','geometry'))
}}}