I am trying to draw the layout of a building and project them to a web map using Django and Leaflet. I am using a satellite image to get the correct latitude and longitude and then I send the coordinates via an API. The process in short:
- Get lat/lon from a satellite image
- Send coordinates to webmap with SRID 4326
- Display the outlines
My main problem with almost all my coordinates is that the Google Maps satellite layer is not congruent to the street view. For example let's say I pinpoint
lat: 50.11843503887959 and long
8.63194562490686 to Google Maps. I get the following image in satellite view:
Note that the point is exactly on the edge. But if I change the layer to the normal map view I get this result:
Note that the point is about 1cm to the right within the building. This happens to almost all buildings I am trying to pinpoint. Sometimes it's to the left and sometimes it's to the right.
I read here EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet, that:
- Google Earth is in a Geographic coordinate system with the WGS84 datum. (EPSG: 4326)
- Google Maps is in a projected coordinate system that is based on the WGS84 datum. (EPSG 3857)
Thus, I went ahead and transformed the satellite coordinates EPSG: 4326 to EPSG 3857 and sent those to my database. It gives me the same derivations.
I assume that since the Earth is round and a map is flat those derivations exist, but I am not sure.
Plus I somehow need to iron out these differences. Is there a way I can get coordinates of a building from a satellite layer to map the outlines of the same building on the map layer? If so, how could I do it?
(Had this on SO (https://stackoverflow.com/questions/66366572/) first but removing it there since it might be better suited here)