Skip to content

Commit

Permalink
Added EXTENT_PRIORITY layer processing option.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/mapserver/trunk@7364 7532c77e-422f-0410-93f4-f0b67bdd69e2
  • Loading branch information
warmerdam committed Feb 7, 2008
1 parent f4de4fe commit fbf4fb2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions mapdrawgdal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1594,6 +1594,7 @@ int msGetGDALGeoTransform( GDALDatasetH hDS, mapObj *map, layerObj *layer,
double *padfGeoTransform )

{
const char *extent_priority = NULL;
#if defined(USE_WMS_SVR) || defined (USE_WFS_SVR)
rectObj rect;
#endif
Expand All @@ -1608,6 +1609,23 @@ int msGetGDALGeoTransform( GDALDatasetH hDS, mapObj *map, layerObj *layer,
padfGeoTransform[4] = 0.0;
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. */
/* */
Expand Down

0 comments on commit fbf4fb2

Please sign in to comment.