When combining Cluster and WMS dimension the Cluster is ignored #5364

Closed
szekerest opened this Issue Jan 4, 2017 · 3 comments

Projects

None yet

2 participants

@szekerest
Member

Sample of mapfile etc:

GetMap request with dimension filter: &dim_mainmissiontype=Brann
gives non clustered map and if for instance Cluster_FeatureCount is used, an error is thrown
The same GetMap request without dimension filter
gives a image with clustered objects

Example mapfile:
LAYER
TYPE point
METADATA
"WMS_TITLE" "Fire rescue missions2"
"GML_INCLUDE_ITEMS" "oppdragid,mainmissiontype"
"WMS_INCLUDE_ITEMS" "oppdragid,mainmissiontype"
"WMS_MAINMISSIONTYPE_ITEM" "mainmissiontype"
"WMS_MAINMISSIONTYPE_EXTENT" "Andre oppdrag,Brann,Brannhindrende tiltak,Ulykke"
"WMS_MAINMISSIONTYPE_UNITS" ""
"WMS_MAINMISSIONTYPE_DEFAULT" ""
"WMS_DIMENSIONLIST" "mainmissiontype"
END
CONNECTION "user=xx password=xx dbname=xx host=localhost port=5433"
CONNECTIONTYPE postgis
DATA "wkb_geometry FROM (SELECT oppdragid, mainmissiontype, wkb_geometry FROM firerescuemissions) AS MYTABLE USING UNIQUE oppdragid USING SRID=4326"
EXTENT -9223372036.854776 0 31.118456919 9223372036.854776
NAME "layer_x"
PROCESSING "CLOSE_CONNECTION=DEFER"
PROCESSING "CLUSTER_GET_ALL_SHAPES=ON"
PROCESSING "ITEMS=oppdragid,mainmissiontype"
PROJECTION "init=epsg:4326" END
CLASS
NAME "class"
STYLE
ANGLE auto
COLOR 255 127 0
LINECAP round
LINEJOIN round
MAXSIZE 30
MINSIZE 10
OUTLINECOLOR 0 0 0
SIZE [Cluster_FeatureCount]
SYMBOL "circle"
WIDTH 1
END
END
CLUSTER
MAXDISTANCE 40
REGION "ellipse"
END
END

Example error message:
Error using Mapserver 7.0.1 and 7.0.2:
msDrawMap(): Image handling error. Failed to draw layer named 'layer_x'.msPostGISLayerWhichShapes(): Query error. Error executing query. Check server logs
Error using Mapserver 6.4.0:
msDrawMap(): Image handling error. Failed to draw layer named 'layer_x'.msPostGISLayerWhichShapes(): Query error. Error executing query: ERROR: column "Cluster:FeatureCount" does not exist
LINE 1: select "Cluster:FeatureCount",encode(ST_AsBinary(ST_Force_2D...

@szekerest szekerest self-assigned this Jan 4, 2017
@frodewj
frodewj commented Jan 5, 2017

This seems to fix the error message when combining cluster and wms dimension but it seems like the filter/dimension is ignored. All features are returned when using a filter/dimension that should only return some of them

@szekerest
Member

Fixed with the commit above

@frodewj
frodewj commented Jan 6, 2017

Excellent, tested and it works perfectly

@szekerest szekerest closed this Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment