[mapserver-commits] r7595 - in trunk/msautotest/misc: . expected

svn at osgeo.org svn at osgeo.org
Thu May 15 10:36:14 EDT 2008


Author: tomkralidis
Date: 2008-05-15 10:36:14 -0400 (Thu, 15 May 2008)
New Revision: 7595

Added:
   trunk/msautotest/misc/expected/rfc36_geojson.js
   trunk/msautotest/misc/rfc36.map
   trunk/msautotest/misc/rfc36.tpl
Log:
tests for rfc36 (#2576)


Added: trunk/msautotest/misc/expected/rfc36_geojson.js
===================================================================
--- trunk/msautotest/misc/expected/rfc36_geojson.js	                        (rev 0)
+++ trunk/msautotest/misc/expected/rfc36_geojson.js	2008-05-15 14:36:14 UTC (rev 7595)
@@ -0,0 +1,410 @@
+Content-type: application/json; subtype=geojson
+
+
+
+{
+ "type": "FeatureCollection",
+ "crs": {
+  "type": "EPSG",
+  "properties": {
+   "code": 42304,
+   "coordinate_order": [1,0]
+  }
+ },
+ "features": [
+  {
+   "type": "Feature",
+   "id": "BACMK",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [640200, 465700]
+   },
+   "properties": {
+    "NAME": "Tignish",
+    "CAPITAL": 0,
+    "POP_RANGE": 1
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAGYX",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [610100, 463800]
+   },
+   "properties": {
+    "NAME": "Cheticamp",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBIKA",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [623200, 445500]
+   },
+   "properties": {
+    "NAME": "Sheet Harbour",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "BACII",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [621500, 462100]
+   },
+   "properties": {
+    "NAME": "Souris",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAGBW",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [610000, 452000]
+   },
+   "properties": {
+    "NAME": "Canso",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBELL",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [612100, 453700]
+   },
+   "properties": {
+    "NAME": "Port Hawkesbury",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAATB",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [620000, 453700]
+   },
+   "properties": {
+    "NAME": "Antigonish",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBKDH",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [640300, 453900]
+   },
+   "properties": {
+    "NAME": "Springhill",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBPAK",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [640800, 445900]
+   },
+   "properties": {
+    "NAME": "Windsor",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAWAZ",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [641900, 442300]
+   },
+   "properties": {
+    "NAME": "Lunenburg",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAUWZ",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [644300, 440200]
+   },
+   "properties": {
+    "NAME": "Liverpool",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAZHC",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [650400, 445700]
+   },
+   "properties": {
+    "NAME": "Middleton",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAJOA",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [654600, 443700]
+   },
+   "properties": {
+    "NAME": "Digby",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBIKP",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [651900, 434600]
+   },
+   "properties": {
+    "NAME": "Shelburne",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "BADSZ",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [634720, 462345]
+   },
+   "properties": {
+    "NAME": "Summerside",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBQFA",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [595700, 461200]
+   },
+   "properties": {
+    "NAME": "Glace Bay",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBBJR",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [623900, 453500]
+   },
+   "properties": {
+    "NAME": "New Glasgow",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBMKT",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [631600, 452200]
+   },
+   "properties": {
+    "NAME": "Truro",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAAOO",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [641200, 455000]
+   },
+   "properties": {
+    "NAME": "Amherst",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CASWE",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [643000, 450500]
+   },
+   "properties": {
+    "NAME": "Kentville",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAFBR",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [643100, 442300]
+   },
+   "properties": {
+    "NAME": "Bridgewater",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBPIB",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [660700, 435000]
+   },
+   "properties": {
+    "NAME": "Yarmouth",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBLHE",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [601400, 461400]
+   },
+   "properties": {
+    "NAME": "Sydney Mines",
+    "CAPITAL": 0,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CBLGX",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [601100, 460900]
+   },
+   "properties": {
+    "NAME": "Sydney",
+    "CAPITAL": 0,
+    "POP_RANGE": 4
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAIYJ",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [633400, 444000]
+   },
+   "properties": {
+    "NAME": "Dartmouth",
+    "CAPITAL": 0,
+    "POP_RANGE": 5
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "EGIIG",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [615300, 472400]
+   },
+   "properties": {
+    "NAME": "Fatima",
+    "CAPITAL": 0,
+    "POP_RANGE": 2
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "BAARG",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [630805, 461425]
+   },
+   "properties": {
+    "NAME": "Charlottetown",
+    "CAPITAL": 2,
+    "POP_RANGE": 3
+   }
+  },
+  {
+   "type": "Feature",
+   "id": "CAPHL",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [633600, 443900]
+   },
+   "properties": {
+    "NAME": "Halifax",
+    "CAPITAL": 2,
+    "POP_RANGE": 6
+   }
+  },
+ 
+ ]
+}
+

