GSERIALIZED *geom2 = (GSERIALIZED *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
GBOX box1;
GBOX box2;
+ bool empty1, empty2;
bool result;
POSTGIS_DEBUG(2, "lwgeom_eq called");
PG_RETURN_NULL();
}
- gserialized_get_gbox_p(geom1, &box1);
- gserialized_get_gbox_p(geom2, &box2);
+ empty1 = ( gserialized_get_gbox_p(geom1, &box1) == LW_FAILURE );
+ empty2 = ( gserialized_get_gbox_p(geom2, &box2) == LW_FAILURE );
PG_FREE_IF_COPY(geom1, 0);
PG_FREE_IF_COPY(geom2, 1);
- if ( ! (FPeq(box1.xmin, box2.xmin) && FPeq(box1.ymin, box2.ymin) &&
+ if ( empty1 != empty2 )
+ {
+ result = FALSE;
+ }
+ else if ( ! (FPeq(box1.xmin, box2.xmin) && FPeq(box1.ymin, box2.ymin) &&
FPeq(box1.xmax, box2.xmax) && FPeq(box1.ymax, box2.ymax)) )
{
result = FALSE;
SELECT '#2108', ST_AsEWKT(ST_Line_Interpolate_Point('SRID=3395;LINESTRING M EMPTY'::geometry, 0.5));
SELECT '#2117', ST_AsEWKT(ST_PointOnSurface('SRID=3395;MULTIPOLYGON M EMPTY'::geometry));
+SELECT '#2110.1', 'POINT(0 0)'::geometry = 'POINT EMPTY'::geometry;
+SELECT '#2110.2', 'POINT EMPTY'::geometry = 'POINT EMPTY'::geometry;
+SELECT '#2110.3', 'POINT(0 0)'::geometry = 'POINT(0 0)'::geometry;
+
SELECT '#2145',
round(ST_Length(St_Segmentize(ST_GeographyFromText('LINESTRING(-89.3000030518 28.2000007629,-89.1999969482 89.1999969482,-89.1999969482 89.1999969482)'), 10000))::numeric,0);