![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Feb 2012
Posts: 5
![]() |
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 |
|
Junior Member
Join Date: Feb 2012
Posts: 5
![]() |
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 |
|
Super Moderator
Join Date: Nov 2006
Location: Mojave & Oxnard California
Posts: 2,623
![]() |
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 |
| layer, layers, load, loading, save |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |