[postgis-tickets] r17437 - Simple TIN support to allow viz in QGIS
Paul Ramsey
pramsey at cleverelephant.ca
Tue May 14 02:33:40 PDT 2019
Author: pramsey
Date: 2019-05-14 14:33:40 -0700 (Tue, 14 May 2019)
New Revision: 17437
Modified:
branches/2.5/NEWS
branches/2.5/liblwgeom/lwgeom.c
branches/2.5/postgis/lwgeom_geos.c
Log:
Simple TIN support to allow viz in QGIS
References #4380
Modified: branches/2.5/NEWS
===================================================================
--- branches/2.5/NEWS 2019-05-14 19:43:46 UTC (rev 17436)
+++ branches/2.5/NEWS 2019-05-14 21:33:40 UTC (rev 17437)
@@ -6,6 +6,7 @@
- #4348, ST_AsMVTGeom (GEOS): Enforce validation at all times (Raúl Marín)
- #4361, Fix postgis_type_name with (GEOMETRYM,3) (Matt Bretl)
- #4326, Fix circular arc distance calculation (Paul Ramsey)
+ - #4380, Simple TIN support to allow viz in QGIS (Paul Ramsey)
PostGIS 2.5.2
Modified: branches/2.5/liblwgeom/lwgeom.c
===================================================================
--- branches/2.5/liblwgeom/lwgeom.c 2019-05-14 19:43:46 UTC (rev 17436)
+++ branches/2.5/liblwgeom/lwgeom.c 2019-05-14 21:33:40 UTC (rev 17437)
@@ -1606,6 +1606,7 @@
{
/* No-op! Cannot remote points */
case POINTTYPE:
+ case TRIANGLETYPE:
return;
case LINETYPE:
{
@@ -1705,6 +1706,7 @@
/* Can process most multi* types as generic collection */
case MULTILINETYPE:
case MULTIPOLYGONTYPE:
+ case TINTYPE:
case COLLECTIONTYPE:
/* Curve types we mostly ignore, but allow the linear */
/* portions to be processed by recursing into them */
@@ -1749,8 +1751,9 @@
{
switch (geom->type)
{
- /* No-op! Cannot simplify points */
+ /* No-op! Cannot simplify points or triangles */
case POINTTYPE:
+ case TRIANGLETYPE:
return;
case LINETYPE:
{
@@ -1809,6 +1812,7 @@
case MULTIPOINTTYPE:
case MULTILINETYPE:
case MULTIPOLYGONTYPE:
+ case TINTYPE:
case COLLECTIONTYPE:
{
uint32_t i, j = 0;
@@ -2154,6 +2158,7 @@
return;
}
case CIRCSTRINGTYPE:
+ case TRIANGLETYPE:
case LINETYPE:
{
LWLINE *ln = (LWLINE*)(geom);
@@ -2207,6 +2212,7 @@
case MULTIPOINTTYPE:
case MULTILINETYPE:
case MULTIPOLYGONTYPE:
+ case TINTYPE:
case COLLECTIONTYPE:
case COMPOUNDTYPE:
{
Modified: branches/2.5/postgis/lwgeom_geos.c
===================================================================
--- branches/2.5/postgis/lwgeom_geos.c 2019-05-14 19:43:46 UTC (rev 17436)
+++ branches/2.5/postgis/lwgeom_geos.c 2019-05-14 21:33:40 UTC (rev 17437)
@@ -754,12 +754,14 @@
double tolerance;
GEOSGeometry *g1, *g3;
GSERIALIZED *result;
+ uint32_t type;
geom1 = PG_GETARG_GSERIALIZED_P(0);
tolerance = PG_GETARG_FLOAT8(1);
/* Empty.Simplify() == Empty */
- if ( gserialized_is_empty(geom1) )
+ type = gserialized_get_type(geom1);
+ if ( gserialized_is_empty(geom1) || type == TINTYPE || type == TRIANGLETYPE )
PG_RETURN_POINTER(geom1);
initGEOS(lwpgnotice, lwgeom_geos_error);
More information about the postgis-tickets
mailing list