How to retain layer information in Shapefile to Rhino

So I’m trying to import land use GIS information into Rhino but I need the layers for each category. I tried doing a little bit of digging around how this could be possible and ended up downloading gismo. I have no idea how to use the plug-in so I want to ask if it’s even possible, or if anyone has any advice on it?

https://borealisdata.ca/dataset.xhtml?persistentId=doi:10.5683/SP3/1VMJAG
this is where i’m getting my data, and I’m using QGIS to access it, but if there’s a way to import the data while retaining its layers, that’ll also work fine.

Thanks in advance

Hi @user1919,

I use Heron (package manager) in combination with Jswan.

The import vector light from heron gives you a list of geometry with coresponding attributes.
You can use whatever attribute to generate layers.

I tried downloading the plugin but on the website it only has it on Rhino 5 and 4, I have Rhino 7. I found something on GitHub, I downloaded the zip file but it doesn’t even have a .gha inside.
https://heron-mc.org/downloads.html
I also tried going here but for some reason nothing happens when I press download for the latest version. What source did you download that plug in?

It’s best to grab Heron from the Package Manager in Rhino. As a backup source, releases are also posted to Heron’s GitHub repo here:

Interesting to see there’s another tool by the name of Heron for mapping with JavaScript, I had no idea it existed.

-Brian

1 Like

Hi, thank you I finally got it to load in.

Hi,

Do you mind telling me telling me what file type is it supposed to be in when I set file path?

You can set the file path to the SHP file type for the ImportVector or ImportVectorLite components. These components can also import other GIS vector types, but it appears your data is in SHP format. If you’d like to import georeferenced raster TIF files, use the ImportRaster component.

If you use the ImportVector component, it’s best to set the EarthAnchorPoint first with SetEAP. You can also clip the data with a boundary curve.

20240308_Toronto GIS Import.gh (5.5 KB)

-Brian

from the website I downloaded, its not the linework I’m trying to extract, its the land use information in different layers I’m trying to get onto Rhino

using Urbano so far is the only one that showed anything at all for me, but I still can’t get them in layers.

With Heron, I’m not sure why whatever file I’m directing it to is not working. (AutoCAD Shape Source should be a the SHP file) Did you take that directly from the website?

Hi @user1919

Heron outputs featured geometry. The output are meshes. For each mesh there there is a bunch of key value pairs. You can use Jswan the get an overview ( see picture I posted befor).

If you want to bake then in layers you can use elefront or pancake

Digging in a bit more, I went ahead and downloaded the GDB file from the website. Once you have this, you can use Heron’s Ogr2Ogr to parse out individual shapefiles from each of the 27 layers in the GDB.

20240308_Toronto GDB to SHP.gh (5.3 KB)

A couple of things to note. First, this is a large dataset and took my machine about 4mins to process. Second, make sure to set a folder location as the dest input and make sure you have about 2.5 GB on your hard drive.

Once I had the layers, I found the “LanduseWCensusNoUnwantedClasses.shp” file had zoning information by parcel. After importing, I color the resulting meshes by the “Class_name” field.

Aside from being a large dataset, I’m not sure why it’s taking so long to import the geometry given QGIS’s speed in doing so. Something for me to look into deeper.
20240308_Toronto GIS Import2.gh (14.2 KB)

Alternatively, can you post a zipped version of your “cut up land use.shp” file to test?

-Brian

1 Like

Hi @user1919 ,

To install Gismo, follow these installation steps.

Then just use Gismo’s “Read shapefile” component to open your AutoCAD Shape Source .shp file.

1 Like

Thank you for all the help, and yeah its a pretty big file, I can’t post it since its over 20MBs, but I can give you a good drive link to access the file. TorontoLanduse Corrected.zip - Google Drive

After all that I don’t know why my files are not running valid through Heron components. It keeps showing up the “1. Solution exception:The type initializer for ‘OSGeo.OGR.OgrPINVOKE’ threw an exception.” error,

some other times when i open the file this errror instead would also come up

20240308_Toronto GDB to SHP - new.gh (26.4 KB)

slighly irrelvant: This is the one when I tried using urbano
land use.gh (10.3 KB)

Hi @user1919 ,
Your TorontoLanduse Corrected.zip - Google Drive was read in Gismo without issues.
Here is the result:

Toronto land use 20240310.gh (53.3 KB)

Download the attached .gh file, and just change your PC’s location (folder) of the .shp file. And set the toggle to “True” to run the “Read shapefile” component. That’s all.

If you would like to make some other “coloring scheme”, then change the index input. In the upper screenshot I used index “8” which corresponds to “Class_name”.

I think it might be the program on my end.

I left the shape file in an isolated folder and just plugged it in, but when I ran it. Everything seemed like it was fine till I set the toggle to true. It first had the “1. Solution exception:global name ‘MapWinGIS’ is not defined” error, so I downloaded the latest version of MapWinGIS, and now it has the 1"Solution exception:Local variable ‘moveVector’ referenced before assignment." error. I might just try uninstalling my plugins or use a different computer and install it there.

update: after reinstalling my plugins, its still the same error

Hi Jaham,
If you click on the installation steps link from my yesterday’s reply:

The following page is opened. It states that you should install MapWinGIS 4.9:

The latest version of MapWinGIS is not supported.

Basically, you just had to click on that MapWinGIS v4.9.6.1 x64 link, and the download would start immediately.

As for your reinstall: you used regular Windows uninstall functionality?
Probably this has not removed all the latest MapWinGIS entries in Windows registry.
In that case, you have to use some custom uninstaller, like “Revo Uninstaller” demo version. For example.

As you see from my screenshot, your .shp file opens without issues in Gismo. Only the installation steps had to be followed.

Hi @user1919

I used the shp file from DABlockWLanduseV0120220106.shp


GIS.7z (1.8 MB)

The PINVOKE error can usually be fixed by loading Heron from disk. See this thread:

Also, when referencing the GDB folder location for the Ogr2Ogr component, try leaving off the last “\”.

Here is an updated definition referencing the Land Use Clipped SHP file you uploaded.
20240310_TorontoLandUseGIS.gh (30.4 KB)

@Erik_Beeren It would be nice if @user1919 was just interested in the Land Use layer you found. The windows side of my 2015 MacBook Pro is struggling with the larger datasets.

-Brian