Skip to content

Commit

Permalink
Fix compilation without GDAL and OGR (fixes #5539)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jan 12, 2018
1 parent 20ee78f commit bba2982
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions mapdraw.c
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion mapio.c
Expand Up @@ -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;

Expand Down

0 comments on commit bba2982

Please sign in to comment.