Advice on how to do solve a project needed [thanks in adv]

grasshopper

#1

Hi forum.
I am trying to solve a project. I might be a little bit burn from the week, but I can not exactly figure it out how to solve it.

I have the coordinates of two points on earth. I need to find the line that connects those two points on the planet. The line will be extended till it find itself again. Meaning I will get a section of the earth defined by an elipse that touches those two points. The challenge comes here:

I need to find which countries the line crosses. So far I think I know how to get the line that crosses two points on a sphere. So I am guessing this is not a “model” task, but a mapping one and finding the countries through a texture of the planet applied to the sphere in rhino.

What It could be easier is to have a 3d precise earth model in Rhino an avoid texturing. I found bunch of them made with polys, but I guess to find intersections and angles on Modo (in my case) will be a hassle.

If anybody has a tip or a idea of how to do this or where can i find a precise model of the earth in 3DM that might help.

Thanks a lot for your time.

Bruno


(Laurent Delrieu) #2

Here a part of the solution, it uses @it to read a shpaefile of earth


Earth shapefile borders are on internet
http://thematicmapping.org/downloads/world_borders.php

The borders of earth are put on a sphere with a given radius.
I also use Custom Preview from Human to get a textured earth.
Image from

I trace a Geodesic between the 2 points and search intersection. To have all the intersections change Rhino tolerances to 10 to intersect geodesic and borders (polyline).


Country code here in English
https://unstats.un.org/unsd/tradekb/knowledgebase/country-code

earth_shapefile.gh (22.3 KB)

If you want to prolonge the “line” which is an arc on a spheric earth it will give you a circle and not an ellipse !!!

The version that cuts the planet !!


earth_shapefile_country_on_ellipse.gh (21.0 KB)


#3

Thanks a lot , its great to have this community. Unfortunately…the client…is lost…:frowning: