I am trying to display multiple polygons, from a list of vertices, in blender using the sverchok addon. For this project, the polygons are Madagascar and the rest of Africa. Here are the project files, which include the blend file, list of vertices (csv file), and screenshot of node setup: https://drive.google.com/file/d/116p-ee0Kfepi6Bimn28tdLYf-3kKryQD/view?usp=sharing
The csv file has the following columns (relevant columns are bold):
- fid = index of all the vertices in the list (ranges from 1 to 405 for the 405 total vertices in the list)
- CONTINENT = ignore this column, was generated earlier in GIS, should not be relevant now
- Geom2 = ignore this column, was generated earlier in GIS, should not be relevant now
- vertex_index = index of the vertices unique to each polygon (ranges from 0 to 355 for the 356 vertices making up mainland Africa, then ranges from 0 to 48 for the 49 vertices making up Madagascar)
- vertex_part = index of the polygons, 0 = Africa (mainland), 1 = Madagascar
- vertex_part_ring = ignore this column, was generated earlier in GIS, should not be relevant now
- vertex_part_index = same as the vertex_index column
- distance = ignore this column, was generated earlier in GIS, should not be relevant now
- angle = ignore this column, was generated earlier in GIS, should not be relevant now
- x = x-coordinate of vertex (longitude, in decimal degrees)
- y = y-coordinate of vertex (latitude, in decimal degrees)
Using the sverchok addon, I was able to get a working node setup:
Where the vertices are filtered by the vertex_part value. However, in order to display both polygons I had to duplicate the node setup, and change the vertex_part value for the second node setup (i.e. the only difference between the Africa and Madagascar frames is the Y value in the "Equal" logic node).
So, my question is, is there a way to filter/display/list the vertices so that I do not have to duplicate the node setup for every new polygon?
Although duplicating this node setup isn't much trouble for only a few polygons, I would like to work with larger datasets with many more polygons. For instance, duplicating the node setup would not be feasible if I were working with world-wide country data.