How to turn a 2D map into a 3D Globe in Grasshopper?

Hi All,

I have a 2D map (a shapefile), which I have plotted some points on using the countries Latitude and Longitude but I want to make it 3D on a globe/sphere…How might I do that? I want to be able to continue to plot onto it after its a globe as well, If that’s possible?

World Air Pollution Map.gh (15.0 KB) List of Countries 301220cb.csv (28.2 KB)

Link to World Map Shapefile

@Joseph_Oster


Note that “xy” and “z” inputs are set to “Degrees” (Do right click…)

2 Likes

This is going to be a problem:

  1. Error while parsing ne_50m_admin_0_countries: The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine.

As in the grid thread, your .csv file contains quoted values that are comma-delimited - doesn’t work!

  1. “Hong Kong SAR, China”
  2. “Yemen, Rep.”

The mystery value in your cyan group, 6944.1, is from the “Hong Kong SAR, China” row, possibly corrupted by the comma within quotes?

The red Division component in your GDP% group is likely data corruption? I haven’t managed to isolate it yet.

  1. Text could not be evaluated as an expression

P.S. Ireland has a trailing space and missing value in the csv file:

Ireland,IRL,10.41,10.15,10.14,9.92,9.98,8.67,8.28,8.21,53.41291,-8.24389,1162823,4701957,68.25,14.197104764829400,

For some reason, I’m not able to see the quotation marks in my file, so I don’t know how to remove them.

It’s in the column for Density but somehow affecting the column for Deaths(2015) in grasshopper, I’ve been trying to fix it but don’t know how.

Thank you Riccardo, that’s very helpful.
But is there a way to make it solid, so you can’t see through it?

And…the countries shape file would also need to be a sphere so it looks like a globe. Do you know how to do that by any chance?

Those indeed are just points.
If you want a solid, just create a sphere with the same radius (or a bit smaller to avoid intersection).

What is your final goal?

I fixed my copy of the csv file and will post it.
I added a yellow group to fix the errors in the GDP% group.

Also used @maje90’s polar point trick to map the location labels and circles to a sphere.


World Air Pollution Map_2020Dec30a.gh (33.6 KB)

Modified csv file:
List of Countries 301220cb.csv (28.2 KB)

1 Like

To represent Earth in Grasshopper I usually use a textured Sphere (ellipsoid if you want)
I use Human plugin “Custom Preview Material” and a texture of the earth Equirectangular projection, X°=1 pixel.

You’ll have to make a Pi rad (180 deg) rotation as the 0 meridian is typically on the middle of the image. You’ll have also to choose the Earth radius.
But you can also do that inside Rhinoceros.
earth.gh (5.8 KB)
And with Riccardo explanation you can add whatever 3d object you want.
I did Earthquake and flight vizualisation


1 Like

6371009 units (meters) for earth radius? (!!) Rather extreme for a data display model.

Hello
not extreme at all for vizualisation, I do all my “real” simulations in meter. I am able to see satellite trajectories up to geostationary orbit (standard unit is the meter)
I also do all clipper intersection with huge polygon size (1000 km) you just have to put a tolerance like 1 m.
I use the “zoom” function of Grasshopper to find my model.
Middle click and Zoom
image

It is just a matter of knowing the limitation of the software.

a geostationary orbit, r = 4.23×10^7 metres

I just don’t see any reason for that at all, especially knowing that Rhino has trouble with extreme coordinate values. But yeah, “knowing the limitation of the software” you can get away with it I guess.

If you can internalize the ‘Curves’ and ‘Regions’ output of Import SHP we might give it a go but I can’t help thinking that a spherical mapping of land masses and countries (as curves) must be availavle?

You are right if you speak of Rhino Geometry calculations (mesh which are float by default, …).
But for vizualization I use tools that are making calculations in meter and it is more simple to not make other scales changes. If you look at Nasa files for comparisons of tools all units are feet or meter

And I don’t forget that at my beginning I had problem with intersections just because I didn’t knew about the tolerances.

Hi Riccardo,

I’m trying to get a globe similar to this:

Thank you Joseph,

Is there a way to do something similar with the shapefile so that it wraps around a sphere somehow?

I think you are moving the goal posts and grasping at straws. 231 country labels in the equatorial plane with no correlation to longitude? Why bother?

The white group (below) uses longitude only (latitude 0) to lay out country labels but as you can see, they overlap (as expected).


World Air Pollution Map_2020Dec30b.gh (22.9 KB)

I hope you’re here to learn and not just get people to do your work for you? I’m beginning to wonder.

P.S. Maybe I answered the wrong question? I already said this a few posts back:

If you can internalize the ‘Curves’ and ‘Regions’ output of Import SHP we might give it a go but I can’t help thinking that a spherical mapping of land masses and countries (as curves) must be available?

1 Like

Geopolitical Globe 3D Model, $30

1 Like

Hi Joseph,

I found globes similar to those previously but I wasn’t sure how to geo-reference them as I need to plot points on them using the countries lat/long. That’s what I’m trying to understand how to do.

So I thought if I had the shapefile with points plotted onto it I would be able to somehow wrap it around a sphere in grasshopper. But you’ve mentioned:

which it is what I’m currently trying to do.

I hope you noticed that I posted a model three hours ago that does that? (without country boundaries)

This idea of putting country labels on the equatorial plane (instead?) is a new wrinkle.