[geos-devel] OverlayOp JTS port

Obe, Regina robe.dnd at cityofboston.gov
Wed Sep 17 14:39:39 EDT 2008


The other thing I'm noticing is that the Geometry.union() methods are completely different between the Geos trunk and JTS (well 1.7 I'm looking at at the moment), but I haven't looked at older JTS code or 1.9 to
see if it matches with what it claims to be JTS 1.1 port.

The Geos Geometry.Union() has a lot of short-circuit code in it that JTS
Geometry.union doesn't (but then that could just be a result of code shuffling)

Am I safe in assuming that the whole Geometry.Union stuff is completely ignored
by Geos CAPI anyway so the point is moot as far as CAPI is concerned?  Unless of course this short-circuit stuff actually works, then we should probably use it somehow.  Based on my limited understanding of how C++ flows, I don't see how this would ever get called by CAPI.

Thanks,
Regina


-----Original Message-----
From: geos-devel-bounces at lists.osgeo.org on behalf of Martin Davis
Sent: Wed 9/17/2008 2:24 PM
To: GEOS Development List
Subject: Re: [geos-devel] OverlayOp JTS port
 
The original plan for GEOS was that it would track JTS 100%.  This was 
to simplify porting new functionality as it is added to JTS.  However, 
at one point I think Sandro did some extra work on trying to improve 
GEOS robustness.  This is probably where the checkObviouslyWrongResult 
came from.  After this was done, JTS caught up - so this method may not 
be needed any more.



Obe, Regina wrote:
>
> I apologize for the barrage of questions.  As far as I can tell the
> OverlayOp.cpp is vintage JTS 1.7 (which I think is same as the JTS 1.9 
> for this class)
>
> except it has the additional calls of
>
> checkObviouslyWrongResult() - which most of that code looks like it 
> would never
> be called because of the #ifdefs except for the 
>
> assert(resultGeom);
> UNREFERENCED_PARAMETER(opCode); (have no clue what this does)
>
> and also a
> elevationMatrix->elevate(resultGeom);
>
> which looks like will get called since USE_ELEVATION_MATRIX 1.
>
> Is the elevationMatrix designed to deal with 3d geometries?  Didn't 
> realize
> Union actually works with those, but then I never tried it with 3d.
>
> So I'm a little puzzled why these 2 extra function calls since I 
> always thought
> GEOS was at best on par with JTS?
>
> Thanks,
> Regina
>
> -----Original Message-----
> From: geos-devel-bounces at lists.osgeo.org on behalf of Obe, Regina
> Sent: Wed 9/17/2008 9:26 AM
> To: GEOS Development List
> Subject: [geos-devel] OverlayOp JTS port
>
> I'm looking at the operation.overlay.OverlayOp in geos trunk
>
> In the header it says
> Last port: operation/overlay/OverlayOp.java rev. 1.23
>
> But I don't believe this to be right since when I compare the
> computeOverlay methods
> against 1.2 and 1.3 versions of JTS codebase, it has an additional
> EdgeNodingValidator check which wasn't introduced until later versions
> of JTS.
>
> So I'm wondering is the OverlayOp.cpp a mix of JTS versions or is the
> comment above just plain wrong.
>
> It also has a checkObviouslyWrongResult() check at the end of
> computerOverlay which I haven't figured out which version that was
> introduced in JTS (its not in 1.2,1.3, or 1.9).  Is this a GEOS specific
> check that has no JTS equivalent?
>
> Thanks,
> Regina
> -----------------------------------------
> The substance of this message, including any attachments, may be
> confidential, legally privileged and/or exempt from disclosure
> pursuant to Massachusetts law. It is intended
> solely for the addressee. If you received this in error, please
> contact the sender and delete the material from any computer.
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel

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

_______________________________________________
geos-devel mailing list
geos-devel at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20080917/b002b2f0/attachment.html


More information about the geos-devel mailing list