[geos-devel] JTS - Change to semantics of overlay operations with EMPTY outputs

Martin Davis mtnclimb at telus.net
Tue Feb 28 10:45:06 EST 2012


Yes, makes good sense. Thanks!

On 2/28/2012 12:26 AM, Sandro Santilli wrote:
> On Mon, Feb 27, 2012 at 09:54:56PM -0800, Martin Davis wrote:
>
>> * For symmetric difference, the output will have the type of the
>> lowest-dimension input
>>      E.g.
>>      symDifference(POLYGON EMPTY, LINESTRING EMPTY) = LINESTRING EMPTY
>>      symDifference(LINESTRING EMPTY, POLYGON EMPTY) = LINESTRING EMPTY
>>
>>      (This is pretty arbitrary, but no other criteria comes to mind)
> I think it'd make more sense to use the highest, because it would be
>
>    ST_Union( ST_Difference(A, B), ST_Difference(B, A) )
>
> Which for your previous definitions means:
>
>> * For difference, the output will have the type of the left-hand input
>>      E.g.
>>      difference(POLYGON EMPTY, LINESTRING EMPTY) = POLYGON EMPTY
>>      difference(LINESTRING EMPTY, POLYGON EMPTY) = LINESTRING EMPTY
>    ST_Union( dims(A), dims(B) )
>
> Which in turn gives:
>
>> * For union, the output will have the type of the highest-dimension input
>>       E.g.
>>      union(POLYGON EMPTY, LINESTRING EMPTY) = POLYGON EMPTY
>    maxDim(A, B)
>
> So symDifference(A, B) should have type of highest dimension input.
> Does it make sense ?
>
> --strk;
>
>    ,------o-.
>    |   __/  |    Delivering high quality PostGIS 2.0 !
>    |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
>    `-o------'
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1913 / Virus Database: 2114/4835 - Release Date: 02/27/12
>
>


More information about the geos-devel mailing list