• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Location API

Scheduled Pinned Locked Moved Developers' Forum
7 Posts 3 Posters 600 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    FlyingPikachu
    last edited by 27 Mar 2014, 22:43

    File > Geo-location > Add location...

    New to SketchUp and Ruby. Is there any API to modify this^? I want to auto-select an adjacent area to mine and grab it.

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 28 Mar 2014, 19:11

      See the ShadowInfo hash object:
      http://www.sketchup.com/intl/en/developer/docs/ourdoc/shadowinfo

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • J Offline
        Juantxo
        last edited by 31 Mar 2014, 13:26

        I'm not sure what are you asking, but to import large google earth image there are several methods:
        http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=40627%26amp;hilit=terrain+mesh
        http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=40413
        http://sketchucation.com/forums/viewtopic.php?f=271%26amp;t=6867
        http://a4chitect.webng.com/

        If you download Skelion plugin, there is a feature to make a mesh of an area, (no image satellite), using NASA’s SRTM Elevation data.
        SketchUp ruby API does not have methods to add locations.

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 1 Apr 2014, 00:25

          @juantxo said:

          SketchUp ruby API does not have methods to add locations.

          True, instead you set the "TZOffset", "Latitude" and "Longitude" attributes of the model's ShadowInfo hash.

          The SketchUp API also has Geom::LatLong and Geom::UTM class objects.

          💭

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • F Offline
            FlyingPikachu
            last edited by 3 Apr 2014, 00:33

            @juantxo said:

            I'm not sure what are you asking, but to import large google earth image there are several methods:
            http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=40627%26amp;hilit=terrain+mesh
            http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=40413
            http://sketchucation.com/forums/viewtopic.php?f=271%26amp;t=6867
            http://a4chitect.webng.com/

            If you download Skelion plugin, there is a feature to make a mesh of an area, (no image satellite), using NASA’s SRTM Elevation data.
            SketchUp ruby API does not have methods to add locations.

            Couldn't find such a feature in Skelion, but that grid generator looks interesting!

            @dan rathbun said:

            @juantxo said:

            SketchUp ruby API does not have methods to add locations.

            True, instead you set the "TZOffset", "Latitude" and "Longitude" attributes of the model's ShadowInfo hash.

            The SketchUp API also has Geom::LatLong and Geom::UTM class objects.

            💭

            Doesn't TZOffset only change the time zone? Also changing Latitude/Longitude only let me get two models of the same locations side-by-side. Here's my test code:

            mod = Sketchup.active_model # Open model
            shadowinfo = mod.shadow_info
            shadowinfo["Latitude"] = shadowinfo["Latitude"] +0.001
            shadowinfo["Longitude"] = shadowinfo["Longitude"]+0.001
            shadowinfo["TZOffset"] = shadowinfo["TZOffset"]+0
            UI.messagebox("Latitude; " + shadowinfo["Latitude"].to_s +
            "\nLongitude; " + shadowinfo["Longitude"].to_s +
            "\nTZOffset; " + shadowinfo["TZOffset"].to_s)
            

            Thoughts?

            1 Reply Last reply Reply Quote 0
            • J Offline
              Juantxo
              last edited by 3 Apr 2014, 05:52

              @flyingpikachu said:

              Couldn't find such a feature in Skelion,

              It's a pro feature. Just click mountains icon.
              Add relief Skelion feature

              1 Reply Last reply Reply Quote 0
              • F Offline
                FlyingPikachu
                last edited by 3 Apr 2014, 15:53

                @juantxo said:

                It's a pro feature. Just click mountains icon.

                Thanks! Unfortunately this didn't give me the level of detail I'm after (can't zoom in far enough).

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 / 1
                • First post
                  5/7
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement