From: David Zwarg Date: Fri, 18 Nov 2011 14:53:36 +0000 (+0000) Subject: Fixed debug problem in #1308 X-Git-Tag: 2.0.0alpha1~681 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ba7a6f7e489b7d6fee587c8d3ab3190ec566262;p=postgis Fixed debug problem in #1308 git-svn-id: http://svn.osgeo.org/postgis/trunk@8179 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/raster/rt_core/rt_api.c b/raster/rt_core/rt_api.c index 64cfd1cae..b6503def0 100644 --- a/raster/rt_core/rt_api.c +++ b/raster/rt_core/rt_api.c @@ -4458,7 +4458,7 @@ rt_raster_dump_as_wktpolygons(rt_raster raster, int nband, int * pnElements) hFeature = OGR_L_GetNextFeature(hLayer); dValue = OGR_F_GetFieldAsDouble(hFeature, iPixVal); - hGeom = OGR_F_GetGeometryRef(hFeature); + hGeom = OGR_F_GetGeometryRef(hFeature); OGR_G_ExportToWkt(hGeom, &pszSrcText); pols[j].val = dValue; diff --git a/raster/rt_pg/rt_pg.c b/raster/rt_pg/rt_pg.c index bd162c58c..ded778e1f 100644 --- a/raster/rt_pg/rt_pg.c +++ b/raster/rt_pg/rt_pg.c @@ -847,8 +847,8 @@ Datum RASTER_dumpAsWKTPolygons(PG_FUNCTION_ARGS) values[2] = Int32GetDatum(geomval2[call_cntr].srid); POSTGIS_RT_DEBUGF(4, "Result %d, Polygon %s", call_cntr, geomval2[call_cntr].geom); - POSTGIS_RT_DEBUGF(4, "Result %d, val %s", call_cntr, geomval2[call_cntr].val); - POSTGIS_RT_DEBUGF(4, "Result %d, val %s", call_cntr, geomval2[call_cntr].srid); + POSTGIS_RT_DEBUGF(4, "Result %d, val %f", call_cntr, geomval2[call_cntr].val); + POSTGIS_RT_DEBUGF(4, "Result %d, srid %d", call_cntr, geomval2[call_cntr].srid); /** * Free resources. @@ -856,7 +856,7 @@ Datum RASTER_dumpAsWKTPolygons(PG_FUNCTION_ARGS) pfree(geomval2[call_cntr].geom); /* build a tuple */ - tuple = heap_form_tuple(tupdesc, values, nulls); + tuple = heap_form_tuple(tupdesc, values, nulls); /* make the tuple into a datum */ result = HeapTupleGetDatum(tuple);