Geojson Generation


this is a site for simulation, where the latitude and longitude is 22.4672 and 113.9840 respectively. Also, the reference point of the model is indicated in red cross.
In ideal case, the model should be located around the circled reference point in the geojson io.

However, after plotting the geojson from Rhino, the model is offset, which is far away from the expected site like that:

Therefore, what should I do

Hi @yinlong,

Ladybug tools is not a GIS application. The location settings are only used for calculating the sun position. If you want to use grasshopper for geolocating you can use HERON. You can download the latest version of HERON with the package manager.
For HERON you can better ask questions on the McNeal forum. https://discourse.mcneel.com/
With the HERON plugin you can set the earth anchor point in Rhino. After that you can import all sorts of geodata, which will be translated to the centre of your drawing (0,0,0).

Heron has also tool for retransforming you (x,y) coordinates to geo coordinates.


heron earth anchor point.gh (33.9 KB)

1 Like

thanks for your advise, but why the tutorial uploaded on YouTube ( (40) Dragonfly : Creating a GeoJSON from the Dragonfly Model - YouTube) can anchor the geojson model with the smallest offset without using HERON?

1 Like

Hi @yinlong
Thank you for pointing this out. I was not aware of this possibilty.

therefore, is there any methods which does not require to use heron?

also, from your givne grasshopper file, it is require HERON 0.4.0. Seems Rhino cannot downlaod this plugin automatically on my pc and hence want to install it manually. However, in the rhinofood, i only find the HERON 0.2.0. Therefore, where should i download?

You can use the package manager in Rhino.
afbeelding

Hi @yinlong ,

I apologize for the very late response. It looks like you are setting up the location correctly but your reference point might not be correct. The two of these inputs need to be coordinated if you want the GeoJSON to be placed correctly on the globe. Granted, both of these aren’t likely to influence your simulation as long as you’re roughly in the right place. In any event, I know a lot of time has passed but, if you upload your Grasshopper definition, I can likely help you export it to the correct place on the globe.

Also, thank you, @Erikbeeren , for trying to answer the question and I agree Heron is a good package. I would definitely recommend that or Elk for anyone who is generally trying to deal with GIS data in Grasshopper. There are some built-in functions of Dragonfly that help export Dragonfly Models to a GeoJSON format and this is what @yinlong is asking about. It’s a very minimal implementation of GIS capability but you can see the module that performs the conversion to latitude/longitude here: