Also introduces an "empty" regression test
git-svn-id: http://svn.osgeo.org/postgis/trunk@8408
b70326c6-7e19-0410-871a-
916f4a2858ee
/* Do not support gridding Z and M values for now */
grid.ipz=grid.ipm=grid.zsize=grid.msize=0;
- /* Return input geometry if grid is null */
- if ( grid_isNull(&grid) )
+ /* Return input geometry if grid is null or input geometry is empty */
+ if ( grid_isNull(&grid) || gserialized_is_empty(in_geom) )
{
PG_RETURN_POINTER(in_geom);
}
snaptogrid \
summary \
affine \
+ empty \
measures \
long_xact \
ctors \
--- /dev/null
+SELECT 'T1.1', ST_AsEWKT(ST_SnapToGrid('POINT EMPTY', 1));
+SELECT 'T1.2', ST_AsEWKT(ST_SnapToGrid('LINESTRING EMPTY', 1));
+SELECT 'T1.3', ST_AsEWKT(ST_SnapToGrid('SRID=4326;POLYGON EMPTY', 1));
--- /dev/null
+T1.1|POINT EMPTY
+T1.2|LINESTRING EMPTY
+T1.3|SRID=4326;POLYGON EMPTY