On Tue, 2010-09-14 at 08:37 +1200, Robert Coup wrote: > Hi Brad, > > [Please include the mailing list in your replies] > > On Sat, Sep 11, 2010 at 6:48 AM, Simpson Brad-C-Lockheed > <[email protected]> wrote: > Shouldn’t the shoreline_300 shape file agree with > www.spactialreference.org regarding its “SR-ORG:6” projection. > I found an island in the British Channel and zoomed into the > southern tip on the web page: > > > > http://spatialreference.org/ref/sr-org/6/ > > > > > The coordinates are -2.2227, 49.709 degrees corresponding to > about -247437,6395975 in the spherical Mercator projection. I > extracted the polygon in shoreline_300 and found the > southernmost point. Its coordinates were -247169,6394645. > >
I think the answer is no, the SR-ORG:6 does not match the OSM spherical mercator projection. The (-2.2227, 49.709) is not at the southern tip of the island: http://www.openstreetmap.org/?mlat=49.709&mlon=-2.2227&zoom=14&layers=M I reckon the southermost point is at (49.700943, -2.220357) http://www.openstreetmap.org/browse/node/16813336 http://www.openstreetmap.org/?mlat=49.700943&mlon=-2.220357&zoom=17&layers=M > I presume I need to specify the source projection since there is no > shoreline_300.prj file. However, ogr2ogr does not recognize > “SR-ORG:6”, and also not “EPSG:3857” since it is not yet defined. > What do you recommend I do? Personally I have appended a 900913 definition to the end of the regular proj lookup file to make it easy to reference as epsg:900913 $ tail -n 1 /usr/share/proj/epsg <900913> +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 +wktext +no_defs <> Taking the co-ordinates for the node above and converting them to 900913: $ echo "-2.220357 49.700943" | cs2cs +init=epsg:4326 +to +init=epsg:900913 -247169.01 6394644.62 0.00 That looks like a pretty much perfect match to "shoreline_300 ... coordinates were -247169,6394645.". Converting the shapefile back to epsg:4326 $ ogr2ogr -t_srs EPSG:4326 coastline ../shoreline_300.shp -f "ESRI Shapefile" -s_srs EPSG:900913 The polygon for this island in this new shapefile seems to match the intended co-ordinates: POLYGON ((-2.2203570416141005 49.70094383436319, -2.229046963229061 49.70125802306501, ... Jon _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

