On Sat, Jul 04, 2009 at 02:57:35PM +0200, Lennard wrote: > Florian Lohoff wrote: > >> The problem with the different projection will be that you'll need >> to modify the sql queries made in the mapnik xml to reproject >> to a different projection. IIRC the default osm2pgsql imports >> with is ESRI:900913 aka google/mercator. > > You don't need to update the queries themselves, but the SRS of the > <Map> and all relevant <Layer> objects in the XML.
Will mapnik automatically detect that the geoms in the database
are of a different SRS and do a ST_Translate itself?
My trys did not work and i finally modified the select statements or
better produced translating views i let mapnik access.
osm=> \d completeborders
Table "public.completeborders"
Column | Type | Modifiers
------------+-------------------+-----------
id | bigint |
name | character varying |
complete | integer |
adminlevel | integer |
border | geometry |
path | character varying |
Check constraints:
"enforce_dims_border" CHECK (ndims(border) = 2)
"enforce_srid_border" CHECK (srid(border) = 4326)
osm=> \d completebordersm
View "public.completebordersm"
Column | Type | Modifiers
-------------+-------------------+-----------
id | bigint |
name | character varying |
complete | integer |
admin_level | character varying |
geom | geometry |
View definition:
SELECT completeborders.id, completeborders.name, completeborders.complete,
completeborders.adminlevel::character varying AS admin_level,
st_transform(completeborders.border, 900913) AS geom FROM completeborders;
I had ways in 4326 in the database but wanted a 900913 image.
Flo
--
Florian Lohoff [email protected] +49-171-2280134
Those who would give up a little freedom to get a little
security shall soon have neither - Benjamin Franklin
signature.asc
Description: Digital signature
_______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

