acleland / turtle-graphics-map

Uses data from a csv to draw a map with python's turtle graphics.
MIT License
0 stars 0 forks source link

coordinate system used to create oregonmap.csv? #1

Open aecryan opened 3 years ago

aecryan commented 3 years ago

Dear acleland,

I really enjoy working with your script in turtle and am interested in using it to demonstrate simple mapping with Python with a group of novice learners. Our goal is to create maps for other states and for the Netherlands, where we are based. :) My question is which coordinate system you used to generate the data in the oregonmap.csv file? I notice that they are not longitude and latitude, so am wondering if there is a transformation I can use to plot a map for other locations? I would really appreciate your help! :)

acleland commented 3 years ago

Hi Ashley!

I'm glad my code has been useful for you! Unfortunately though this was for a school project I did years ago, and I don't remember details about the coordinate system. If I remember correctly, I think my professor provided us with the csv files, so I don't think I was involved in the choice of coordinate system. They might be fairly arbitrary coordinates. I'm pretty sure they assume a flat 2d map, so unlike longitude and latitude, the earth's curvature is not taken into account in these coordinates. So for your project, you could just make up your own coordinate system, choosing a location you want to be the origin (0, 0). And then base other locations based on distances from the origin.

Hope this helps, let me know if you have any other questions

Best wishes, Andrea

On Thu, Mar 4, 2021 at 3:37 AM Ashley Cryan notifications@github.com wrote:

Dear acleland,

I really enjoy working with your script in turtle and am interested in using it to demonstrate simple mapping with Python with a group of novice learners. Our goal is to create maps for other states and for the Netherlands, where we are based. :) My question is which coordinate system you used to generate the data in the oregonmap.csv file? I notice that they are not longitude and latitude, so am wondering if there is a transformation I can use to plot a map for other locations? I would really appreciate your help! :)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/acleland/turtle-graphics-map/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB662QRAGC6B7VD3AXPE6HDTB5WHZANCNFSM4YTCUODQ .

aecryan commented 3 years ago

Dear Andrea,

Thank you so much for your reply! I am fairly new to working with geospatial data in Python, and really appreciate the additional information. Would you happen to have any references or suggestions about how to create a custom coordinate system from lat/long coordinates? Is it as simple as selecting the (0,0) point (say, 40.7128° N, 74.0060° W for NYC) and using subtraction to get coordinates based on distance for each new geographic place? I.e., new_point_latitude - origin_latitude = newpoint_lat_coordinate (and same for longitude)? Apologies for the basic nature of the question - I am a data manager working for the first time with geographers :)

Best, Ashley

acleland commented 3 years ago

Hi Ashley,

Yes, you could do it that way. You could also just straight-up use longitude and latitude without changing the origin if you want. Either way, your map would end up being equivalent to the Mercator projection, which is the standard world map you see that makes Greenland look humongous. Google maps uses this. The only problem with this is that distances are pretty badly distorted, especially towards the north and south poles. If you're okay with that, then I think your idea should work. May I ask what purpose are you using these maps for? I'm curious.

Best wishes, Andrea

On Mon, Mar 8, 2021 at 12:44 AM Ashley Cryan notifications@github.com wrote:

Dear Andrea,

Thank you so much for your reply! I am fairly new to working with geospatial data in Python, and really appreciate the additional information. Would you happen to have any references or suggestions about how to create a custom coordinate system from lat/long coordinates? Is it as simple as selecting the (0,0) point (say, 40.7128° N, 74.0060° W for NYC) and using subtraction to get coordinates based on distance for each new geographic place? I.e., new_point_latitude - origin_latitude = newpoint_lat_coordinate (and same for longitude)? Apologies for the basic nature of the question - I am a data manager working for the first time with geographers :)

Best, Ashley

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/acleland/turtle-graphics-map/issues/1#issuecomment-792583934, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB662QT7K3HXPAXCA6JI4MDTCSE7JANCNFSM4YTCUODQ .

aecryan commented 3 years ago

Dear Andrea,

I was very curious in solving this challenge so I spent some time earlier this week creating a custom coordinate system with a (0,0) point and other points referenced around it. It worked!! I successfully was able to create a map of the Netherlands to use during a demonstration with students from the university (TU Delft) where I work.

If it's alright with you, I can share the NL data file I used via a PR - if you are curious you can check it out that way. :)

Myself and my co-instructor found your code perfect for demonstrating how to programmatically create a simple map in Python without setting up an environment/importing libraries and to illustrate OOP - we will be doing a demonstration of using it with the Netherlands data next Tuesday with about 15 beginner learners (of course with proper credit attached). Thank you for getting back to me and for your suggestions which really helped!

Best, Ashley