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

svn at osgeo.org svn at osgeo.org
Sat Dec 26 10:46:55 EST 2009


Author: warmerdam
Date: 2009-12-26 10:46:55 -0500 (Sat, 26 Dec 2009)
New Revision: 9639

Added:
   trunk/msautotest/misc/expected/rfc36_ogr_geojson.js
   trunk/msautotest/misc/rfc36_ogr.map
Log:
add minimalistic ogr query testing

Added: trunk/msautotest/misc/expected/rfc36_ogr_geojson.js
===================================================================
--- trunk/msautotest/misc/expected/rfc36_ogr_geojson.js	                        (rev 0)
+++ trunk/msautotest/misc/expected/rfc36_ogr_geojson.js	2009-12-26 15:46:55 UTC (rev 9639)
@@ -0,0 +1,408 @@
+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_ogr.map
===================================================================
--- trunk/msautotest/misc/rfc36_ogr.map	                        (rev 0)
+++ trunk/msautotest/misc/rfc36_ogr.map	2009-12-26 15:46:55 UTC (rev 9639)
@@ -0,0 +1,113 @@
+# Test RFC36 but also tests the new query support against OGR.  This should
+# produce the same result as the internal shapefile support in rfc36.map.
+#
+# http://mapserver.gis.umn.edu/development/rfc/ms-rfc-36/
+#
+# RUN_PARMS: rfc36_ogr_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.tmpl"
+ 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
+  CONNECTIONTYPE OGR
+  CONNECTION "../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



More information about the mapserver-commits mailing list