Added: trunk/msautotest/misc/rfc36.map
===================================================================
--- trunk/msautotest/misc/rfc36.map	                        (rev 0)
+++ trunk/msautotest/misc/rfc36.map	2008-05-15 14:36:14 UTC (rev 7595)
@@ -0,0 +1,111 @@
+# Support RFC36 features
+#
+# http://mapserver.gis.umn.edu/development/rfc/ms-rfc-36/
+#
+# RUN_PARMS: rfc36_geojson.js [MAPSERV] QUERY_STRING="map=[MAPFILE]&mode=nquery&layer=popplace" > [RESULT]
+
+MAP
+ NAME rfc36
+ IMAGETYPE PNG
+ STATUS ON
+ EXTENT -141.089000 36.392987 -52.089000 89.784987 # Canada
+ SIZE 500 300
+ SYMBOLSET "../wxs/etc/symbols.sym"
+ FONTSET   "./fonts.lst"
+ IMAGECOLOR 125 125 125
+
+ PROJECTION
+  "init=epsg:4326"
+ END
+
+ DEBUG ON
+
+ TRANSPARENT ON
+
+ OUTPUTFORMAT
+  NAME "geojson"
+  DRIVER "TEMPLATE"
+  MIMETYPE "application/json; subtype=geojson"
+  FORMATOPTION "FILE=rfc36.tpl"
+ END
+
+ WEB
+
+  QUERYFORMAT "geojson"
+
+  IMAGEPATH "../../tmp/"
+  IMAGEURL  "/ms_tmp"
+  METADATA
+   # OWS common metadata
+
+   "ows_schemas_location" "http://schemas.opengis.net"
+   "ows_title"    "rfc36 test"
+   "ows_abstract" "rfc36 test"
+   "ows_keywordlist" "rfc36"
+   "ows_service_onlineresource" "http://mapserver.gis.umn.edu"
+   "ows_fees" "none"
+   "ows_accessconstraints" "none"
+
+   # OGC:WMS
+
+   "wms_feature_info_mime_type"  "text/html"
+
+   "ows_addresstype" "postal"
+   "ows_address"     "867 Lakeshore Road"
+   "ows_city" "Burlington"
+   "ows_stateorprovince" "Ontario"
+   "ows_postcode" "L7R-4A6"
+   "ows_country" "Canada"
+   "ows_contactelectronicmailaddress" "tom.kralidis at ec.gc.ca"
+   "ows_contactvoicetelephone" "+01-905-336-4409"
+   "ows_contactfacsimiletelephone" "+01-905-336-4499"
+   "ows_contactperson" "Tom Kralidis"
+   "ows_contactorganization" "Environment Canada"
+   "ows_contactposition" "Senior Systems Scientist"
+
+   "wms_srs" "EPSG:4326 EPSG:2294 EPSG:2295 EPSG:4267 EPSG:4269 EPSG:26707 EPSG:26708 EPSG:26709 EPSG:26710 EPSG:26711 EPSG:26712 EPSG:26713 EPSG:26714 EPSG:26715 EPSG:26716 EPSG:26717 EPSG:26718 EPSG:26719 EPSG:26720 EPSG:26721 EPSG:26722 EPSG:26907 EPSG:26908 EPSG:26909 EPSG:26910 EPSG:26911 EPSG:26912 EPSG:26913 EPSG:26914 EPSG:26915 EPSG:26916 EPSG:26917 EPSG:26918 EPSG:26919 EPSG:26920 EPSG:26921 EPSG:26922 EPSG:42101 EPSG:42304"
+   "wms_attribution_onlineresource" "http://www.ec.gc.ca/"
+   "wms_attribution_title" "Data from Environment Canada"
+   "wms_attribution_logourl_width" "221"
+   "wms_attribution_logourl_height" "20"
+   "wms_attribution_logourl_format" "image/gif"
+   "wms_attribution_logourl_href" "http://www.ec.gc.ca/images/clf/ecfip_e.gif"
+  END
+ END
+
+ QUERYMAP
+  STATUS OFF
+  SIZE 400 300
+  STYLE HILITE
+  COLOR 255 255 0 
+ END
+
+ LEGEND
+  LABEL
+   SIZE 10
+   TYPE TRUETYPE
+   FONT Vera
+   COLOR 0 0 0
+  END
+ END
+
+ LAYER
+  NAME "popplace"
+  STATUS ON
+  DEBUG ON
+  DATA "../wxs/data/popplace.shp"
+  TYPE POINT
+  DUMP TRUE
+  TEMPLATE "dummy"
+  TOLERANCE 30 
+  PROJECTION
+   "init=../wxs/data/epsg2:42304"
+  END
+  CLASS
+   NAME " "
+   SIZE 10
+   SYMBOL 2
+   COLOR 255 0 0
+  END
+ END
+END

Added: trunk/msautotest/misc/rfc36.tpl
===================================================================
--- trunk/msautotest/misc/rfc36.tpl	                        (rev 0)
+++ trunk/msautotest/misc/rfc36.tpl	2008-05-15 14:36:14 UTC (rev 7595)
@@ -0,0 +1,29 @@
+[resultset layer=popplace]
+{
+ "type": "FeatureCollection",
+ "crs": {
+  "type": "EPSG",
+  "properties": {
+   "code": 42304,
+   "coordinate_order": [1,0]
+  }
+ },
+ "features": [
+ [feature trimlast=","] {
+   "type": "Feature",
+   "id": "[UNIQUE_KEY]",
+   "geometry": {
+    "type": "Point",
+    "coordinates":
+     [[LONG], [LAT]]
+   },
+   "properties": {
+    "NAME": "[NAME]",
+    "CAPITAL": [CAPITAL],
+    "POP_RANGE": [POP_RANGE]
+   }
+  },
+ [/feature]
+ ]
+}
+[/resultset]



More information about the mapserver-commits mailing list