Permalink
Browse files

Fix compilation without GDAL and OGR (fixes #5539)

  • Loading branch information...
rouault committed Jan 12, 2018
1 parent 20ee78f commit bba2982a19514543b7ad4a5b73c5eb12dc219096
Showing with 9 additions and 5 deletions.
  1. +8 −4 mapdraw.c
  2. +1 −1 mapio.c
View
@@ -959,13 +959,15 @@ int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image)
if((map->projection.numargs > 0) && (layer->projection.numargs > 0)) {
int bDone = MS_FALSE;
#ifdef USE_GDAL
if( layer->connectiontype == MS_UVRASTER )
{
/* Nasty hack to make msUVRASTERLayerWhichShapes() aware that the */
/* original area of interest is (map->extent, map->projection)... */
/* Useful when dealin with UVRASTER that extend beyond 180 deg */
msUVRASTERLayerUseMapExtentAndProjectionForNextWhichShapes( layer, map );
}
#endif
/* For UVRaster, it is important that the searchrect is not too large */
/* to avoid insufficient intermediate raster resolution, which could */
@@ -1041,10 +1043,10 @@ int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image)
{
/* otherwise clip the map extent with the reprojected layer */
/* extent */
searchrect.minx = MAX( map_extent_minx, layer_extent.minx );
searchrect.maxx = MIN( map_extent_maxx, layer_extent.maxx );
searchrect.miny = MAX( map_extent_miny, layer_extent.miny );
searchrect.maxy = MIN( map_extent_maxy, layer_extent.maxy );
searchrect.minx = MS_MAX( map_extent_minx, layer_extent.minx );
searchrect.maxx = MS_MIN( map_extent_maxx, layer_extent.maxx );
searchrect.miny = MS_MAX( map_extent_miny, layer_extent.miny );
searchrect.maxy = MS_MIN( map_extent_maxy, layer_extent.maxy );
/* and reproject into the layer projection */
msProjectRect(&map_proj, &layer->projection, &searchrect);
}
@@ -1067,10 +1069,12 @@ int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image)
status = msLayerWhichShapes(layer, searchrect, MS_FALSE);
#ifdef USE_GDAL
if( layer->connectiontype == MS_UVRASTER )
{
msUVRASTERLayerUseMapExtentAndProjectionForNextWhichShapes( layer, NULL );
}
#endif
if(status == MS_DONE) { /* no overlap */
msLayerClose(layer);
View
@@ -787,7 +787,7 @@ hashTableObj* msIO_getAndStripStdoutBufferMimeHeaders()
/* Loop over all headers. */
/* -------------------------------------------------------------------- */
current_pos = 0;
while( TRUE ) {
while( MS_TRUE ) {
int pos_of_column = -1;
char* key, *value;

0 comments on commit bba2982

Please sign in to comment.