]> granicus.if.org Git - postgis/commitdiff
Back out changes from #3056
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 20 Mar 2015 15:45:29 +0000 (15:45 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 20 Mar 2015 15:45:29 +0000 (15:45 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13376 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_functions_basic.c
postgis/lwgeom_sfcgal.c
regress/measures.sql
regress/measures_expected

index 10f7f7c48a0517ace02f9932b6b05626f77fe3a7..2c137c0d23e211bac74552dcb7845048a9f4ba1c 100644 (file)
@@ -943,15 +943,7 @@ Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS)
                PG_RETURN_NULL();
        }
 
-       /* #3056, only do 3D distance calculation when both arguments have Z */
-       if ( lwgeom_has_z(lwgeom1) && lwgeom_has_z(lwgeom2) )
-       {
-               mindist = lwgeom_mindistance3d(lwgeom1, lwgeom2);
-       }
-       else
-       {
-               mindist = lwgeom_mindistance2d(lwgeom1, lwgeom2);
-       }
+       mindist = lwgeom_mindistance3d(lwgeom1, lwgeom2);
 
        PG_FREE_IF_COPY(geom1, 0);
        PG_FREE_IF_COPY(geom2, 1);
index 1ad4e85dcf7b42dc6d9b7884aa6fc5295bd08b85..8fcee8030052bd277c6eecf9600b8b93e04c55ae 100644 (file)
@@ -307,16 +307,7 @@ Datum sfcgal_distance3D(PG_FUNCTION_ARGS)
        geom1 = POSTGIS2SFCGALGeometry(input1);
        PG_FREE_IF_COPY(input1, 1);
 
-       /* #3056, only do 3D distance calculation when both arguments have Z */
-       if ( lwgeom_has_z(geom0) && lwgeom_has_z(geom1) )
-       {
-               result = sfcgal_geometry_distance_3d(geom0, geom1);
-       }
-       else
-       {
-               result = sfcgal_geometry_distance(geom0, geom1);
-       }
-
+       result = sfcgal_geometry_distance_3d(geom0, geom1);
        sfcgal_geometry_delete(geom0);
        sfcgal_geometry_delete(geom1);
 
index 6da98dd398b9cb02f6830e8d4c0ced655c6dabdc..e84e1318fb60b400cb1239c2661186a1a0a9f6c7 100644 (file)
@@ -262,6 +262,3 @@ select 'emptyCollectionArea', st_area('GEOMETRYCOLLECTION EMPTY');
 -- 
 select 'spheroidLength1_deprecated', round(st_length_spheroid('MULTILINESTRING((-118.584 38.374,-118.583 38.5),(-71.05957 42.3589 , -71.061 43))'::geometry,'SPHEROID["GRS_1980",6378137,298.257222101]'::spheroid)::numeric,5);
 select 'spheroidLength1', round(ST_LengthSpheroid('MULTILINESTRING((-118.584 38.374,-118.583 38.5),(-71.05957 42.3589 , -71.061 43))'::geometry,'SPHEROID["GRS_1980",6378137,298.257222101]'::spheroid)::numeric,5);
-
--- #3056, only do 3d distance when *both* arguments are 3d
-select '#3056', st_3ddistance('LINESTRING(0 0 0, 1 1 1)'::geometry, 'POINT(0.5 0.5)'::geometry);
index 5ff66f48318a8ea954c2d8a091d3fd131ae0d41b..e2e2fefc317735e20cb06b98567637df0f8b3219 100644 (file)
@@ -44,4 +44,3 @@ emptyMultiPointArea|0
 emptyCollectionArea|0
 spheroidLength1_deprecated|85204.52077
 spheroidLength1|85204.52077
-#3056|0