Is grid coverage also involved when the layers are created from
shapefiles?
Using a bunch of shapefile layers instead of the GIF layers I also ran
into the same heap space error after adding and removing the layers
several times. (Each shapefile only had one single feature, a point in
this case.)
 
Michael

________________________________

Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Jesse
Eichar
Gesendet: Dienstag, 5. Dezember 2006 18:47
An: User-friendly Desktop Internet GIS
Betreff: Re: [udig-devel] Heap space error adding/removing graphical
layers


Hi

There are 2 main possibilities that I can think of.

1.  Make sure that you are passing in a heap space parameter to your
application or increase it if you already are.  For example
-Xmx512M will assign 512 MB of memory to the heap space of the JVM.
That should help with the problem.
2.  GridCoverage support is less than perfect at the moment (although
Jody is playing with a new version that shows promise) and takes much
more memory than it should.  So it is likely that the World+Image is
what is causing problems.  I'm not totally sure what can be done about
this.  But if it is causing problems then perhaps some memory
optimizations can be made.

Jesse



On 5-Dec-06, at 3:33 AM, Schneider, Michael wrote:


        Hello, 

        using uDIG RC 5 I got a heap space error after adding several
layers. Each layer was created from a very small graphic (png or gif
file of less than 1 KB) together with a world file. The same was true
when each layer was created from a small shapefile.

        The intension is as follows: The user creates a list of
locations and these locations are shown on a map. When creating a new
list of locations, the old locations are removed from the map and the
new ones are displayed.

        I did it similar to the descriptions in the FAQ "How do I create
a map programmatically" and "I want to add an image to the map, how do I
do that?"

        *       I created a map using createCreateMapCommand 
        *       I added about ten layers (see above what the layers
looked like) with either createAddManyLayersCommand (all layers
together) or createAddLayerCommand (one layer at a time) 
        *       When a new list was created I removed the old layers
using createDeleteLayer command, set the new bounding box with
createSetViewportBBoxCommand and added the new layers to the map. 
                

        After doing these several times I run into the heap space error.

        I also get this error when I only add and remove one layer (i.e.
location lists with only one entry), but it takes longer to get the
error.

        I also tried it "the old way" with MapFactory.processURLs - with
a similar result: The error appeared as well, but it took longer to get
it.

        Am I doing it the wrong way? Is there a better way? 

        I also wanted to try RC 6a. Are there any changes related to the
layers view and showing the map? In RC 5 after adding the layer to the
map they were displayed at once. In RC 6a I can see them in the catalog
and in the project window, but they do not appear in the layers view
automatically and are not displayed. I'll have a closer look to that to
see whether I get the heap space error in RC 6a as well.

        Michael 

        _______________________________________________
        User-friendly Desktop Internet GIS (uDig)
        http://udig.refractions.net
        http://lists.refractions.net/mailman/listinfo/udig-devel


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to