Skip to content

Commit

Permalink
Fix kerneldensity layer not to loose connection type on reopen (#5497)
Browse files Browse the repository at this point in the history
  • Loading branch information
szekerest committed Oct 23, 2017
1 parent 7ca0c1c commit 38f3cae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions maplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ int msLayerOpen(layerObj *layer)
if(layer->tileindex && layer->connectiontype == MS_SHAPEFILE)
layer->connectiontype = MS_TILED_SHAPEFILE;

if(layer->type == MS_LAYER_RASTER && layer->connectiontype != MS_WMS)
if(layer->type == MS_LAYER_RASTER && layer->connectiontype != MS_WMS
&& layer->connectiontype != MS_KERNELDENSITY)
layer->connectiontype = MS_RASTER;

if ( ! layer->vtable) {
Expand Down Expand Up @@ -1891,7 +1892,8 @@ int msInitializeVirtualTable(layerObj *layer)
if(layer->tileindex && layer->connectiontype == MS_SHAPEFILE)
layer->connectiontype = MS_TILED_SHAPEFILE;

if(layer->type == MS_LAYER_RASTER && layer->connectiontype != MS_WMS)
if(layer->type == MS_LAYER_RASTER && layer->connectiontype != MS_WMS
&& layer->connectiontype != MS_KERNELDENSITY)
layer->connectiontype = MS_RASTER;

switch(layer->connectiontype) {
Expand All @@ -1914,6 +1916,10 @@ int msInitializeVirtualTable(layerObj *layer)
/* WMS should be treated as a raster layer */
return(msRASTERLayerInitializeVirtualTable(layer));
break;
case(MS_KERNELDENSITY):
/* KERNELDENSITY should be treated as a raster layer */
return(msRASTERLayerInitializeVirtualTable(layer));
break;
case(MS_ORACLESPATIAL):
return(msOracleSpatialLayerInitializeVirtualTable(layer));
break;
Expand Down
2 changes: 1 addition & 1 deletion maprasterquery.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static void msRasterLayerInfoInitialize( layerObj *layer )
/* We need to do this or the layer->layerinfo will be interpreted */
/* as shapefile access info because the default connectiontype is */
/* MS_SHAPEFILE. */
if (layer->connectiontype != MS_WMS)
if (layer->connectiontype != MS_WMS && layer->connectiontype != MS_KERNELDENSITY)
layer->connectiontype = MS_RASTER;

rlinfo->query_result_hard_max = 1000000;
Expand Down

0 comments on commit 38f3cae

Please sign in to comment.