mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-24 09:02:37 +00:00
ST_SnapToGrid: retain type on empty return (#1695)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9516 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
f57a0f7c2e
commit
e8263f6807
|
@ -473,7 +473,7 @@ lwcollection_grid(LWCOLLECTION *coll, gridspec *grid)
|
|||
if ( g ) geoms[ngeoms++] = g;
|
||||
}
|
||||
|
||||
if ( ! ngeoms ) return lwcollection_construct_empty(COLLECTIONTYPE, coll->srid, 0, 0);
|
||||
if ( ! ngeoms ) return lwcollection_construct_empty(coll->type, coll->srid, 0, 0);
|
||||
|
||||
return lwcollection_construct(coll->type, coll->srid,
|
||||
NULL, ngeoms, geoms);
|
||||
|
|
|
@ -628,5 +628,8 @@ WITH inp AS ( SELECT
|
|||
'POINT(-176 -22)'::geography as p
|
||||
) SELECT '#1596', ST_Summary(ST_Intersection(a,p)) FROM inp;
|
||||
|
||||
-- #1695
|
||||
SELECT '#1695', ST_AsEWKT(ST_SnapToGrid('MULTIPOLYGON(((0 0, 10 0, 10 10, 0 10, 0 0)))'::geometry, 20));
|
||||
|
||||
-- Clean up
|
||||
DELETE FROM spatial_ref_sys;
|
||||
|
|
|
@ -209,3 +209,4 @@ NOTICE: SRID value -1 converted to the officially unknown SRID value 0
|
|||
#1596.6|public.road_pg.roads_geom SRID changed to 0
|
||||
#1596.7|0
|
||||
#1596|Point[BG]
|
||||
#1695|MULTIPOLYGON EMPTY
|
||||
|
|
Loading…
Reference in a new issue