We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems like Mapserver, when it comes to WMS dimension, has some issues related to data types.
Example Postgres dataset (attached):
Example Mapfile (attached).
Example test URLs:
Example 1 -- Dimension: DIM_KOMMUNENR=1736 -- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=1736&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945 -- Result: Gives a error message stating that the SQL from Mapserver tries to compare text and numbers. Interprets inputs values as numbers -- Where statement: (kommunenr = 1736)
Example 2 -- Dimension: DIM_KOMMUNENR='1736' -- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR='1736'&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945 -- Result: No error message is given but no hits in the map (as expected) -- Where statement: (kommunenr = '''1736''')
Example 3 -- Dimension: DIM_KOMMUNENR=0438 -- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=0438&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945 -- Result: Gives a error message stating that the SQL from Mapserver tries to compare text and numbers. Interprets inputs values as numbers -- Where statement: (kommunenr = 0438)
Example 4 -- Dimension: DIM_KOMMUNENR=p1627 -- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=p1627&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945 -- Result: Correct result -- Where statement: (kommunenr = 'p1627')
Example 5 -- Example: Passing several values and the first one is with text/letters (p1627) -- Dimension: DIM_KOMMUNENR=p1627,0438,1736 -- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=p1627,0438,1736&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945 -- Result: Correct result -- Where statement: ((kommunenr = 'p1627') OR (kommunenr = '0438') OR (kommunenr = '1736'))
Example 6 -- Example: Passing several values and the last one is with text/letters (p1627) -- Dimension: DIM_KOMMUNENR=0438,1736,p1627 -- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=0438,1736,p1627&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945 -- Result: Gives a error message stating that the SQL from Mapserver tries to compare text and numbers. Interprets inputs values as numbers -- Where statement: ((kommunenr = 0438) OR (kommunenr = 1736) OR (kommunenr = p1627))
Specifying "WMS_KOMMUNENR_TYPE" "Character" in the mapfile doesn't solve the problem
The text was updated successfully, but these errors were encountered:
Fix Character type handling in WMS dimension filters (MapServer#5374)
e075ccb
Merge pull request #5375 from szekerest/wmsdimtype
cd36c08
Fix Character type handling in WMS dimension filters (#5374)
szekerest
No branches or pull requests
Seems like Mapserver, when it comes to WMS dimension, has some issues related to data types.
Example Postgres dataset (attached):
-- 1736
-- 0438
-- p1627 (added to this test case)
Example Mapfile (attached).
Example test URLs:
Example 1
-- Dimension: DIM_KOMMUNENR=1736
-- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=1736&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945
-- Result: Gives a error message stating that the SQL from Mapserver tries to compare text and numbers. Interprets inputs values as numbers
-- Where statement: (kommunenr = 1736)
Example 2
-- Dimension: DIM_KOMMUNENR='1736'
-- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR='1736'&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945
-- Result: No error message is given but no hits in the map (as expected)
-- Where statement: (kommunenr = '''1736''')
Example 3
-- Dimension: DIM_KOMMUNENR=0438
-- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=0438&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945
-- Result: Gives a error message stating that the SQL from Mapserver tries to compare text and numbers. Interprets inputs values as numbers
-- Where statement: (kommunenr = 0438)
Example 4
-- Dimension: DIM_KOMMUNENR=p1627
-- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=p1627&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945
-- Result: Correct result
-- Where statement: (kommunenr = 'p1627')
Example 5
-- Example: Passing several values and the first one is with text/letters (p1627)
-- Dimension: DIM_KOMMUNENR=p1627,0438,1736
-- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=p1627,0438,1736&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945
-- Result: Correct result
-- Where statement: ((kommunenr = 'p1627') OR (kommunenr = '0438') OR (kommunenr = '1736'))
Example 6
-- Example: Passing several values and the last one is with text/letters (p1627)
-- Dimension: DIM_KOMMUNENR=0438,1736,p1627
-- URL: http://localhost/a_a3_mapserver/mapserv.ashx?LAYERS=layer_24&TRANSPARENT=TRUE&FORMAT=image%2Fpng&VERSION=1.3.0&EXCEPTIONS=XML&SERVICE=WMS&REQUEST=GetMap&STYLES=&CRS=EPSG%3A32633&DIM_KOMMUNENR=0438,1736,p1627&BBOX=-2131693.7644105,5730101.8245633,2986426.2355895,8289161.8245633&WIDTH=1890&HEIGHT=945
-- Result: Gives a error message stating that the SQL from Mapserver tries to compare text and numbers. Interprets inputs values as numbers
-- Where statement: ((kommunenr = 0438) OR (kommunenr = 1736) OR (kommunenr = p1627))
Specifying "WMS_KOMMUNENR_TYPE" "Character" in the mapfile doesn't solve the problem
The text was updated successfully, but these errors were encountered: