Permalink
Browse files

Fix kerneldensity layer not to loose connection type on reopen (#5497)

  • Loading branch information...
szekerest committed Oct 23, 2017
1 parent 7ca0c1c commit 38f3cae73d6ad55a3d16786441a065275f3335b4
Showing with 9 additions and 3 deletions.
  1. +8 −2 maplayer.c
  2. +1 −1 maprasterquery.c
View
@@ -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) {
@@ -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) {
@@ -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;
View
@@ -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;

0 comments on commit 38f3cae

Please sign in to comment.