]> granicus.if.org Git - postgis/commitdiff
Use normal autoconf convention of using #define to determine whether or not GDALFPOLY...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sat, 14 Jan 2012 00:49:29 +0000 (00:49 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Sat, 14 Jan 2012 00:49:29 +0000 (00:49 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8810 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
raster/rt_core/rt_api.c
raster/test/core/testapi.c

index 75002d3beec80e7b67eec7ad22e769db34bbe382..a998acec9f0296bf7a04a04cff28710fa00f77ea 100644 (file)
@@ -919,7 +919,7 @@ if test "x$RASTER" = "xraster"; then dnl # {
        dnl Check if the new polygonize function is present
        AC_CHECK_LIB([gdal], [GDALFPolygonize],
                [AC_DEFINE_UNQUOTED([GDALFPOLYGONIZE], [1], [Define to 1 if GDALFPolygonize function is available])], 
-               [AC_DEFINE_UNQUOTED([GDALFPOLYGONIZE], [0], [Define to 1 if GDALFPolygonize function is available])]) 
+               []) 
 
     dnl Extract the linker and include flags 
     LIBGDAL_LDFLAGS=`$GDAL_CONFIG --libs`
index 126286c6130a1a29fde2401a7f3802a22d8fec57..10a4415f2b10f3f6149ff1ee1b749a0086e95cf6 100644 (file)
@@ -4907,7 +4907,7 @@ rt_raster_dump_as_wktpolygons(rt_raster raster, int nband, int * pnElements)
     /**
      * We don't need a raster mask band. Each band has a nodata value.
      **/
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
     GDALFPolygonize(gdal_band, NULL, hLayer, iPixVal, NULL, NULL, NULL);
 #else
     GDALPolygonize(gdal_band, NULL, hLayer, iPixVal, NULL, NULL, NULL);
index 3d23bbaf13e58acfb7de50188c830cf49958f0e7..61a81eacf78f5d3c43d6d99aea827b5a1f736ea9 100644 (file)
@@ -2425,7 +2425,7 @@ main()
        */
 
 
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
                CHECK(FLT_EQ(gv[0].val, 1.8));
 #else
                CHECK(FLT_EQ(gv[0].val, 2.0));
@@ -2436,7 +2436,7 @@ main()
                CHECK_EQUALS_DOUBLE(gv[1].val, 0.0);
                CHECK(!strcmp(gv[1].geom, "POLYGON ((3 3,3 6,6 6,6 3,3 3))"));
 
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
                CHECK(FLT_EQ(gv[2].val, 2.8));
 #else
                CHECK(FLT_EQ(gv[2].val, 3.0));
@@ -2454,7 +2454,7 @@ main()
 
 
                /* Second test: NODATA value = 1.8 */
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
                rt = fillRasterToPolygonize(1, 1.8);
 #else
                rt = fillRasterToPolygonize(1, 2.0);
@@ -2474,7 +2474,7 @@ main()
                }
        */
 
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
                CHECK_EQUALS_DOUBLE(gv[1].val, 0.0);
                CHECK(!strcmp(gv[1].geom, "POLYGON ((3 3,3 6,6 6,6 3,3 3))"));
 
@@ -2499,7 +2499,7 @@ main()
         deepRelease(rt);
 
                /* Third test: NODATA value = 2.8 */
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
        rt = fillRasterToPolygonize(1, 2.8);
 #else  
        rt = fillRasterToPolygonize(1, 3.0);
@@ -2518,7 +2518,7 @@ main()
                }
        */
 
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
        CHECK(FLT_EQ(gv[0].val, 1.8));
 
                CHECK_EQUALS_DOUBLE(gv[3].val, 0.0);
@@ -2555,7 +2555,7 @@ main()
                }
                */
 
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
        CHECK(FLT_EQ(gv[0].val, 1.8));
 #else
        CHECK(FLT_EQ(gv[0].val, 2.0));
@@ -2563,7 +2563,7 @@ main()
 
                CHECK(!strcmp(gv[0].geom, "POLYGON ((3 1,3 2,2 2,2 3,1 3,1 6,2 6,2 7,3 7,3 8,5 8,5 6,3 6,3 3,4 3,5 3,5 1,3 1))"));
 
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
        CHECK(FLT_EQ(gv[1].val, 2.8));
 #else
        CHECK(FLT_EQ(gv[1].val, 3.0));
@@ -2591,7 +2591,7 @@ main()
                }
        */
 
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
        CHECK(FLT_EQ(gv[0].val, 1.8));
 #else
        CHECK(FLT_EQ(gv[0].val, 2.0));
@@ -2602,7 +2602,7 @@ main()
                CHECK_EQUALS_DOUBLE(gv[1].val, 0.0);
                CHECK(!strcmp(gv[1].geom, "POLYGON ((3 3,3 6,6 6,6 3,3 3))"));
 
-#if GDALFPOLYGONIZE == 1
+#ifdef GDALFPOLYGONIZE
        CHECK(FLT_EQ(gv[2].val, 2.8));
 #else
        CHECK(FLT_EQ(gv[2].val, 3.0));