-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GRID layer: fix label positionning when requesting WGS84 graticule in…
… EPSG:3857 This clamps labels in the validity area of EPSG:3857, even if the eastings of the BBOX exceed 20037508.
- Loading branch information
Showing
5 changed files
with
195 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+25.9 KB
...test/wxs/expected/wms_grid_reproj_to_3857_non_square_pixels_beyond_validity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.8 KB
msautotest/wxs/expected/wms_grid_reproj_to_3857_square_pixels_beyond_validity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.6 KB
msautotest/wxs/expected/wms_grid_reproj_to_3857_square_pixels_within_validity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# | ||
# Test WMS | ||
# | ||
# REQUIRES: INPUT=GDAL OUTPUT=PNG SUPPORTS=WMS | ||
# | ||
# Check that labels are in the left and right | ||
# | ||
# RUN_PARMS: wms_grid_reproj_to_3857_square_pixels_within_validity.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=false&LAYERS=grid4326&CRS=EPSG:3857&STYLES=&WIDTH=2000&HEIGHT=1500&BBOX=-20000000,-15000000,20000000,15000000" > [RESULT_DEMIME] | ||
# | ||
# RUN_PARMS: wms_grid_reproj_to_3857_square_pixels_beyond_validity.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=false&LAYERS=grid4326&CRS=EPSG:3857&STYLES=&WIDTH=2036&HEIGHT=739&BBOX=-39996745.16861447,-14460662.759102784,39683659.10075838,14460662.759102784" > [RESULT_DEMIME] | ||
# | ||
# RUN_PARMS: wms_grid_reproj_to_3857_non_square_pixels_beyond_validity.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=false&LAYERS=grid4326&CRS=EPSG:3857&STYLES=&WIDTH=2036&HEIGHT=735&BBOX=-39996745.16861447,-14460662.759102784,39683659.10075838,14460662.759102784" > [RESULT_DEMIME] | ||
# | ||
|
||
MAP | ||
NAME WMS_GRID_TEST | ||
EXTENT -180 -90 180 90 | ||
UNITS DD | ||
FONTSET "../misc/fonts.lst" | ||
|
||
WEB | ||
METADATA | ||
wms_enable_request "*" | ||
END | ||
END | ||
|
||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
|
||
OUTPUTFORMAT | ||
NAME GDPNG | ||
DRIVER "GD/PNG" | ||
MIMETYPE "image/png" | ||
EXTENSION "png" | ||
END | ||
|
||
LAYER | ||
NAME "grid4326" | ||
|
||
METADATA | ||
"wms_srs" "EPSG:4326 EPSG:3857" | ||
"wms_extent" "-180 -90 180 90" | ||
END | ||
|
||
TYPE LINE | ||
|
||
CLASS | ||
NAME "Graticule" | ||
COLOR 255 153 0 | ||
LABEL | ||
COLOR 0 0 0 | ||
FONT lucida | ||
TYPE truetype | ||
SIZE 8 | ||
POSITION AUTO | ||
PARTIALS FALSE | ||
BUFFER 5 | ||
OUTLINECOLOR 255 255 255 | ||
END | ||
END | ||
|
||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
|
||
GRID | ||
LABELFORMAT 'DDMMSS' # nice if a projected SRS used | ||
MININTERVAL 30 | ||
MAXINTERVAL 30 | ||
END | ||
|
||
END # Layer | ||
|
||
END |