[postgis-devel] Java2D and JTS support

Markus Schaber schabi at logix-tt.com
Fri Oct 21 03:19:23 PDT 2005


Hi,

Yesterday, I checked in some code to support direct reading of Java2D
Shapes out of a PostGIS database.

See jdbc2/src/examples/TestJava2D.java for a small usage example, it
should now be possible to write rather efficient map rendering tools
using Java2D just in a few lines.

I also reworked the JTS support to make (hopefully) correct use of
GeometryFactories, thus avoiding the use of deprecated methods. However,
as I developed against the current CVS of JTS, I don't know yet whether
my code works against the stable 1.6 release of JTS.

I'll try implement caching of GeometryFactories for every used SRID, or
even let the user give us the Factories so he can specify his own
precision models.

One problem is that the SUN collection framework does not allow us to
use primitive types (like int) to be used as HashMap keys. For efficient
implementation, I would prefer to use the LGPLed GNU Trove4j framework.
However, this would either add another build depencency, or burden us
with the need to maintain our own copy of the Trove code. What do you
think about it?

Markus





More information about the postgis-devel mailing list