[mapserver-commits] r7364 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Feb 7 14:45:02 EST 2008
Author: warmerdam
Date: 2008-02-07 14:45:02 -0500 (Thu, 07 Feb 2008)
New Revision: 7364
Modified:
trunk/mapserver/mapdrawgdal.c
Log:
Added EXTENT_PRIORITY layer processing option.
Modified: trunk/mapserver/mapdrawgdal.c
===================================================================
--- trunk/mapserver/mapdrawgdal.c 2008-02-07 16:13:38 UTC (rev 7363)
+++ trunk/mapserver/mapdrawgdal.c 2008-02-07 19:45:02 UTC (rev 7364)
@@ -1594,6 +1594,7 @@
double *padfGeoTransform )
{
+ const char *extent_priority = NULL;
#if defined(USE_WMS_SVR) || defined (USE_WFS_SVR)
rectObj rect;
#endif
@@ -1609,6 +1610,23 @@
padfGeoTransform[5] = -1.0;
/* -------------------------------------------------------------------- */
+/* Do we want to override GDAL with a worldfile if one is present? */
+/* -------------------------------------------------------------------- */
+ extent_priority = CSLFetchNameValue( layer->processing,
+ "EXTENT_PRIORITY" );
+
+ if( extent_priority != NULL
+ && EQUALN(extent_priority,"WORLD",5) )
+ {
+ if( GDALGetDescription(hDS) != NULL
+ && GDALReadWorldFile(GDALGetDescription(hDS), "wld",
+ padfGeoTransform) )
+ {
+ return MS_SUCCESS;
+ }
+ }
+
+/* -------------------------------------------------------------------- */
/* Try GDAL. */
/* */
/* Make sure that ymax is always at the top, and ymin at the */
More information about the mapserver-commits
mailing list