It would help me a lot if you could give me a piece of code which does your 
approach.

Thanks in advance!

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 23. April 2008 11:49
An: Thorsten Kraus
Betreff: Re: [Geotools-gt2-users] Problem creating ShapefileDataStore
(large shape file)


If there's a solution I guess you'll need to force the reader into a 
lazy-loading mode. I know how to do this for grid coverages : simply pass the 
reader into the layer instead of the coverage. But I don't know how that 
applies to features...

>----- Oorspronkelijk bericht -----
>Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Verzonden: woensdag, april 23, 2008 11:43 AM
>Aan: [email protected]
>Onderwerp: Re: [Geotools-gt2-users] Problem creating ShapefileDataStore        
>(large  shape file)
>
>I already do this: -Xmx1600M
>
>For information: I use Windows XP and jre1.5.0_11.
>
>-----Ursprüngliche Nachricht-----
>Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Gesendet: Mittwoch, 23. April 2008 11:41
>An: Thorsten Kraus; [email protected]
>Betreff: Re: [Geotools-gt2-users] Problem creating ShapefileDataStore
>(large shape file)
>
>
>run your program with more heap space ? Adding for example "-Xmx512m" ?
>
>>----- Oorspronkelijk bericht -----
>>Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>>Verzonden: woensdag, april 23, 2008 11:10 AM
>>Aan: [email protected]
>>Onderwerp: [Geotools-gt2-users] Problem creating ShapefileDataStore (large    
>> shape file)
>>
>>Hi all,
>>
>>I have problems reading a big shape file. When trying to create a 
>>ShapefileDataStore, I get the following exception:
>>
>>I try this:
>>this.store = new ShapefileDataStore(this.shapeURL);
>>
>>java.io.IOException: Für diesen Befehl ist nicht genügend Speicher verfügbar
>>        at sun.nio.ch.FileChannelImpl.map0(Native Method)
>>        at sun.nio.ch.FileChannelImpl.map(Unknown Source)
>>        at 
>> org.geotools.data.shapefile.shp.ShapefileReader.init(ShapefileReader.java:245)
>>        at 
>> org.geotools.data.shapefile.shp.ShapefileReader.<init>(ShapefileReader.java:148)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.openShapeReader(ShapefileDataStore.java:466)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.readAttributes(ShapefileDataStore.java:670)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:626)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:620)
>>        at 
>> org.geotools.data.shapefile.ShapefileDataStore.getFeatureSource(ShapefileDataStore.java:927)
>>        at 
>> com.ptvag.geomanagement.shapefile.ShapeFileReader.setShapeFilePath(ShapeFileReader.java:89)
>>        at 
>> com.ptvag.geomanagement.servlets.UploadHandlerServlet.collectZipFileInformation(UploadHandlerServlet.java:245)
>>        at 
>> com.ptvag.geomanagement.servlets.UploadHandlerServlet.handleUpload(UploadHandlerServlet.java:165)
>>        at 
>> com.ptvag.geomanagement.servlets.UploadHandlerServlet.doPost(UploadHandlerServlet.java:86)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>        at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>        at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>        at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>        at 
>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
>>        at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>        at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>        at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>        at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>        at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>>        at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>>        at 
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>        at 
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>>        at 
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>>        at java.lang.Thread.run(Unknown Source)
>>
>>Do you have any tips how I can read large files?
>>
>>Regards,
>>Thorsten
>>
>>
>>-------------------------------------------------------------------------
>>This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>>Don't miss this year's exciting event. There's still time to save $100.
>>Use priority code J8TL2D2.
>>http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>>_______________________________________________
>>Geotools-gt2-users mailing list
>>[email protected]
>>https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>>
>
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>Don't miss this year's exciting event. There's still time to save $100.
>Use priority code J8TL2D2.
>http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>_______________________________________________
>Geotools-gt2-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to