[PROJ] WGS84(Natural Earth data) to sphere

Greg Troxel gdt at lexort.com
Thu Nov 10 16:15:52 PST 2022


Javier Jimenez Shaw <j1 at jimenezshaw.com> writes:

> At the end you and I agree that GeoJSON is in WGS84 (but not the people
> from d3, based on the comment on the issue). How this data is later
> projected in the web browser is another story.
> One of the multiple complains about EPSG:3857 "WGS 84 / Pseudo-Mercator"
> (aka "Web Mercator") is that it uses ellipsoidal coordinates (WGS84), ...
> and projects them in a sphere. If I am right, EPSG:3395 "WGS 84 / World
> Mercator" is using an ellipsoid.

Yes, but the point here is that your coordinates line up with the
coordinates of map features with the base map you are using.

Unless you are doing something really unusual and sophisticated, or
using something like arcgis online, anything web-mappy will want
coordinates in WGS84 or EPSG:3857.

Gonzo: please actually explain what you are doing, rather than assuming
something about a step in the middle.  You've said you have a shaepfile
in WGS84, so:

  If you run ogrinfo, is it labelled as WGS84?

  What software are you using for web display.  Name names and tell us
  the library.

  What format does the web display library need?  Send us a link to the
  online API documentation.   (If it's not open source, get support from
  the company that published proprietary software instead.)

  If it needs geojson, what do the docs say about CRS?

  If you just ogr2ogr into geojson, with no crs args, and then you use
  that with say openstreetmap, do the data points show up relative to
  map features correctly?



> I guess that you are trying to convert the coordinates from WGS84 to
> spherical ones to be "compliant" with the web browser library that you are
> using. (This is not a GeoJSON problem).
> Unfortunately I do not know the options needed in ogr2ogr.

I don't either but Gonzo is far from establishing that this makes sense.

Some of the complaints about Web Mercator are fair, such as that it
isn't really conformal.  But the idea that there are 10s of km of errors
is not true.

It is true that if you take a point and compute coordinates in web
mercator, and then you also compute coordinates in a projection that is
true mercator with the GRS80 ellipsoid, and otherwise the same, that you
will get coordinates that differ.  But this is not an error, any more
than converting to UTM and to true mercator get you different
coordinates.

I have taken accurate WGS84 coordinates, converted to geojson, and
displayed them in a web map made with leaflet against orthoimagery
published by MassGIS (my state government GIS agency) and gotten
agreement at the 15 cm level.  So the idea that there are necessarily
multiple km of "error" just does not make any sense.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20221110/8ccda4af/attachment.sig>


More information about the PROJ mailing list