14

I'm pretty new to GIS and I've learned about both the geographic coordinate system, which defines a location on a 3d model of the world and the projected coordinate system to map this to a 2d surface and I thought I had a decent grasp of it.

Other questions like Is WGS84 a Coordinate system or projection system? explain that EPSG:4326 / WGS84 is the first (coordinate system) and not the latter (projection).

And that's why I'm confused about this page in the openlayers example: https://openlayers.org/en/latest/examples/reprojection-wgs84.html

Here they explicitily talk about the WGS84 as a projection:

This example shows client-side reprojection of OpenStreetMap in WGS84.
...
new View({
    projection: 'EPSG:4326',
    center: [0, 0],
    zoom: 2,
  }))

So I'm a bit confused by this, can someone explain what is meant here?

3
  • They talk about "reprojection", action to convert coordinates in a coordinate system (I think here the Pseudo-Mercator 3857) into an other (here the WGS84 4326). Commented Feb 16, 2021 at 21:57
  • Probably should be "unprojection".
    – TomazicM
    Commented Feb 17, 2021 at 8:19
  • 1
    As stated by @alphabetasoup EPSG:4326 is indeed not a projected CRS, but taking a set of longlat values and plotting them on cartesian graph (e.g. scatter plot in Excel) is a projection, albeit a non-standard one. Perhaps, Openlayer's implementation can be interpreted as: if EPSG:4326 is specified as a projection, OL will handle it in some manner. So this can be seen as a technical decision rather than a definition.
    – prusswan
    Commented Jan 18, 2023 at 5:41

2 Answers 2

16

You've got a good grasp of it. EPSG 4326 (i.e. WGS 84) is not a projection. But if you don't associate a projection to this geographic coordinate system, and naively render the coordinates as x/y coordinates on a grid, you do get something that is sort of a projection: the pseudo plate carée (equirectangular) projection. (This is not the same as an actual plate carée projection with a WGS 84 GCS, as this would have units in metres, not degrees). This is a rather lazy habit that everyone is in, but it's also quite convenient. When people refer to rendering data "in EPSG 4326" without further information, this is 99% of the time what they mean (and 70% of the time that is the limit of their conceptual understanding of the matter, anyway... coordinate systems and projections are hard).

You can be lazy like this if you just want to draw things on a map and look at them, or for passing data between applications, but it is not particularly useful for lots of important things (accurate representations of shapes, measuring distances, etc.), at which point you would need to start working with non-pseudo projections.

4

This openlayers example is a bit confusing.

Most webmaps display in "Web Mercator" ie. 'Google Maps-style' projections - EPSG / SRID: 3857

OpenStreetMap data is collected, stored, and distributed in 'unprojected lat/lon' aka WGS84 - EPSG / SRID: 4326.

However, local data for administrative organizations are projected to State Plane zones or UTM zones (traditionally by "GIS" practices, though we store our data in WGS84 and project using PostGIS st_transform() when we need units in feet).

Openlayers has the ability to project your webmap to any coordinate system, and I believe this example is showing how to do that given any of the data storage coordinate system issues noted above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.