[GRASS-SVN] r46103 - in grass/trunk: lib/gis raster/r.walk

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 25 14:48:01 EDT 2011


Author: huhabla
Date: 2011-04-25 11:48:01 -0700 (Mon, 25 Apr 2011)
New Revision: 46103

Modified:
   grass/trunk/lib/gis/parser_wps.c
   grass/trunk/raster/r.walk/main.c
Log:
Correct input type in r.walk. Additional mime types for WPS output.


Modified: grass/trunk/lib/gis/parser_wps.c
===================================================================
--- grass/trunk/lib/gis/parser_wps.c	2011-04-25 17:01:06 UTC (rev 46102)
+++ grass/trunk/lib/gis/parser_wps.c	2011-04-25 18:48:01 UTC (rev 46103)
@@ -39,7 +39,10 @@
 static void wps_print_mimetype_raster_netCDF_other(void);
 static void wps_print_mimetype_raster_grass_binary(void);
 static void wps_print_mimetype_raster_grass_ascii(void);
+static void wps_print_mimetype_vector_gml311(void);
+static void wps_print_mimetype_vector_gml311_appl(void);
 static void wps_print_mimetype_vector_gml212(void);
+static void wps_print_mimetype_vector_gml212_appl(void);
 static void wps_print_mimetype_vector_kml22(void);
 static void wps_print_mimetype_vector_dgn(void);
 static void wps_print_mimetype_vector_shape(void);
@@ -559,7 +562,7 @@
     }
     else if(type == TYPE_VECTOR)
     {
-            wps_print_mimetype_vector_gml212();
+            wps_print_mimetype_vector_gml311();
     }
     else if(type == TYPE_PLAIN_TEXT)
     {
@@ -590,13 +593,19 @@
     else if(type == TYPE_VECTOR)
     {
             if(inout_type == WPS_INPUT) {
-            	wps_print_mimetype_vector_gml212();
+            	wps_print_mimetype_vector_gml311();
+                wps_print_mimetype_vector_gml311_appl();
+                wps_print_mimetype_vector_gml212();
+                wps_print_mimetype_vector_gml212_appl();
             	wps_print_mimetype_vector_kml22();
             	wps_print_mimetype_vector_dgn();
             	wps_print_mimetype_vector_shape();
             	wps_print_mimetype_vector_zipped_shape();
 	    } else {
-            	wps_print_mimetype_vector_gml212();
+            	wps_print_mimetype_vector_gml311();
+                wps_print_mimetype_vector_gml311_appl();
+                wps_print_mimetype_vector_gml212();
+                wps_print_mimetype_vector_gml212_appl();
             	wps_print_mimetype_vector_kml22();
 	    }
     }
@@ -782,6 +791,40 @@
 
 /* ************************************************************************** */
 
+static void wps_print_mimetype_vector_gml311_appl(void)
+{
+    fprintf(stdout,"\t\t\t\t\t\t<Format>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<MimeType>application/xml</MimeType>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/3.1.1/base/gml.xsd</Schema>\n");
+    fprintf(stdout,"\t\t\t\t\t\t</Format>\n");
+}
+
+/* ************************************************************************** */
+
+static void wps_print_mimetype_vector_gml212_appl(void)
+{
+    fprintf(stdout,"\t\t\t\t\t\t<Format>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<MimeType>application/xml</MimeType>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/2.1.2/feature.xsd</Schema>\n");
+    fprintf(stdout,"\t\t\t\t\t\t</Format>\n");
+}
+
+
+/* ************************************************************************** */
+
+static void wps_print_mimetype_vector_gml311(void)
+{
+    fprintf(stdout,"\t\t\t\t\t\t<Format>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<MimeType>text/xml</MimeType>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
+    fprintf(stdout,"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/3.1.1/base/gml.xsd</Schema>\n");
+    fprintf(stdout,"\t\t\t\t\t\t</Format>\n");
+}
+
+/* ************************************************************************** */
+
 static void wps_print_mimetype_vector_gml212(void)
 {
     fprintf(stdout,"\t\t\t\t\t\t<Format>\n");

Modified: grass/trunk/raster/r.walk/main.c
===================================================================
--- grass/trunk/raster/r.walk/main.c	2011-04-25 17:01:06 UTC (rev 46102)
+++ grass/trunk/raster/r.walk/main.c	2011-04-25 18:48:01 UTC (rev 46103)
@@ -275,7 +275,7 @@
 
     opt15 = G_define_option();
     opt15->key = "walk_coeff";
-    opt15->type = TYPE_DOUBLE;
+    opt15->type = TYPE_STRING;
     opt15->key_desc = "a,b,c,d";
     opt15->required = NO;
     opt15->multiple = NO;



More information about the grass-commit mailing list