From 0cfc87bd32822e5ba22d8c2b1a26fa60f63ad7fa Mon Sep 17 00:00:00 2001
From: rudb <office@database.ru>
Date: Fri, 19 Jun 2026 15:11:53 +0000
Subject: [PATCH] СУБД RuDB - релиз 2
---
contrib/postgis/raster/rt_core/rt_geometry.c | 60 ++++++++++++++++++++++++++++++++----------------------------
1 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/contrib/postgis/raster/rt_core/rt_geometry.c b/contrib/postgis/raster/rt_core/rt_geometry.c
index 3dd687c..9585bc1 100644
--- a/contrib/postgis/raster/rt_core/rt_geometry.c
+++ b/contrib/postgis/raster/rt_core/rt_geometry.c
@@ -532,52 +532,56 @@
/* specify SRID */
lwgeom_set_srid(mpoly, rt_raster_get_srid(raster));
+/*#<<<DIA_SVACE_MAJOR*/
/* convert to multi */
if (!lwgeom_is_collection(mpoly)) {
tmp = mpoly;
#if POSTGIS_DEBUG_LEVEL > 3
- {
- char *wkt = lwgeom_to_wkt(mpoly, WKT_ISO, DBL_DIG, NULL);
- RASTER_DEBUGF(4, "before multi = %s", wkt);
- rtdealloc(wkt);
- }
+ {
+ char *wkt = lwgeom_to_wkt(mpoly, WKT_ISO, DBL_DIG, NULL);
+ RASTER_DEBUGF(4, "before multi = %s", wkt);
+ rtdealloc(wkt);
+ }
#endif
- RASTER_DEBUGF(4, "mpoly @ %p", mpoly);
+ RASTER_DEBUGF(4, "mpoly @ %p", mpoly);
- /*
- lwgeom_as_multi() only does a shallow clone internally
- so input and output geometries may share memory
- hence the deep clone of the output geometry for returning
- is the only way to guarantee the memory isn't shared
- */
- mpoly = lwgeom_as_multi(tmp);
- clone = lwgeom_clone_deep(mpoly);
- lwgeom_free(tmp);
- lwgeom_free(mpoly);
- mpoly = clone;
+ /*
+ lwgeom_as_multi() only does a shallow clone internally
+ so input and output geometries may share memory
+ hence the deep clone of the output geometry for returning
+ is the only way to guarantee the memory isn't shared
+ */
+ mpoly = lwgeom_as_multi(tmp);
+ clone = lwgeom_clone_deep(mpoly);
+ lwgeom_free(tmp);
+ lwgeom_free(mpoly);
+ mpoly = clone;
- RASTER_DEBUGF(4, "mpoly @ %p", mpoly);
+ RASTER_DEBUGF(4, "mpoly @ %p", mpoly);
+
+#if POSTGIS_DEBUG_LEVEL > 3
+ {
+ char *wkt = lwgeom_to_wkt(mpoly, WKT_ISO, DBL_DIG, NULL);
+ RASTER_DEBUGF(4, "after multi = %s", wkt);
+ rtdealloc(wkt);
+ }
+#endif
+ }
#if POSTGIS_DEBUG_LEVEL > 3
{
char *wkt = lwgeom_to_wkt(mpoly, WKT_ISO, DBL_DIG, NULL);
- RASTER_DEBUGF(4, "after multi = %s", wkt);
+ RASTER_DEBUGF(4, "returning geometry = %s", wkt);
rtdealloc(wkt);
}
#endif
- }
-#if POSTGIS_DEBUG_LEVEL > 3
- {
- char *wkt = lwgeom_to_wkt(mpoly, WKT_ISO, DBL_DIG, NULL);
- RASTER_DEBUGF(4, "returning geometry = %s", wkt);
- rtdealloc(wkt);
- }
-#endif
+ *surface = lwgeom_as_lwmpoly(mpoly);
+ return ES_NONE;
+/*#DIA_SVACE_MAJOR>>>*/
- *surface = lwgeom_as_lwmpoly(mpoly);
return ES_NONE;
}
--
Gitblit v1.10.0