|
|
@@ -8,7 +8,7 @@ Lib::loadClass('Core_XmlWriter');
|
|
|
|
|
|
class Api_WpsV1_GetCapabilities { // TODO: ...
|
|
|
|
|
|
- static function sendGetCapabilitiesCsv($wpsServerUrl, $serviceTitle, $serviceDescription, $aclList) {
|
|
|
+ static function sendGetCapabilitiesCsv($wpsServerUrl, $serviceTitle, $serviceDescription, $wpsProcessList) {
|
|
|
throw new Api_WfsException("Not Implemented sendGetCapabilitiesCsv for Wps version 1.0.0", 501);
|
|
|
header('Content-Type: text/csv; charset=utf-8');
|
|
|
$csvLineSepartor = "\n";
|
|
|
@@ -45,7 +45,7 @@ class Api_WpsV1_GetCapabilities { // TODO: ...
|
|
|
"9.838674658246807", // LatLongBoundingBox - maxx
|
|
|
"41.31378404137082", // LatLongBoundingBox - maxy
|
|
|
]);
|
|
|
- }, $aclList));
|
|
|
+ }, $wpsProcessList));
|
|
|
echo $csvLineSepartor;
|
|
|
|
|
|
echo implode($csvLineSepartor, array_map(function ($typeName) use ($csvText, $csvValueSepartor) {
|
|
|
@@ -66,7 +66,7 @@ class Api_WpsV1_GetCapabilities { // TODO: ...
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
- static function sendGetCapabilitiesXml($wpsServerUrl, $serviceTitle, $serviceDescription, $aclList) {
|
|
|
+ static function sendGetCapabilitiesXml($wpsServerUrl, $serviceTitle, $serviceDescription, $wpsProcessList) {
|
|
|
header('Content-type: application/xml; charset=utf-8');
|
|
|
$xmlWriter = new Core_XmlWriter();
|
|
|
if (!$xmlWriter) throw new HttpException("Error no XMLWriter", 404);
|
|
|
@@ -191,18 +191,25 @@ class Api_WpsV1_GetCapabilities { // TODO: ...
|
|
|
// </wps:Supported>
|
|
|
// </wps:Languages>
|
|
|
// </wps:Capabilities>
|
|
|
- $xmlWriter->h('wps:ProcessOfferings', [ // TODO:? for version 1.0.0 ?
|
|
|
- [ 'wps:Process', [ 'wps:processVersion' => "1.0.0" ], [
|
|
|
- [ 'ows:Identifier', "buffer" ],
|
|
|
- [ 'ows:Title', "Buffer a polygon feature" ],
|
|
|
- [ 'ows:Abstract', "Buffer the polygon coordinates found in one GML stream by a given buffer distance, and output the results in GML." ],
|
|
|
- ] ],
|
|
|
- [ 'wps:Process', [ 'wps:processVersion' => "1.0.0" ], [
|
|
|
- [ 'ows:Identifier', "JTS:area" ],
|
|
|
- [ 'ows:Title', "Area" ],
|
|
|
- [ 'ows:Abstract', "Returns the area of a geometry, in the units of the geometry. Assumes a Cartesian plane, so this process is only recommended for non-geographic CRSes." ],
|
|
|
- ] ]
|
|
|
- ]);
|
|
|
+ $xmlWriter->h('wps:ProcessOfferings', array_map(function ($wpsProcess) {
|
|
|
+ return [ 'wps:Process', [ 'wps:processVersion' => $wpsProcess->version ], [
|
|
|
+ [ 'ows:Identifier', $wpsProcess->identifier ],
|
|
|
+ [ 'ows:Title', $wpsProcess->title ],
|
|
|
+ [ 'ows:Abstract', $wpsProcess->description ],
|
|
|
+ ] ];
|
|
|
+ }, $wpsProcessList));
|
|
|
+ // $xmlWriter->h('wps:ProcessOfferings', [
|
|
|
+ // [ 'wps:Process', [ 'wps:processVersion' => "1.0.0" ], [
|
|
|
+ // [ 'ows:Identifier', "buffer" ],
|
|
|
+ // [ 'ows:Title', "Buffer a polygon feature" ],
|
|
|
+ // [ 'ows:Abstract', "Buffer the polygon coordinates found in one GML stream by a given buffer distance, and output the results in GML." ],
|
|
|
+ // ] ],
|
|
|
+ // [ 'wps:Process', [ 'wps:processVersion' => "1.0.0" ], [
|
|
|
+ // [ 'ows:Identifier', "JTS:area" ],
|
|
|
+ // [ 'ows:Title', "Area" ],
|
|
|
+ // [ 'ows:Abstract', "Returns the area of a geometry, in the units of the geometry. Assumes a Cartesian plane, so this process is only recommended for non-geographic CRSes." ],
|
|
|
+ // ] ]
|
|
|
+ // ]);
|
|
|
|
|
|
$xmlWriter->h('wps:Languages', [
|
|
|
[ 'wps:Default', [
|