<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [geos-devel] OverlayOp JTS port</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Okay so I guess we still need the elevation thing. Can we get rid of the checkwrong thing or is that still needed for 64-bit systems?<BR>
<BR>
On a slightly (I like things I can understand note :)), can we update the header about the Last Ported. Its driving me a bit crazy that the last ported note doesn't actually<BR>
seem to match the vintage of the JTS code (i suspect there are toher classes where this is the case) and I'm having to verify that. That seems like an important thing to have handy if we are going to be migrating new changes from JTS into GEOS.<BR>
<BR>
Thanks,<BR>
Regina<BR>
<BR>
-----Original Message-----<BR>
From: geos-devel-bounces@lists.osgeo.org on behalf of Martin Davis<BR>
Sent: Wed 9/17/2008 7:09 PM<BR>
To: GEOS Development List<BR>
Subject: Re: [geos-devel] OverlayOp JTS port<BR>
<BR>
Not so much pure - I just like things that I can understand 8^)<BR>
<BR>
Paul Ramsey wrote:<BR>
> Z-processing was added under contract to the Metropolitan Airport<BR>
> Commission, some years ago, so that intersections (in particular)<BR>
> would retain interpolated Z-values that "made sense". This was<BR>
> GEOS-only.<BR>
><BR>
> Sandro also did a good deal of robustness work in GEOS only, which<BR>
> dealt with failures showing up in 64-bit systems but not in 32-bit<BR>
> systems. Mostly these were in the form of perturbation hacks, rounding<BR>
> things up until they worked, and so on. Martin is (mostly) too pure to<BR>
> result to these kinds of things :)<BR>
><BR>
> P.<BR>
><BR>
> On Wed, Sep 17, 2008 at 2:33 PM, Martin Davis <mbdavis@refractions.net> wrote:<BR>
> <BR>
>> I can confirm - if GEOS is doing something with computing new Z-values this<BR>
>> is something which is NOT in JTS. I vaguely recollect that this is<BR>
>> something which Sandro added.<BR>
>><BR>
>> Obe, Regina wrote:<BR>
>> <BR>
>>> Okay I did a quick union run of a 3 d geometry in PostGIS and it<BR>
>>> apparently does do something with the z index<BR>
>>><BR>
>>> SELECT ST_AsEWKT(ST_Union(ST_MakePoint(x,y,z)))<BR>
>>> FROM generate_series(1,5) x<BR>
>>> CROSS JOIN generate_series(2,10) y<BR>
>>> CROSS JOIN generate_series(1,10) z;<BR>
>>><BR>
>>> yields<BR>
>>> MULTIPOINT(1 2 9.001953125,1 3 9.001953125,1 4 9.001953125,1 5<BR>
>>> 9.001953125,1 6 9.001953125,1 7 9.001953125,1 8 9.001953125,1 9<BR>
>>> 9.001953125,1 10 9.001953125,2 2 9.001953125,2 3 9.001953125,2 4<BR>
>>> 9.001953125,2 5 9.001953125,2 6 9.001953125,2 7 9.001953125,2 8<BR>
>>> 9.001953125,2 9 9.001953125,2 10 9.001953125,3 2 9.001953125,3 3<BR>
>>> 9.001953125,3 4 9.001953125,3 5 9.001953125,3 6 9.001953125,3 7<BR>
>>> 9.001953125,3 8 9.001953125,3 9 9.001953125,3 10 9.001953125,4 2<BR>
>>> 9.001953125,4 3 9.001953125,4 4 9.001953125,4 5 9.001953125,4 6<BR>
>>> 9.001953125,4 7 9.001953125,4 8 9.001953125,4 9 9.001953125,4 10<BR>
>>> 9.001953125,5 2 9.001953125,5 3 9.001953125,5 4 9.001953125,5 5<BR>
>>> 9.001953125,5 6 9.001953125,5 7 9.001953125,5 8 9.001953125,5 9<BR>
>>> 9.001953125,5 10 9.001953125)<BR>
>>><BR>
>>> Running the same exercise in OpenJump and looking at the output of GML,<BR>
>>> WKT, CL I don't get a Z-axis.<BR>
>>><BR>
>>> I can't tell if its just that the z is not supported in those formats or<BR>
>>> if its just because in JTS the z axis is thrown out. Looking at the JTS<BR>
>>> code, I have no reason to believe its doing anything with z.<BR>
>>><BR>
>>> I presume the GEOS elevationMatrix->elevate(resultGeom) is responsible<BR>
>>> for this.<BR>
>>><BR>
>>> The question I have is - isn't this hmm wrong - I suppose we can say its<BR>
>>> fuzzily right.<BR>
>>><BR>
>>> Thanks,<BR>
>>> Regina<BR>
>>><BR>
>>><BR>
>>><BR>
>>> -----Original Message-----<BR>
>>> From: geos-devel-bounces@lists.osgeo.org<BR>
>>> [<A HREF="mailto:geos-devel-bounces@lists.osgeo.org">mailto:geos-devel-bounces@lists.osgeo.org</A>] On Behalf Of Martin Davis<BR>
>>> Sent: Wednesday, September 17, 2008 2:24 PM<BR>
>>> To: GEOS Development List<BR>
>>> Subject: Re: [geos-devel] OverlayOp JTS port<BR>
>>><BR>
>>> The original plan for GEOS was that it would track JTS 100%. This was to<BR>
>>> simplify porting new functionality as it is added to JTS. However, at one<BR>
>>> point I think Sandro did some extra work on trying to improve GEOS<BR>
>>> robustness. This is probably where the checkObviouslyWrongResult came from.<BR>
>>> After this was done, JTS caught up - so this method may not be needed any<BR>
>>> more.<BR>
>>><BR>
>>><BR>
>>><BR>
>>> Obe, Regina wrote:<BR>
>>><BR>
>>> <BR>
>>>> I apologize for the barrage of questions. As far as I can tell the<BR>
>>>> OverlayOp.cpp is vintage JTS 1.7 (which I think is same as the JTS 1.9<BR>
>>>><BR>
>>>> <BR>
>>> <BR>
>>>> for this class)<BR>
>>>><BR>
>>>> except it has the additional calls of<BR>
>>>><BR>
>>>> checkObviouslyWrongResult() - which most of that code looks like it would<BR>
>>>> never<BR>
>>>> be called because of the #ifdefs except for the<BR>
>>>> assert(resultGeom);<BR>
>>>> UNREFERENCED_PARAMETER(opCode); (have no clue what this does)<BR>
>>>><BR>
>>>> and also a<BR>
>>>> elevationMatrix->elevate(resultGeom);<BR>
>>>><BR>
>>>> which looks like will get called since USE_ELEVATION_MATRIX 1.<BR>
>>>><BR>
>>>> Is the elevationMatrix designed to deal with 3d geometries? Didn't<BR>
>>>> realize<BR>
>>>> Union actually works with those, but then I never tried it with 3d.<BR>
>>>><BR>
>>>> So I'm a little puzzled why these 2 extra function calls since I always<BR>
>>>> thought<BR>
>>>> GEOS was at best on par with JTS?<BR>
>>>><BR>
>>>> Thanks,<BR>
>>>> Regina<BR>
>>>><BR>
>>>> -----Original Message-----<BR>
>>>> From: geos-devel-bounces@lists.osgeo.org on behalf of Obe, Regina<BR>
>>>> Sent: Wed 9/17/2008 9:26 AM<BR>
>>>> To: GEOS Development List<BR>
>>>> Subject: [geos-devel] OverlayOp JTS port<BR>
>>>><BR>
>>>> I'm looking at the operation.overlay.OverlayOp in geos trunk<BR>
>>>><BR>
>>>> In the header it says<BR>
>>>> Last port: operation/overlay/OverlayOp.java rev. 1.23<BR>
>>>><BR>
>>>> But I don't believe this to be right since when I compare the<BR>
>>>> computeOverlay methods<BR>
>>>> against 1.2 and 1.3 versions of JTS codebase, it has an additional<BR>
>>>> EdgeNodingValidator check which wasn't introduced until later versions<BR>
>>>> of JTS.<BR>
>>>><BR>
>>>> So I'm wondering is the OverlayOp.cpp a mix of JTS versions or is the<BR>
>>>> comment above just plain wrong.<BR>
>>>><BR>
>>>> It also has a checkObviouslyWrongResult() check at the end of<BR>
>>>> computerOverlay which I haven't figured out which version that was<BR>
>>>> introduced in JTS (its not in 1.2,1.3, or 1.9). Is this a GEOS<BR>
>>>><BR>
>>>> <BR>
>>> specific<BR>
>>><BR>
>>> <BR>
>>>> check that has no JTS equivalent?<BR>
>>>><BR>
>>>> Thanks,<BR>
>>>> Regina<BR>
>>>> -----------------------------------------<BR>
>>>> The substance of this message, including any attachments, may be<BR>
>>>> confidential, legally privileged and/or exempt from disclosure<BR>
>>>> pursuant to Massachusetts law. It is intended<BR>
>>>> solely for the addressee. If you received this in error, please<BR>
>>>> contact the sender and delete the material from any computer.<BR>
>>>><BR>
>>>> _______________________________________________<BR>
>>>> geos-devel mailing list<BR>
>>>> geos-devel@lists.osgeo.org<BR>
>>>> <A HREF="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</A><BR>
>>>><BR>
>>>><BR>
>>>><BR>
>>>><BR>
>>>><BR>
>>>> <BR>
>>> ------------------------------------------------------------------------<BR>
>>><BR>
>>> <BR>
>>>> _______________________________________________<BR>
>>>> geos-devel mailing list<BR>
>>>> geos-devel@lists.osgeo.org<BR>
>>>> <A HREF="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</A><BR>
>>>><BR>
>>>> <BR>
>>> <BR>
>> --<BR>
>> Martin Davis<BR>
>> Senior Technical Architect<BR>
>> Refractions Research, Inc.<BR>
>> (250) 383-3022<BR>
>><BR>
>> _______________________________________________<BR>
>> geos-devel mailing list<BR>
>> geos-devel@lists.osgeo.org<BR>
>> <A HREF="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</A><BR>
>><BR>
>> <BR>
> _______________________________________________<BR>
> geos-devel mailing list<BR>
> geos-devel@lists.osgeo.org<BR>
> <A HREF="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</A><BR>
><BR>
> <BR>
<BR>
--<BR>
Martin Davis<BR>
Senior Technical Architect<BR>
Refractions Research, Inc.<BR>
(250) 383-3022<BR>
<BR>
_______________________________________________<BR>
geos-devel mailing list<BR>
geos-devel@lists.osgeo.org<BR>
<A HREF="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>