-
-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
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
uvraster not rendered correctly #6914
Comments
Is there any difference if you set an EXTENT property on the MAP and LAYER (covering the world)? |
No, the problem also occurs with EXTENT set on map and layer. I attached another example where the data ranges from (0,0) to (30,90) and the problem happens if i want to draw from (0,0) to (29,89) OKNot ok |
@kaiwirt is the dataset you're using available publicly for download? |
@geographika I've uploaded the data and the map file to https://github.com/kaiwirt/uvraster |
@kaiwirt - I've recreated that Mapfile at https://app.mapserverstudio.net/#E8RzxwLm, however the BBOX requests seem to return very similar images for me. I have seen vector data go missing from a WMS request before so I think there is an issue somewhere, but it is hard to recreate. BBOX=-180,-90,179,90 BBOX=-180,-90,179,91 |
@geographika: I just figured out, that this happens on my system if i set PROJECTION = AUTO on the layer. If i use PROJECTION init=epsg:4326 on the layer everything seems to work. I find this in my error log My proj is Rel. 9.1.1, December 1st, 2022 Maybe an issue in the proj library? |
Might be good to get a quick comment from @rouault. |
as your source file is a GRIB dataset and GRIB almost never use EPSG:4326 but other geographic CRS with different datum or ellipsoid shape, if you specify PROJECTION AUTO and request GetMap on EPSG:4326, then a reprojection will occur between the GRIB CRS and EPSG:4326. I would have said that it was then expected that latitude > 90 are going to cause errors, but it seems the other way round.
Perhaps one of the heuristics in mapuvraster.c doesn't work, or one is lacking. Such global datasets touching/crossing the poles/the antimeridian are a source of huge headaches from implementation point of view. |
Expected behavior and actual behavior.
Following the example from https://mapserver.org/input/vector/vector_field.html to visualize data from a GRIB file, the data is only rendered correctly, if the Bounding Box extends over the globe.
OK
The following request (See Image 1) works:
http:///mapserv?MAP=/config/maps.map&service=WMS&version=1.1.1&request=GetMap&layers=uv&SRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=1000&HEIGHT=800&format=image/png&STYLES=
Not ok
The same request with longitude set to 179 doesn't (See Image 2)
http:///mapserv?MAP=/config/maps.map&service=WMS&version=1.1.1&request=GetMap&layers=uv&SRS=EPSG:4326&BBOX=-180,-90,179,90&WIDTH=1000&HEIGHT=800&format=image/png&STYLES=
OK
If the latitude is then set to 91 the data is rendered correctly again (See Image 3)
http:///mapserv?MAP=/config/maps.map&service=WMS&version=1.1.1&request=GetMap&layers=uv&SRS=EPSG:4326&BBOX=-180,-90,179,91&WIDTH=1000&HEIGHT=800&format=image/png&STYLES=
Expected
Expected behaviour would be, that all requests show (almost) the same image.
MapServer version and installation method
MapServer 8.0.0 and MapServer 8.0.1 on Debian in singularity-container
Mapfile
MAP
PROJECTION
"init=epsg:4326"
END
SYMBOL
NAME "horizline"
TYPE VECTOR
POINTS
0 0
1 0
END # points
END # symbol
SYMBOL
NAME "arrowhead"
TYPE vector
FILLED true
#ANCHORPOINT 0 0.5
POINTS
0 2
4 1
0 0
END # points
END # symbol
SYMBOL
NAME "arrowtail"
TYPE vector
FILLED true
ANCHORPOINT 1 0.5 # to shift the arrowtail
POINTS
0 2
4 1
0 0
-99 -99
0 1
4 1
END # points
END # symbol
LAYER
NAME "uv"
TYPE POINT
STATUS DEFAULT
CONNECTIONTYPE uvraster
DATA /config/entwurf/data/uv_wms/uv_field.grib
PROCESSING "BANDS=1,2"
PROCESSING "UV_SPACING=40"
PROCESSING "UV_SIZE_SCALE=0.2"
CLASS
STYLE
SYMBOL "horizline"
ANGLE [uv_angle]
SIZE [uv_length]
WIDTH 3
COLOR 100 255 0
END # style
STYLE
SYMBOL "arrowhead"
ANGLE [uv_angle]
SIZE 10
COLOR 255 0 0
POLAROFFSET [uv_length_2] [uv_angle]
END # style
STYLE
SYMBOL "arrowtail"
ANGLE [uv_angle]
SIZE 10
COLOR 255 0 0
POLAROFFSET [uv_length_2] [uv_minus_angle]
END # style
END # class
PROJECTION
AUTO
END
METADATA
"ows_enable_request" "*"
"wms_title" "Test"
"wms_srs" "EPSG:4326 EPSG:3857"
"wms_description" "Test Layer"
END
END # layer
END
Attachments
Image 1
Image 2
Image 3
The text was updated successfully, but these errors were encountered: