Skip to content

Commit 1c2b6f8

Browse files
committed
msautotest: add a test for CONTEXT= loading (refs #6779)
1 parent 1ab19e7 commit 1c2b6f8

File tree

3 files changed

+213
-0
lines changed

3 files changed

+213
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
Content-Type: application/vnd.ogc.wms_xml; charset=UTF-8
2+
3+
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
4+
<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"
5+
[
6+
<!ELEMENT VendorSpecificCapabilities EMPTY>
7+
]> <!-- end of DOCTYPE declaration -->
8+
9+
<WMT_MS_Capabilities version="1.1.1">
10+
11+
<Service>
12+
<Name>OGC:WMS</Name>
13+
<Title>Map Context demo</Title>
14+
<Abstract>Demo for map context document</Abstract>
15+
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/>
16+
<ContactInformation>
17+
</ContactInformation>
18+
</Service>
19+
20+
<Capability>
21+
<Request>
22+
<GetCapabilities>
23+
<Format>application/vnd.ogc.wms_xml</Format>
24+
<DCPType>
25+
<HTTP>
26+
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Get>
27+
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Post>
28+
</HTTP>
29+
</DCPType>
30+
</GetCapabilities>
31+
<GetMap>
32+
<Format>image/png</Format>
33+
<Format>image/jpeg</Format>
34+
<Format>image/png; mode=8bit</Format>
35+
<Format>image/vnd.jpeg-png</Format>
36+
<Format>image/vnd.jpeg-png8</Format>
37+
<Format>application/x-pdf</Format>
38+
<Format>image/svg+xml</Format>
39+
<Format>image/tiff</Format>
40+
<Format>application/vnd.google-earth.kml+xml</Format>
41+
<Format>application/vnd.google-earth.kmz</Format>
42+
<Format>application/vnd.mapbox-vector-tile</Format>
43+
<Format>application/x-protobuf</Format>
44+
<Format>application/json</Format>
45+
<DCPType>
46+
<HTTP>
47+
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Get>
48+
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Post>
49+
</HTTP>
50+
</DCPType>
51+
</GetMap>
52+
<GetFeatureInfo>
53+
<Format>text/plain</Format>
54+
<Format>application/vnd.ogc.gml</Format>
55+
<DCPType>
56+
<HTTP>
57+
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Get>
58+
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Post>
59+
</HTTP>
60+
</DCPType>
61+
</GetFeatureInfo>
62+
<DescribeLayer>
63+
<Format>text/xml</Format>
64+
<DCPType>
65+
<HTTP>
66+
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Get>
67+
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Post>
68+
</HTTP>
69+
</DCPType>
70+
</DescribeLayer>
71+
<GetLegendGraphic>
72+
<Format>image/png</Format>
73+
<Format>image/jpeg</Format>
74+
<Format>image/png; mode=8bit</Format>
75+
<Format>image/vnd.jpeg-png</Format>
76+
<Format>image/vnd.jpeg-png8</Format>
77+
<DCPType>
78+
<HTTP>
79+
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Get>
80+
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Post>
81+
</HTTP>
82+
</DCPType>
83+
</GetLegendGraphic>
84+
<GetStyles>
85+
<Format>text/xml</Format>
86+
<DCPType>
87+
<HTTP>
88+
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Get>
89+
<Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;"/></Post>
90+
</HTTP>
91+
</DCPType>
92+
</GetStyles>
93+
</Request>
94+
<Exception>
95+
<Format>application/vnd.ogc.se_xml</Format>
96+
<Format>application/vnd.ogc.se_inimage</Format>
97+
<Format>application/vnd.ogc.se_blank</Format>
98+
</Exception>
99+
<VendorSpecificCapabilities />
100+
<UserDefinedSymbolization SupportSLD="1" UserLayer="0" UserStyle="1" RemoteWFS="0"/>
101+
<Layer>
102+
<Name>mapcontext</Name>
103+
<Title>Map Context demo</Title>
104+
<Abstract>Demo for map context document</Abstract>
105+
<SRS>EPSG:4326</SRS>
106+
<LatLonBoundingBox minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000" />
107+
<BoundingBox SRS="EPSG:4326"
108+
minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000" />
109+
<Layer queryable="0" opaque="0" cascaded="0">
110+
<Name>province</Name>
111+
<Title>province</Title>
112+
<LatLonBoundingBox minx="-66.724329" miny="41.770508" maxx="-57.721680" maxy="48.477314" />
113+
<MetadataURL type="TC211">
114+
<Format>text/xml</Format>
115+
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;request=GetMetadata&amp;layer=province"/>
116+
</MetadataURL>
117+
<Style>
118+
<Name>default</Name>
119+
<Title>default</Title>
120+
<LegendURL width="85" height="20">
121+
<Format>image/png</Format>
122+
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost/path/to/wfs_simple?myparam=something&amp;version=1.1.1&amp;service=WMS&amp;request=GetLegendGraphic&amp;layer=province&amp;format=image/png&amp;STYLE=default"/>
123+
</LegendURL>
124+
</Style>
125+
</Layer>
126+
</Layer>
127+
</Capability>
128+
</WMT_MS_Capabilities>

msautotest/wxs/ows_context.map

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#
2+
# Test OWS Context loading
3+
#
4+
# REQUIRES: INPUT=GDAL OUTPUT=PNG SUPPORTS=WMS
5+
6+
# Capabilities updatesequence (less than)
7+
# RUN_PARMS: ows_context_caps.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&CONTEXT=ows_context.xml&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities" > [RESULT_DEVERSION]
8+
9+
MAP
10+
11+
NAME OWS_CONTEXT_TEST
12+
STATUS ON
13+
SIZE 400 300
14+
#EXTENT 2018000 -73300 3410396 647400
15+
EXTENT -67.5725 42 -58.9275 48.5
16+
UNITS METERS
17+
IMAGECOLOR 255 255 255
18+
SHAPEPATH ./data
19+
SYMBOLSET etc/symbols.sym
20+
FONTSET etc/fonts.txt
21+
22+
#
23+
# Start of web interface definition
24+
#
25+
WEB
26+
27+
IMAGEPATH "/tmp/ms_tmp/"
28+
IMAGEURL "/ms_tmp/"
29+
30+
METADATA
31+
"wms_onlineresource" "http://localhost/path/to/wfs_simple?myparam=something&"
32+
"ows_enable_request" "*"
33+
END
34+
END
35+
36+
PROJECTION
37+
"init=epsg:4326"
38+
# "init=./data/epsg2:42304"
39+
# "init=epsg:42304"
40+
END
41+
42+
43+
#
44+
# Start of layer definitions
45+
#
46+
47+
LAYER
48+
NAME province
49+
DATA province
50+
METADATA
51+
"wms_title" "province"
52+
END
53+
TYPE POINT
54+
STATUS ON
55+
PROJECTION
56+
"init=./data/epsg2:42304"
57+
# "init=epsg:42304"
58+
END
59+
60+
CLASSITEM "Name_e"
61+
62+
CLASS
63+
NAME "Province"
64+
STYLE
65+
COLOR 200 255 0
66+
OUTLINECOLOR 120 120 120
67+
END
68+
END
69+
END # Layer
70+
71+
72+
END # Map File

msautotest/wxs/ows_context.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
2+
<ViewContext version="1.1.0" id="mapcontext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.opengis.net/context" xmlns:sld="http://www.opengis.net/sld" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.1.0/context.xsd">
3+
<General>
4+
<Window width="400" height="300"/>
5+
<!-- Bounding box corners and spatial reference system -->
6+
<BoundingBox SRS="EPSG:4326" minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000"/>
7+
<!-- Title of Context -->
8+
<Title>Map Context demo</Title>
9+
<Abstract>Demo for map context document</Abstract>
10+
<ContactInformation>
11+
</ContactInformation>
12+
</General>
13+
</ViewContext>

0 commit comments

Comments
 (0)