0
$\begingroup$

Edit: there were issues with the original csv file linked below, I've uploaded another csv file of a slightly modified dataset. I've also updated the info regarding the fields in the csv file accordingly.

This question is a continuation of this post: Controlling polygons by index value, from list of vertices (sverchok addon)

I am trying to display polygons of several continents in blender using the sverchok addon. These polygons are stored as a list of vertices (csv file), where each row contains the following information:

  • fid = index of all the vertices in the list
  • CONTINENT = name of continent
  • vertex_part_index = index of the vertices unique to each polygon
  • index_continent = index of continents (1 through 5 for Africa through South America)
  • x = x-coordinate of vertex (longitude, in decimal degrees)
  • y = y-coordinate of vertex (latitude, in decimal degrees)

Using these vertices, I would like to show each each polygon (in other words, create separate ngons with the list of vertices, based on the vertex_part value). Here are two ways to do so, when dealing with only two polygons (from the post linked above):

enter image description here

Credit to @nikitron for this setup

The first image above shows a node setup that works on a 1 to 1 basis, where 1 node tree can display 1 polygon (i.e. one node setup for Africa mainland, one node setup for Madagascar). The second image above shows a node setup that works on a 1 to 2 basis, where 1 node tree can display 2 polygons, but not more than 2.

My question is, how can I display all of these polygons at once? Without having to copy the first node setup for each polygon.

Here is a link to the (corrected) csv file: https://drive.google.com/file/d/1KLtZVi-uywQU9-l8INUDZbByLWPtH1KT/view?usp=sharing

Appreciate all the help. Thanks,

P.S. I also apologize that the geometry of these continents is not completely correct. For instance, Russia is lumped into the rest of Europe rather than being split into Asia as well. Please ignore the various errors in the geometry.

$\endgroup$
1
  • $\begingroup$ Russia situates in Eurasia continent. There is no water between. So concept of separate Europe is fiction for politic aspect and Russia makes it prove that no separation in continents between Europe and Asia, it is all one. $\endgroup$
    – nikitron
    Commented Apr 15, 2021 at 10:54

1 Answer 1

1
$\begingroup$

there is something wrong with data or representation - extra islands appears and it have to be additionally separated as closed polygon. so, data about one country covers all its parts

enter image description here

$\endgroup$
3
  • $\begingroup$ for example, Madagascar consists of some other islands that is not ok $\endgroup$
    – nikitron
    Commented Apr 15, 2021 at 11:42
  • 1
    $\begingroup$ Ok, thanks for looking at this, I will go back through this dataset and find out what is wrong. It will probably be 1-2 days before I can really dive into the data, but I appreciate the help through these questions. $\endgroup$
    – MarcusR
    Commented Apr 16, 2021 at 2:55
  • 1
    $\begingroup$ Hi @nikitron, I updated the dataset. I believe the various indices were incorrectly generated when I processed this data in GIS, my apologies. The updated csv file consists of vertices for 5 polygons, of Africa, Asia, Europe, North America, and South America. $\endgroup$
    – MarcusR
    Commented Apr 18, 2021 at 18:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .