Just for curiosity:

When I load a larger polygon shapefile (burlulc)
I recognized that the geometries share a lot of
common vertices. In case of the burlulc layer
over 1,500,000.
They are represented by com.vividsolutions.jts.geom.Coordinate
objects. If a shapefile gets loaded a new Coordinate object
for each vertex is created.

Now I added a simple TreeMap to the PolygonHandler of
OpenJUMP's shapefile reader to reuse already created
Coordinate objects and share them with other geometries.

After loading the data (+ triggering GC) the normal OJ
uses approx. 124MB memory. After the the shared vertices
modification OJ uses only approx. 89MB.

My question: May this mod lead to any side effects?
With JTS? With the CursorTools?

Coordinate objects are not immutable, so I expect
side effects with e.g. neighboring polygons when
I edit one of them.

I had a brief look at the code and played with
the CursorTools but I haven't found any side effects
yet.

This idea comes from playing with OJ on a boring
friday evening. It only costs me a few seconds to
implement and if you say "This idea is plain stupid!"
I'll drop it immediately .. ;-)

Kind regards,
Sascha

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to