gboeing / ppde642

USC urban data science course series with Python and Jupyter
https://geoffboeing.com
MIT License
1.26k stars 487 forks source link

Transformation between coordinate systems #7

Closed kreamas closed 5 years ago

kreamas commented 5 years ago

Hi Geoff,

First of all I want to thank for sharing your expertise, it's unvaluable.

I'm working with Google Maps API and as backend I'm using Python (Django as my framework). I've used your code to transform my data to GeoJson and then trying to use it with Google Maps Data Layers.

When trying to visualize my GeoJson in Google Maps nothing is being shown and after a silly research I've noticed that I'm using Lat Lng coords such as [-28, 137] (a place somewhere in Australia).....however GeoJson coordinates expect coordinates in another specific system in something like this [123.61, -22.14] which is the same place in Australia.

https://developers.google.com/maps/documentation/javascript/datalayer

Do you know what is the GeoJson system for coordinates? Is it possible to make such transformations in python?

Thanks in advance.

gboeing commented 5 years ago

Do you know what is the GeoJson system for coordinates?

The coordinate reference system is described here: https://developers.google.com/maps/documentation/javascript/coordinates

Is it possible to make such transformations in python?

Yes you can easily project to any desired coordinate reference system using Geopandas