sketchucation logo sketchucation
    • Login
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Absolute coordinate for entities

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    5 Posts 2 Posters 418 Views 2 Watching
    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.
    • R Offline
      rafib
      last edited by

      I am exporting model to KMZ. I am reading Collada file model to get some entities for particular component to be presented as placemarks in Google Earth. My problem that coordinates that I am getting on the node are not relative to the model origin but to somewhere else. Can anybody help me to find a way to calculate coordinates relative to model origin (which is placed as GIS coordinate)? What is the algorithm?

      1 Reply Last reply Reply Quote 0
      • GaieusG Offline
        Gaieus
        last edited by

        Hi Rafib,

        where do you get the collada files you say you "read"? You may know that the kmz file format is actually a zip file which if you rename to zip, you will eventually find the collada file describing the model.

        Gai...

        1 Reply Last reply Reply Quote 0
        • R Offline
          rafib
          last edited by

          Yes, this is correct - I am extracting the model.dae from KMZ file and parse the model.dae for nodes that are instances of specific components and taking their coordinates - creating placemarks which are relative to the model GIS coordinate (taking into account the transformation from GIS to Cartesian, offset and translating back). However, what I figured out - the coordinate of the node is not relative to origin of the model but to some other point in the model - so my question - how can I calculate/get the absolute coordinate (relative to origin of the model).

          1 Reply Last reply Reply Quote 0
          • GaieusG Offline
            Gaieus
            last edited by

            Hm. My answer was more theoretical since I don't usually deal with things like this but now I made a simple test. I built a cube with edges of 1000 cms each. Opened the dae file and found exactly these co-ordinates there.

            There is one interesting thing however; although I made sure my SU model was NOT georeferenced, it did put the model into the "default" place in Boulder, CO but of course this is not in the dae file but in the kml file one folder up.

            So where do you find these differences in the co-ordinates?

            Gai...

            1 Reply Last reply Reply Quote 0
            • R Offline
              rafib
              last edited by

              Thank you for the reply. Although the simple test does not recreate the situation. In simple situation it works (that's why I used this method to extract points of interest positions from a model). In any case, I gave up on this approach not just due to technical aspects, but as conceptually not appropriated in my case.

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

              Advertisement