Results 1 to 3 of 3

Thread: Need help loading saved layers

  1. #1
    Junior Member
    Join Date
    Feb 2012

    Default Need help loading saved layers

    I'm loading two shape files;
    one has 40 polygons,
    one has 3000 polygons.

    I'm want to group them once loaded and save the groupings and would like to avoid the long processing times to convert the shape files to layers.

    My problem is my attempts to recall the saved layers keep blowing up world wind.

    Tried Serializable/ObjectOutputStream, got (PreRenderable) renderable cast fail (I think).
    Tried XStream, got JVM crash, EXCEPTION_ACCESS_VIOLATION

    Anyone have experience saving/loading layers?

  2. #2
    Junior Member
    Join Date
    Feb 2012


    I was able to get an ArrayList<LatLon> from the layers created by the shape files. I store these Lists in a custom Class for organization purposes. My main thread has a variable customClasses of type ArrayList<CustomClass> which I can save to file with ObjectOutputStream.writeObject(customCla sses) and load back in with readObject().
    I had to make LatLon and Angle implement Serializable to pull it off which I'm not happy about but it hasn't given me any problems yet.

    The whole process takes longer and chews a lot more heap memory do to the complexity and number of my polygons.

    So if anyone knows how to save a Layer or a non Serializable Object I'd appreciate the help.

  3. #3
    Senior Member
    Join Date
    Nov 2006
    Mojave & Oxnard California


    Maybe take some of the work off of the GPU and run the data into a buffer then just redraw the buffer.

    3000 polygons is pushing the limit to work efficiently.

    Do a search for optimize and you may find another way to try.
    To get something to work is fairly easy.
    Optimizing and error handling is a bit more of a challenge.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts