I'm actually pretty hopeful that switching to Geometry interfaces won't be that big of a change - at least for code which is using GeometryFactory to create geometry, rather than the raw constructors. Code which simply uses Geometry objects and calls methods on them shouldn't need to be changed.

In this case, it's only GeometryFactory that will have to change (since it will turn into an interface, rather than being a concrete class).

Unfortunately, JUMP is probably a bit cavalier about creating new GeometryFactory instances (rather than having a single central place where GeometryFactory is created and managed). So there might be a few places where code that looks like:

GeometryFactory gf = new GeometryFactory();

needs to change to

GeometryFactory gf = new DefaultGeometryFactory();

The problem with keeping the original Geometry classes (from my point of view) is that you then need new names for all the interfaces. I hesitate to introduce this kind of ugliness, since it will be lived with for a long, long time. Short-term pain for long-term gain (admittedly the pain is not mine! - but the gain is everyone's as well)

Sunburned Surveyor wrote:
Thanks for the information Martin. I wonder what the appearance of the
Geometry interface will mean for OpenJUMP. It sounds like it might
require a major refactoring effort.

Please forgive my Jaav ignorance, but might there be a way to
introduce the Geometry interface without breaking backward
compatability? What if you keep the existing Geometry class but make
it implement the interface? Would that break existing code?

I know I'm a little ignorant when it comes to the bigger picture with
JTS, but I am curious about it and interested in its interaction with
OpenJUMP.

Landon

On Dec 13, 2007 1:33 PM, Martin Davis <[EMAIL PROTECTED]> wrote:
No, Geometry interfaces have not yet made their appearance.  When that
happens it willl probably break old code, so I've been holding off doing
that.  I plan on making the release that switches to Geometry interfaces
be 2.0, so it's very clear that there's a breakage.

AFAIK JTS 1.9 should be backwards compatible (unless people are doing
crazy things like calling code way down inside the Buffer package - as
just happened in another project).  If there are differences, they
should be very minor and easy to fix.


Sunburned Surveyor wrote:
Martin,

I look forward to the release of JTS 1.9. Has Geometry been refactored
into an Interface in this release? I thought I remember reading that
change would be included in the 1.9 release...but I might be wrong.

Do you think the changes in 1.9 will break OpenJUMP? I know we are
already one version behind. Maybe we should talk on the JPP list about
what we will need to do to migrate to 1.9 in OpenJUMP after the bugs
are worked out.

The Sunburned Surveyor

On Dec 12, 2007 4:22 PM, Martin Davis <[EMAIL PROTECTED]> wrote:

Possibly of interest to some - here's a link to a blog entry describing
some new functionality which will be appearing in JTS 1.9

http://lin-ear-th-inking.blogspot.com/2007/12/new-buffer-styles-in-jts-19.html

JTS 1.9 is in late-stage testing, and is on track to be released by the
end of the year.

--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel


_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel


--

Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel

_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel


--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
jts-devel@lists.jump-project.org
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to