Changes between Version 68 and Version 69 of ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices
- Timestamp:
- Nov 2, 2010, 5:43:13 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices
v68 v69 258 258 As you know how to deal with maps and map, you are ready to code the first ZOO Service by using the OGR Boundary function. 259 259 260 As already said in introduction we will use the Geoserver WFS server available on OSGeoLive, so full WFS Response will be used as inputs values. As we will use the simple OGR Geometry functions like [http://www.gdal.org/ogr/ogr__api_8h.html#a797af4266c02846d52b9cf3207ef958 OGR_G_GetBoundary], only the Geometry object will be used rather than a full WFS Response. The first thing to do is to write a function which will extract the geometry definition from the full WFS Response. We will call it {{{createGeometryFromWFS}}}.260 As already said in introduction we will use the MapServer WFS server available on OSGeoLive, so full WFS Response will be used as inputs values. As we will use the simple OGR Geometry functions like [http://www.gdal.org/ogr/ogr__api_8h.html#a797af4266c02846d52b9cf3207ef958 OGR_G_GetBoundary], only the Geometry object will be used rather than a full WFS Response. The first thing to do is to write a function which will extract the geometry definition from the full WFS Response. We will call it {{{createGeometryFromWFS}}}. 261 261 262 262 Here is the code of such a function : … … 528 528 }}} 529 529 530 As you can see in the url above, we use an URLEncoded WFS request to the Geoserver WFS server available on OSGeoLive as a {{{xlink:href}}} key in the {{{DataInputs}}} KVP value, and set the {{{InputPolygon}}} value to {{{Reference}}}. The corresponding non encoded WFS request is as follow :530 As you can see in the url above, we use an URLEncoded WFS request to the MapServer WFS server available on OSGeoLive as a {{{xlink:href}}} key in the {{{DataInputs}}} KVP value, and set the {{{InputPolygon}}} value to {{{Reference}}}. The corresponding non encoded WFS request is as follow : 531 531 532 532 [http://localhost/cgi-bin/mapserv?map=/var/www/wfs.map&SERVICE=WFS&REQUEST=GetFeature&VERSION=1.0.0&typename=regions&SRS=EPSG:4326&featureid=regions.3192]