Announcement

Collapse
No announcement yet.

New OSM Buildings layer and how to deploy it

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Hello sbodmer,
    Looks like we (I?) have crashed the osm buildings server because .org link does not show up buildings any more...From client side, i think there should be some calls to setMaxActiveAltitude () or so, in order not to load buildings from the moon...
    ​​Also i've seen a isLayerInView () that always return true, that means the building server is always triggered even if we are in the middle of the desert...
    Another problem is that even with the server down, the renderable should be created with the previous json dowloaded on disk, and it is not...right?
    Last edited by frenchy; 02-09-2017, 07:56 PM.

    Comment


    • #17
      Hi frenchy,

      Well, I've set the MaxActiveAltitude to 8000m by default (cf config/Earth/OSMBuildings.xml).
      For why the inLayerInView() always returning true, it's because there "could" always be buildings in the viewport,..
      My code loads the tiles via WW provided HTTPRetreiver, so the cache is used (I think...my implementation check on local storage first before starting the online request). I hard coded the max limit to 7 day to keep in local cache.

      If you create the OSMBuildings layer manually, check the config file for value to be set as default.
      Last edited by sbodmer; 02-13-2017, 08:16 PM.

      Comment


      • #18
        Hemm... normally if you use an .xml file (i didn't see it), you don't have to implement a .java Layer file... But as we say in French "Abondance de biens ne nuit pas" :-)
        BTW, i can't see buildings anymore, looks like I'm banned (Error HTTP 401 - Unauthorized access). I don't get the previously dowloaded buildings either, I'll check that.
        One kind of optimization could be the test of the central altitude (in case of <0, we're in the sea, so no buildings...:-)
        Cheers

        Comment


        • #19
          Hi frenchy,

          Can you explain a bit the part where you say if we use an .xml no .java layer is needed, what do you mean by that ?
          If I understand correctly the WW framework (which I'm not so sure... because "la doc n'est pas terriblement claire..."), if you use "default" WW layers (like WMS, or TileServer) you just need to define a .xml file with the needed settings (because the layer is already implemented by the framework), but I any other case (complete new layer) you have to implement your own AbstractLayer...

          Sorry for the banned IP, can you check your cache files (/WorldWindData/Earth/OSMBuildings) if there are some data in it ?

          I'v changed the expire date to 1 year, so the next time you can download the buildings, it should stay for a while

          Comment


          • #20
            Ohoh... There is something wrong here :
            Code:
            setExpiryTime(365 * 24 * 60 * 1000);
            There is a missing *60 for seconds... Furthermore, it should be long ints not to overflow, so it would be better like :
            Code:
            setExpiryTime(365L * 24L * 60L * 60L * 1000L);
            This caused within the date comparison the deletion of (some of) the tiles I dowloaded... No big deal, the problem is that i still can't see any tiles/buildings anyway...
            Would it be possible for you to debug by just unplug your internet connection ?
            About your first question, for example there is a 'BingImagery.xml' but no 'BingImageryLayer.java' in the source, because of internal mechanisms, like you said. I thought you were more in the 'from scratch layer' mechanism.

            Comment


            • #21
              Thanks frenchy, I fixed my code.

              I tried wthout online connection, the local buildings are indeed loaded correctly...

              Comment


              • #22
                Okay... Thanks, I'll debug more, as soon as I can, Maybe I missed something when I took your sources.
                "Bonne soirée" in Genova !

                Comment

                Working...
                X