World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 03-22-2012, 08:56 PM   #1
LiDARdeveloper
Junior Member
 
Join Date: Feb 2012
Posts: 5
LiDARdeveloper is on a distinguished road
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?
LiDARdeveloper is offline   Reply With Quote
Old 03-29-2012, 08:34 PM   #2
LiDARdeveloper
Junior Member
 
Join Date: Feb 2012
Posts: 5
LiDARdeveloper is on a distinguished road
Default

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.
LiDARdeveloper is offline   Reply With Quote
Old 03-30-2012, 12:26 AM   #3
nlneilson
Super Moderator
 
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,623
nlneilson is on a distinguished road
Default

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.
__________________
Neil
http://www.nlneilson.com
nlneilson is offline   Reply With Quote
Reply

Tags
layer, layers, load, loading, save


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rendering top WMS layers jas511 Development Help 17 01-19-2012 02:23 AM
WW1.3.2-Plugin: Layer Edit canosso Add-ons & Scripts 21 02-27-2010 04:37 AM
MODIS historical image layers plugin withak Add-ons & Scripts 12 05-11-2009 08:39 PM
How to determine ordering of layers naql Development Help 1 11-18-2008 02:40 AM
The New Zealand Layers: The LINZ Data as Layers canosso Add-ons & Scripts 8 04-25-2005 02:03 AM


All times are GMT +1. The time now is 06:29 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.