Hi Brad,

On Thu, Sep 9, 2010 at 10:13 PM, Dane Springmeyer <[email protected]> wrote:

>
> To get this to work, I had to remove the ‘+nadgri...@null’ verbiage from
> the proj4text field of the 900913 entry in the spatial_ref_sys table.  This
> could potentially be the cause of why I’m seeing coastlines in the wrong
> location (mainly a y offset, but I suspect there may be even a smaller x
> offset as well).
>
>
> yes, small offsets seen in data moving to or from spherical mercator does
> indicate a problem with nadgrids=null.
>

What problems did you have? Likely it was that you didn't have the grids
added when you built proj4 - they're provided in a separate ZIP file from
the source due to unclear licensing around some of them.


>
> Where can one find a discussion on the ‘+nadgrids…’ specifier?
>
>
>
> not sure. if proj4 wiki does not have one I would recommend creating the
> wiki page, and poking the proj4 list to contribute to it. I bet it has been
> discussed on the proj4 list if you can find the archives.
>

+nadgrids tells proj4 to use a grid to convert between datums (& hence
spheroids) - the other common methods are 3/7 parameter transforms (that's
the +towgs84=x,x,x,x,x,x,x stuff you see). For accurate conversion between
datums, grids are often used because a 7-param transform just isn't accurate
enough.

The @null grid is a bit special. It's basically a no-op.

We use this for 900913/3857 because the projection is basically "wgs84
coordinates applied directly to a *sphere*, then mercator-ized".

Normally when you convert lat-lngs between the wgs84 ellipsoid & a sphere,
the lat-lngs would change. This projection doesn't want that. So
+nadgri...@null is used for a "no-op", so we end up with the wgs84 latlngs
directly drawn on a sphere - ignoring the differing ellipsoids.


> I’ve found references on the web that the OSM files are in a spherical
> Mercator.  How is a spherical Mercator projection specified with regard to
> Proj4?
>
>
> http://spatialreference.org/ref/sr-org/6/
>
> this is also the new epsg:3857 (which we need to update
> spatialreference.org with...)
>

note that the +nadgri...@null part is important! Removing it will end up
with data that doesn't align with other "spherical mercator" data.

Unfortunately I don't think EPSG has/had a nice way of specifying the
equivalent of +nadgri...@null, and coordinate system WKT doesn't really
either - GDAL adds a special section to it's coordinate system WKT with the
proj4 text in it to work around this issue. ESRI just does exact text
matches on names and offers transform suggestions (ick).

HTH - ask if you have more questions,

Rob :)

-- 
Koordinates Ltd.
PO Box 1604, Shortland St, Auckland 1140, New Zealand
Phone +64-9-966 0433 Fax +64-9-969 0045
Web http://koordinates.com/
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to