Grasshopper

algorithmic modeling for Rhino

Several people have asked about converting latitude/longitude to a point within the OSM space that Elk creates and it's something I intended to add to Elk whenever I had time for a proper update, but unfortunately I've been pretty busy with some other work and haven't had much time to devote to Elk in recent months.

To make up for it somewhat I just wanted to provide this user object that will convert latitude and longitude to a Point3d within the boundary domains of the OSM file that you're using.  It also outputs this boundary so you can better see it as the points of the OSM data tend to extend past it.

It should handle different units just fine and it assumes you're feeding it separated values for latitude and longitude (similar to this previous discussion).  The lat/lon values can be single values, lists of values, or data tree structured lists.  As long as the branching lines up between latitude and longitude it should work.

Views: 2113

Attachments:

Replies to This Discussion

I needed the opposite transformation. From Xval/Yval to Lat/Long this so I re-purposed your code. Leaving it here for anyone who needs it.

Attachments:

I'm on a Mac with Grasshopper where it seems not possible to drag the .ghuser file into Grasshopper. Could you share the code/nodes in .gh file?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service