Skip to content

Commit

Permalink
Correct test to resolve PROJECTION AUTO in msSHPLayerOpen() is '#if d…
Browse files Browse the repository at this point in the history
…efined(USE_GDAL) || defined(USE_OGR)'
  • Loading branch information
rouault committed Jul 6, 2013
1 parent 2f4cb71 commit d2bf673
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mapshape.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <assert.h> #include <assert.h>
#include "mapserver.h" #include "mapserver.h"


#ifdef USE_GDAL #if defined(USE_GDAL) || defined(USE_OGR)
#include <cpl_conv.h> #include <cpl_conv.h>
#include <ogr_srs_api.h> #include <ogr_srs_api.h>
#endif #endif
Expand Down Expand Up @@ -2514,7 +2514,7 @@ int msSHPLayerOpen(layerObj *layer)
if (layer->projection.numargs > 0 && if (layer->projection.numargs > 0 &&
EQUAL(layer->projection.args[0], "auto")) EQUAL(layer->projection.args[0], "auto"))
{ {
#ifdef USE_GDAL #if defined(USE_GDAL) || defined(USE_OGR)
const char* pszPRJFilename = CPLResetExtension(szPath, "prj"); const char* pszPRJFilename = CPLResetExtension(szPath, "prj");
int bOK = MS_FALSE; int bOK = MS_FALSE;
FILE* fp = fopen(pszPRJFilename, "rb"); FILE* fp = fopen(pszPRJFilename, "rb");
Expand Down Expand Up @@ -2553,11 +2553,11 @@ int msSHPLayerOpen(layerObj *layer)
msDebug( "Unable to get SRS from shapefile '%s' for layer '%s'.\n", szPath, layer->name ); msDebug( "Unable to get SRS from shapefile '%s' for layer '%s'.\n", szPath, layer->name );
} }
} }
#else #else /* !(defined(USE_GDAL) || defined(USE_OGR)) */
if( layer->debug || (layer->map && layer->map->debug) ) { if( layer->debug || (layer->map && layer->map->debug) ) {
msDebug( "Unable to get SRS from shapefile '%s' for layer '%s'. GDAL support needed\n", szPath, layer->name ); msDebug( "Unable to get SRS from shapefile '%s' for layer '%s'. GDAL or OGR support needed\n", szPath, layer->name );
} }
#endif #endif /* defined(USE_GDAL) || defined(USE_OGR) */
} }


return MS_SUCCESS; return MS_SUCCESS;
Expand Down

0 comments on commit d2bf673

Please sign in to comment.