Grasshopper

algorithmic modeling for Rhino

I'm trying to convert Rhino geometry into KML for use in Google Earth (see image). Does anyone know about how to flatten the coordinate system used in Earth into 2D? I've wound up on this page, but stopped to come ask the forum:

http://en.wikipedia.org/wiki/Universal_Transverse_Mercator

 

 

 

Views: 1560

Replies to This Discussion

Hi Chris,

The question is how accurate do you need to be? Lat long to UTM conversion is reasonably accurate but going UTM to Lat long gets worse results.

I've done quite a bit of work getting results from this recently and if you get nothing more helpful by Monday morning, when I'm back at work, I'll send you something.

Danny

Send it over!!!

 

Any reasonable approach will work for the moment. If more accuracy is needed then it can be pursued later.

 

Thanks!!!

Here is generating of Earth KML Placemark elements based on Rhino geometry:

(I'm bumping my own discussion with this image, just to try again to get input on my spherical-to-2d projection question!)

Hey Chris,

Cool stuff, we are working on some similar stuff.  I found this from David on the newsgroup...not sure if it will be useful.  Check it out.

http://news2.mcneel.com/scripts/dnewsweb.exe?cmd=article&group=...

 

Best,

Luis

On a related thread, I'm going to try to use the Parse XML component from gHowl to read KML files directly. (that's your project right?)

Freaky, I have no recollection of writing that at all. And yet it was only two years ago.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

This is an extract from a definition i did some time ago to import Google Maps data into Grasshopper:

 

Dim x,y,la,fi As Double

la = xlApp.Worksheets(i).Cells(1, 3).Value * math.PI / 180  

fi = xlApp.Worksheets(i).Cells(1, 2).Value * math.PI / 180  

x = la    

y = math.Log(math.abs((1 / math.cos(fi)) + math.Tan(fi)))

ptl.add(New Point3d(x * s, y * s, 0))

 

It read longitude/latitude values from a spreadsheet and projected them in 2d. The "s" variable is just a scale factor. It was used just for display purposes, so it looked good enough for that (it matched an underlying pictureframe with a screenshot of google maps) but i don't really know how accurate it is.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service