Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to create a shapefile with the geotools java library for approx. 2 000 000 points and whatever strategy I apply I seem to run into out of memory exceptions as well as everything running super slow. Anybody done that before and got it to work?

share|improve this question
Have you tried increasing your java heap size with a "java -Xms1g -Xmx1g" ? – julien Sep 12 '12 at 9:40
you are unlikely to be able to use a shapefile with 2M points, even if you can overcome the size constraints in shapefiles (<2Gb IIRC) - consider using a database to store your data. – iant Sep 12 '12 at 9:41
thanx iant, didn't know about this constraint. With a strategy of gnerating multiple small files and merging them together into one I hit the 2GB size limit at around 600 000 I have to check with my customer if it makes any sense to continue – Tilman Rossmy Sep 12 '12 at 10:50
see for more details on size limits – iant Sep 12 '12 at 12:30
Your question looks related to this post. Try the answer I made there. (Gah, SE converted my answer to a comment...) – DieterDP Dec 14 '12 at 9:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.