I’m posting to share a new grasshopper plugin I have been developing for extended GIS data support and interoperability. The big idea behand BearGIS is to enable export of geometry and accompanying attributes to GIS data formats.
The primary functionality has been implemented but it is not 100% complete. It is hosted on Github at the moment and will make its way to food4rhino after a bit more development and cleaning. If you are a developer and choose to look at the code… it’s messy. I will be cleaning things up and conforming to best practices once I wrap up implementing some additional functionality.
Current Highlights:
Write ESRI standard GeoJson files for easy interoperability with Arcmap and ArcGIS
Read ESRI GeoJson for easy import of data into rhino from ESRI platforms.
Read .SHP files into grasshopper (this is currently a bit slow and needs some work to speed up)
To Come:
Export standard GeoJson for easy web uploading
Import GeoJson - the more common geojson standard (Though I believe others have developed this already)
Export .SHP, preferable to Geojson for wider gis platform support
The shapefile export works perfectly. For who doesn’t know what to plug in the field “.prj File Path”, it’s the Coordinate System desired. To have that, you can:
Go in ArcMap > in Table of Contents, double click the “Layers” > Coordinate System > search the one that you wish, Right click > Save as…
This will make you have the .prj file.
And @Nicolas_Azel, just one observation: It would be interesting to control the field type, so you could choose between string, double, integer…
An new update has been made to bearGIS’s .shp export functionality to support field types.
The current functionality for fields is to default to string unless specified within the fields input. To specify the desired type, follow the field name with a semicolon and the corresponding .net type.
Example: myFieldName;System.Double will create a data column named ‘myFieldName’ of type ```double``
I’ve attached a Zip below with the most recent version of the plugin and examples. BearGIS Example.zip
Note that prior to this version BearGIS did not support GeoJson only ESRI formatted JSON. For alternative GeoJSON support in Grasshopper you may want to consider Decoding Spaces Plugin
Posting that a new version has been pushed that includes more GeoJSON exporting tools and Projection tools for Points to Lat Lon as well as between two projection systems.
hi @Nicolas_Azel, Thks for Plugin. But I can not understand the “PRJ file path” and “Filepath” in this Component
so I have an issue with the image, can u help me? thank you!
Hi @theanhtran1996, the prj file sets the projection system for your export and the file path sets the destination for the .shp. Both are required for the export component.
It looks like the component is having a hard time finding your .prj file. Perhaps the file path is incorrect. From the image, it seems like you might be missing an extra back slash '' for your PRJ folder in the concatenation? Using the ‘File Path’ component to set an existing file may help to avoid typo’s in the file path.
Thank you for your interest in beargis. I’ve recently published a new version for Rhino 7 and Rhino 8. These are available on the package manager and through the projects github. These may solve some of the issues mentioned above.
Hi @Nicolas_Azel, I am quite interested in the export to .shp file functions you have developed. However, once I install and try to run the example script you provide, I do get the following error on the export component:
Solution exception:Could not load type ‘System.ICloneable’ from assembly ‘System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.
the latest version of BearGIS 2.1.1 targets .NET Core 8 - you can set this with the rhino command SetDotNetRuntime.
Older versions of BearGIS were built against .NET Framework - so you could try and see if an older version works for you if your committed to .Net Framework for other plugins.
Thank you for getting back with a reply to my issue.
I believe you are right about the .NET runtime. I was having issues with the .NET Framework vs .NET Core across various plugins, and in the end I needed a clean install of Rhino 8.
Now the BearGIS components does seem to run properly