Open Street Maps to Grasshopper using C# & Visual Studio

Maybe you have some tips for tutorials, that show how to create a custom C# component using Visual Studio Template and connect this component to open-sourced maps, i.e. Open Street Maps.

For example I would like to create component from scratch, that will show which amenities I can find in certain area of the city.

I’ve tried to use Gismo, but the plug-in doesn’t have all the functionality, that I need. So my plan is, to create all the components I need using C# and Visual Studio template.

I’ve downloaded the template from here: Release 7.13.0 · mcneel/RhinoVisualStudioExtensions · GitHub

Thank you in advance for any tips!

Hi @Alena_Mishkevich ,
if you have zero experiences in creating components in C# for GH, it probably would be good to learn the basics before you move to a more advanced topic(like the OSM thing).
There are plenty of resources of that topic, some of them you can find in this thread:

Luis from parametric camp is showing exact this topic (very detailed) these days here.

Also, learning c# is very fun, but if you just want to expand Gismos abilities, maybe @djordje could help on this.

1 Like

Hi @Alena_Mishkevich ,
I would second Baris’ comment.
Which kind of amenities search are you looking for?

Hi @Baris Thank you for tip! I’ve already watched the videos from parametric camp and finished some courses about c# syntax, methods etc.
So I am ready to move to the next step and start working with OSM. Therefore I am looking for some related to this topic tutorials or courses

Hi @djordje
Thank you for your replay!
I’ll give you an example of what I am looking for:

  1. a region in the city (could be polyline, could be list of coordinates of the boundaries or something else)
  2. Location (a point or coordinates)
  3. list of all the amenities I can find in the region
  4. Distance from the point (input) to each amenity

Therefore I need to know how to use Open Street Maps to create a custom Grasshopper Component.

Since your question about how to use the template I supposed you haven’t watch any tutorial on this. Sorry

Hi @Alena_Mishkevich ,
Check the attached file.
It requires Gismo and ShortestWalk grasshopper component.
It sadly can not find all amenities within defined rectangle, but only those which you define to search:

closest (184.5 KB)

1 Like

If you @Baris didn’t understand my question, it is not the reason to tell, that I have lied…

Anyway I’ve found a helpful tutorial how to connect API to a C# template in Visual Studio. I’ll try to apply this on Grasshopper C# template and Open Street Maps.

For some, who need this information, here is the tutorial:

Thank you, it definitely will be helpful!

1 Like