LB terrain generator WIP | API key error + good practices

Hi,

Greate job @AntonelloDiNunzio for the new LB Terrain generator component!! I can’t wait to manage it to work properly.

The process getting the API key from Elevation API isn’t really intuitive. Even tho I finally find how to generate that API key… But the Gh component throw me an error.

*Cannot share the file… as API key is private…

Thanks
Charles C.

Hi @CharlesCollin,

The error is because of data type of “mapType_”.
I have just changed the input type, from “gh object” to “string”. You can download again the component from Github.

Let me know if it works.

Regards,
Antonello

Hi @AntonelloDiNunzio

I’m almost there ! I manage to get a topography.

  1. I still have the image issue (like I had couple times also in the last LB TG version)

On my google platform console I have enable the google static map API.

  1. I didn’t fully understand the pricing. Yet, even if I have 34 requests, the biling estimation is 0$. Is it because we are still in the trial periode (until 16 july ?) or because we requests are free until you reach 2500 (or 500) a day ?

Thank you !
Charles C.

Hi @AntonelloDiNunzio,

Still have no clue about why i’m not getting any satelite images ?

Thanks ,
CC

1 Like

Hi @CharlesCollin,

Are there some info in the google developer dashboard? Are still you static map requests at zero?
I need more details to understand the issue, if you think that you cannot share some info because of your Google stuff you can contact me by private message. Then we can share the solution for other users who could have the same issue once we find a possible solution.

Regards,
Antonello

2 Likes

ahh it is finally working :slight_smile: ! Thank you for the help @AntonelloDiNunzio


LB_terrain_generator_CharlesC_v3.gh (378.4 KB)

TIPS

**Don’t forget to flatten the tiles output

** Also, once you entered your API key, note that each time you will change the following parameters: location, radius, type, numOFtiles, numOFdivisions, imageresolution, Maptype It will add new requests = 0,005 $ / requests (for elevation and static map API service)

** When joinning google cloud plateform (in order to obtain you API key) you have 350$ in free credits

** for your information, generate a map like this one above (500 meters radius, 6 tiles (6x6=36 tiles in total), + great resolution 18/20 (36 images)) pulled about 80 request which is 0.40$ which is quite acceptable

** Also, really important. If you don’t bake the topography and the image (as a texture, which I don’t know how yet) in Rhino, you will be charge each time you will run the LB terrain generator component. In other words, each time you will load your file if the runit toggle is on true. (Even if its the same settings).

1 Like

Updates.

if, out of the readme! output form the component, you got : something when wrong… please try again…

You may want to try this :

  • Play with the image resolution (between 1 and 20). Even if 1 is the lower resolution, in some cases its not working ! only like 10 or more will work. Try it
  • The name of the folder where image will be saved must not contain accent or spaces ! It cause me lots of problem. Better leave folder path to default (nothing)
  • depending on the radius you gave (for instance 500m) play with the numbers of tiles if you want a better image resolution (as there is a maximum dimension of a tile if you want to have the best resolution).

-CC

Hie,

Starting from your definition @CharlesCollin and after having activated API map static and elevation on google cloud platform, I recieve this error message:
0. Current document units is in Millimeters

  1. Conversion to Meters will be applied = 0.001
  2. No data <urlopen error [Errno errors while performing handshake: ] System.Security.Authentication.AuthenticationException: Échec d’un appel à SSPI, consultez l’exception interne. —> System.ComponentModel.Win32Exception: Le message fourni est incomplet. La signature n’a pas été vérifiée
    — Fin de la trace de la pile d’exception interne —
    à System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
    à System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
    à System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
    à System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
    à System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
    à System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
    à System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
    à IronPython.Modules.PythonSocket.ssl.do_handshake()>

What can I do about it ?
Regards,

Any chance you ever met this problem before @AntonelloDiNunzio ?

Hi @FrehelDenis,

Which version of Rhino are you using?

Thanks,
Antonello

@AntonelloDiNunzio ?
I still use Rhino 5.

I installed rhino 6, and the API requests now function.

One last thing doesn’t work : the texture mapping. I don’t know how to order img paths so that “preview mat” will cover all the map with the 25 bmp. Now, It only duplicate the first image 25 times.

Hi @FrehelDenis,

Its a data list matching issu. Make sure you have the same tree structure from the mesh and image output going into the preview component. (usually flaten the tiles output works).

-CC

Hi @AntonelloDiNunzio,

I was trying the terrain generator plugin and I’m glad to see it still work in 2023!

Only thing is, new component of LB construct de location differently so it didn’t work with the Terrain Generator Component (TGC).

Also, I’m always working with mm as Rhino units, and even if the TGC readme output says it will be scaled by 0.001, it isn’t.

Thank you for looking at it :slight_smile: !

And would the component be back in the LB 1.6.0 or further package?!? Why it has been removed?

Regards,
-CC

2.0_LB_terrain_generator_CC_2023.gh (401.9 KB)