[PROJ] WGS84(Natural Earth data) to sphere

Javier Jimenez Shaw j1 at jimenezshaw.com
Thu Nov 10 08:57:04 PST 2022


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.

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.
.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
Entre dos pensamientos racionales
hay infinitos pensamientos irracionales.



On Thu, 10 Nov 2022 at 16:38, Gonzo Bard <gonzo.bard at gmail.com> wrote:

> > Why do you want to convert the points to an sphere? GeoJSON is also
> defined in WGS84
>
> GeoJSON data is rendered in the browser using projections:
> Web Mercator - https://github.com/d3/d3-geo#geoMercator
> Stereographic North - https://github.com/d3/d3-geo#geoStereographic
> According to the developer of the projection engine, it is expected that
> geographic points transferred to the projection lie on a sphere:
> https://github.com/d3/d3-geo/issues/265#issuecomment-1234323369
>
> On the other hand, the data I want to place on the map is only prepared
> under the assumption that the planet is a spheroid.
>
> Based on NGA research:
>
> https://web.archive.org/web/20141009142830/http://earth-info.nga.mil/GandG/wgs84/web_mercator/(U)%20NGA_SIG_0011_1.0.0_WEBMERC.pdf
> see Figure A1 – Latitude versus Absolute Projection Difference (in
> kilometers)
> I came to the conclusion that the users of my application can be
> significantly misled (up to several tens of kilometers).
>
> чт, 10 нояб. 2022 г. в 18:11, Javier Jimenez Shaw <j1 at jimenezshaw.com>:
>
>> Why do you want to convert the points to an sphere? GeoJSON is also
>> defined in WGS84
>> .___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
>> Entre dos pensamientos racionales
>> hay infinitos pensamientos irracionales.
>>
>>
>>
>> On Thu, 10 Nov 2022 at 11:24, Gonzo Bard <gonzo.bard at gmail.com> wrote:
>>
>>> Greetings to all!
>>>
>>> I use Natural Earth data:  https://www.naturalearthdata.com/downloads/
>>> > All Natural Earth data use the Geographic coordinate system
>>> (projection), WGS84 datum
>>> That is, Natural Earth data are points on an ellipsoid.
>>>
>>> To display geographical data on the map, I pre-convert it from Shapefile
>>> to GeoJSON.
>>> To do this, I use the ogr2ogr program (GDAL library).
>>> In ogr2ogr there are conversion options:
>>> from -s_srs
>>> https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-s_srs
>>> to -t_srs https://gdal.org/programs/ogr2ogr.html#cmdoption-ogr2ogr-t_srs
>>> .
>>>
>>> If I understood correctly, the GDAL project uses OSGeo / PROJ as a
>>> projection library.
>>>
>>> Please tell me what the values for -s_srs and -t_srs should be in order
>>> to perform the conversion:
>>> points located on an ellipsoid (WGS84 datum) ===> to points located on a
>>> sphere?
>>> _______________________________________________
>>> PROJ mailing list
>>> PROJ at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/proj
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20221110/968e988b/attachment.htm>


More information about the PROJ mailing list