Sorry if this is the wrong place to ask this (I can't find a better one). I am trying to generate some tiles to generate a set of tiles to cover the British Isles in the OSGB Projection (epsg:27700)
The files I have use an quite possibly unique naming schema (we are intending to use them as a drop in replacement for some OS supplied tiles when the licence expires, extending coverage to Northern Ireland* in the process) - an example of which is map-n440000-e360000-s420000-w340000-px250.png the numbers are the meters north/east of the OSGB origin (centered on western edge of the city of Preston in this example) so it should be relatively easy to generate the tiles - but I am coming unstuck at generating the images. Modifying generate_image.py and using (chopped a bit for brevity - full code at http://kjs.me.uk/wiki/Talk:Mapnik , the main Mapnik page contains my installation notes) prj = Projection("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +no_defs +over") ll = (-6.5, 49.5, 2.1, 59) c0 = prj.forward(Coord(ll[0],ll[1])) c1 = prj.forward(Coord(ll[2],ll[3])) bbox = Envelope(c0.x,c0.y,c1.x,c1.y) m.zoom_to_box(bbox) gives me a map of the British Isles which generates okay :) Changing the projection line to prj = Projection('+init=epsg:27700') gives me a map centered some 500km or so south of Ghana on the equator Thinking I need to use Geocodes (aka Eastings and Northings) changing the ll line to ll = (0,0,500000,500000) This gives me a box of ocean, as does using km instead of meters ll = (0,0,500.000,500.000) Various combinations of changing the bbox and ll result in getting either Ghana or ocean - I guess i'm doing somet slightly wrong somewhere along the way. Taking the Eastings/Northings and converting to Latitude/Longitude means they don't quite match (Holyhead ends up around 20km north of it's original location for example) and the tiles don't join properly - this (as you would expect) results in noticable "tearing" of the map, particulally on the west coast of Ireland (for example Limerick is shown twice) and results in the town of Norwich disappearing on the east coast of England. Does anyone know/have a working example of how to generate a single tile using generate_image.py (or based on) based on the geocodes that bound the tile? * Yes I know the Island is on a different grid but all our points use Great Britain geocodes, which means negative eastings. Thanks Kev :o)
_______________________________________________ Talk-GB mailing list Talk-GB@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-gb