[mapserver-commits] r12388 - trunk/mapserver/mapcache/src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:21:37 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:21:37 -0700 (Fri, 26 Aug 2011)
New Revision: 12388

Modified:
   trunk/mapserver/mapcache/src/geocache_seed.c
Log:
add first used srs aliases for french geoportal grid
thomas.bonfort | 2011-06-09 19:47:20 +0200 (Thu, 09 Jun 2011)

Modified: trunk/mapserver/mapcache/src/geocache_seed.c
===================================================================
--- trunk/mapserver/mapcache/src/geocache_seed.c	2011-08-26 11:21:32 UTC (rev 12387)
+++ trunk/mapserver/mapcache/src/geocache_seed.c	2011-08-26 11:21:37 UTC (rev 12388)
@@ -519,6 +519,8 @@
       extent = apr_pcalloc(gctx->pool,4*sizeof(double));
       int f=0;
       while( (hFeature = OGR_L_GetNextFeature(layer)) != NULL ) {
+         OGRGeometryH geom = OGR_F_GetGeometryRef(hFeature);
+         if(!geom ||  !OGR_G_IsValid(geom)) continue;
          clippers[f] = OGR_G_Clone(OGR_F_GetGeometryRef(hFeature));
          OGREnvelope ogr_extent;
          OGR_G_GetEnvelope	(clippers[f], &ogr_extent);	
@@ -537,9 +539,7 @@
          OGR_F_Destroy( hFeature );
          f++;
       }
-      if(f != nClippers) {
-         usage(argv[0],"error");
-      }
+      nClippers = f;
       
 
     }



More information about the mapserver-commits mailing list