You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that mask layers don't transform request bbox to database srs when requesting masking polygons from backend.
Performing a WMS request in epsg:4326 against a mask layer defined in epsg:25832 (utm32 etrs89) will send the following SQL to postgres
msPostGISLayerWhichShapes query: select encode(ST_AsBinary(ST_Force2D("geom"),'NDR'),'hex')
as geom,"uid" from (select g.uid, g.geom from public.mask_polygon g WHERE uid in (5,6)) as subquery
where geom && ST_GeomFromText('POLYGON((10.1747920246582
55.374061201518,10.1747920246582 55.4801852455007,10.5639135192612
55.4801852455007,10.5639135192612 55.374061201518,10.1747920246582
55.374061201518))',25832)
The coordinates in the bounding polygon are clearly in 4326 and not in 25832 as they are declared to be.
The mask layer definition is
LAYER
DEBUG 5
NAME "polygon_mask_filter"
STATUS ON
TYPE POLYGON
CONNECTIONTYPE POSTGIS
CONNECTION "host=host port=5432 dbname=PolygonMaskDB user=user password=pass"
PROCESSING "CLOSE_CONNECTION=DEFER"
METADATA
"wms_enable_request" "!*"
END
DATA "geom from (select g.uid, g.geom from public.mask_polygon g WHERE uid in (5,6)) as subquery using unique uid using srid=25832"
VALIDATION
"mask_global" ".*"
"default_mask_global" "null"
END
CLASS
STYLE
COLOR 0 0 0
ANTIALIAS true
END
END
END
Cool! Adding a PROJECTION block to the mask layer seems to work around this issue (and also #5114).
My mask layer definition now looks like:
LAYER
DEBUG 5
PROJECTION
"init=epsg:25832"
END
NAME "polygon_mask_filter"
STATUS ON
TYPE POLYGON
CONNECTIONTYPE POSTGIS
CONNECTION "host=host port=5432 dbname=PolygonMaskDB user=user password=pass"
PROCESSING "CLOSE_CONNECTION=DEFER"
METADATA
"wms_enable_request" "!*"
END
DATA "geom from (select g.uid, g.geom from public.mask_polygon g WHERE uid in (5,6)) as subquery using unique uid using srid=25832"
VALIDATION
"mask_global" ".*"
"default_mask_global" "null"
END
CLASS
STYLE
COLOR 0 0 0
ANTIALIAS true
END
END
END
It seems that mask layers don't transform request bbox to database srs when requesting masking polygons from backend.
Performing a WMS request in epsg:4326 against a mask layer defined in epsg:25832 (utm32 etrs89) will send the following SQL to postgres
The coordinates in the bounding polygon are clearly in 4326 and not in 25832 as they are declared to be.
The mask layer definition is
I am using mapserver 6.4.1.
I guess this issue is related to #5114
The text was updated successfully, but these errors were encountered: