Skip to content

Instantly share code, notes, and snippets.

@keum
Last active September 8, 2023 18:26
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save keum/7441007 to your computer and use it in GitHub Desktop.
Save keum/7441007 to your computer and use it in GitHub Desktop.
EPSG 4326 and EPSG 3857 of Web Mercator
EPSG: 4326 uses a coordinate system on the surface of a sphere or ellipsoid of reference.
WGS 84 - Earth as Geoid. -Mercator
EPSG: 3857 uses a coordinate system PROJECTED from the surface of the
sphere. Earth as perfectly sphere. -Web Mercator
Think of it as this way:
EPSG 4326 uses a coordinate system the same as a GLOBE (curved surface).
EPSG 3857 uses a coordinate system the same as a MAP (flat surface).
Convert GDAL to convert HARN NAD83 Washington North (EPSG of 2926) into Web mercator WGS84 (EPSG of 4326)
From NICK:
TileMill and Github are going to be using the same, Spherical Mercator.
EPSG4326 is Plate Carree (Geographic), meaning that it is NOT yet transformed to a projection.
You want your GeoJSON to be this. Leaflet likes this and does the projection to Web Mercator for you.
An interesting tid bit about 900913 is that it is GOOGLE in digits (like when you play with a calculator).
They did this until EPSG made them a valid projection.
web mercator NOT == spherical mercator
google mercator == Web Mercator (Auxiliary Sphere)
Loading data to Mapbox Studio/TileMill has to be in WGS 84, Mercator EPSG:4326
Once those data gets uploaded, it converts into EPSG:3857 WebMercator.
@keum
Copy link
Author

keum commented Nov 13, 2013

Adding EPSG 4326 definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment