11 #if defined(HAVE_LANGINFO_H) 14 #if defined(__MINGW32__) && defined(USE_NLS) 15 #include <localcharset.h> 18 #include "parser_local_proto.h" 25 #define TYPE_PLAIN_TEXT 2 34 static void wps_print_mimetype_text_plain(
void);
35 static void wps_print_mimetype_raster_tiff(
void);
36 static void wps_print_mimetype_raster_tiff_other(
void);
37 static void wps_print_mimetype_raster_png(
void);
38 static void wps_print_mimetype_raster_gif(
void);
39 static void wps_print_mimetype_raster_jpeg(
void);
40 static void wps_print_mimetype_raster_hfa(
void);
41 static void wps_print_mimetype_raster_netCDF(
void);
42 static void wps_print_mimetype_raster_netCDF_other(
void);
43 static void wps_print_mimetype_raster_grass_binary(
void);
44 static void wps_print_mimetype_raster_grass_ascii(
void);
45 static void wps_print_mimetype_vector_gml311(
void);
46 static void wps_print_mimetype_vector_gml311_appl(
void);
47 static void wps_print_mimetype_vector_gml212(
void);
48 static void wps_print_mimetype_vector_gml212_appl(
void);
49 static void wps_print_mimetype_vector_kml22(
void);
50 static void wps_print_mimetype_vector_dgn(
void);
51 static void wps_print_mimetype_vector_shape(
void);
52 static void wps_print_mimetype_vector_zipped_shape(
void);
53 static void wps_print_mimetype_vector_grass_ascii(
void);
54 static void wps_print_mimetype_vector_grass_binary(
void);
55 static void wps_print_mimetype_space_time_datasets(
void);
56 static void wps_print_mimetype_space_time_raster_datasets(
void);
57 static void wps_print_mimetype_space_time_vector_datasets(
void);
58 static void wps_print_mimetype_space_time_vector_datasets_tar(
void);
59 static void wps_print_mimetype_space_time_raster_datasets_tar(
void);
60 static void wps_print_mimetype_space_time_vector_datasets_tar_gz(
void);
61 static void wps_print_mimetype_space_time_raster_datasets_tar_gz(
void);
62 static void wps_print_mimetype_space_time_vector_datasets_tar_bz2(
void);
63 static void wps_print_mimetype_space_time_raster_datasets_tar_bz2(
void);
65 static void wps_print_process_descriptions_begin(
void);
66 static void wps_print_process_descriptions_end(
void);
67 static void wps_print_process_description_begin(
int ,
int ,
const char *,
const char *,
const char *,
const char **,
int );
68 static void wps_print_process_description_end(
void);
69 static void wps_print_data_inputs_begin(
void);
70 static void wps_print_data_inputs_end(
void);
71 static void wps_print_process_outputs_begin(
void);
72 static void wps_print_process_outputs_end(
void);
73 static void wps_print_bounding_box_data(
void);
74 static void wps_print_ident_title_abstract(
const char *,
const char *,
const char *);
75 static void wps_print_complex_input(
int ,
int ,
const char *,
const char *,
const char *,
int ,
int );
76 static void wps_print_complex_output(
const char *,
const char *,
const char *,
int );
77 static void wps_print_comlpex_input_output(
int ,
int ,
int ,
const char *,
const char *,
const char *,
int ,
int );
78 static void wps_print_literal_input_output(
int ,
int ,
int ,
const char *,
79 const char *,
const char *,
const char *,
int ,
80 const char **,
int ,
const char *,
int );
82 static void print_escaped_for_xml(FILE * fp,
const char *str)
146 const char *value =
NULL;
148 const char *encoding;
152 const char *identifier =
NULL;
153 const char *title =
NULL;
154 const char *
abstract =
NULL;
155 const char **keywords =
NULL;
156 int data_type, is_input, is_output;
157 int num_raster_inputs = 0, num_raster_outputs = 0;
158 int num_vector_inputs = 0, num_vector_outputs = 0;
159 int num_strds_inputs = 0, num_strds_outputs = 0;
160 int num_stvds_inputs = 0, num_stvds_outputs = 0;
162 int num_keywords = 0;
163 int found_output = 0;
171 #if defined(HAVE_LANGINFO_H) 172 encoding = nl_langinfo(CODESET);
173 if (!encoding || strlen(encoding) == 0) {
176 #elif defined(__MINGW32__) && defined(USE_NLS) 177 encoding = locale_charset();
178 if (!encoding || strlen(encoding) == 0) {
191 identifier =
st->pgm_name;
193 if (
st->module_info.description) {
194 title =
st->module_info.description;
195 abstract =
st->module_info.description;
198 if (
st->module_info.keywords) {
199 keywords =
st->module_info.keywords;
200 num_keywords =
st->n_keys;
203 wps_print_process_descriptions_begin();
205 wps_print_process_description_begin(store, status, identifier, title,
abstract, keywords, num_keywords);
206 wps_print_data_inputs_begin();
211 wps_print_bounding_box_data();
215 opt = &
st->first_option;
216 while (opt !=
NULL) {
232 const char *atts[] = {
"age",
"element",
"prompt",
NULL };
235 s = strtok(top,
",");
236 for (i = 0; s !=
NULL && atts[i] !=
NULL; i++) {
241 if(strcmp(token,
"new") == 0) {
245 if(strcmp(token,
"raster") == 0)
252 num_raster_outputs++;
254 if(strcmp(token,
"vector") == 0)
260 num_vector_outputs++;
263 if(strcmp(token,
"stds") == 0)
267 if(strcmp(token,
"strds") == 0)
275 if(strcmp(token,
"stvds") == 0)
283 if(strcmp(token,
"file") == 0)
287 s = strtok(
NULL,
",");
297 s = strtok(top,
",");
299 for (i = 0; s !=
NULL; i++) {
301 s = strtok(
NULL,
",");
326 identifier = opt->
key;
364 while (opt->
opts[i]) {
367 keywords = opt->
opts;
375 wps_print_complex_input(min,
max, identifier, title,
abstract, 2048, data_type);
380 wps_print_literal_input_output(
WPS_INPUT, min,
max, identifier, title,
381 abstract, type, 0, keywords, num_keywords, value,
TYPE_OTHER);
390 flag = &
st->first_flag;
391 while (flag !=
NULL) {
394 char* ident = (
char*)
G_calloc(3,
sizeof(
char));
396 ident[1] = flag->
key;
405 const char *val[] = {
"true",
"false"};
406 wps_print_literal_input_output(
WPS_INPUT, 0, 1, ident, title,
NULL,
"boolean", 0, val, 2,
"false",
TYPE_OTHER);
412 if(num_raster_inputs > 0 || num_raster_outputs > 0 || num_strds_inputs > 0 || num_strds_outputs > 0) {
413 wps_print_literal_input_output(
WPS_INPUT, 0, 1,
"grass_resolution_ns",
"Resolution of the mapset in north-south direction in meters or degrees",
414 "This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.",
416 wps_print_literal_input_output(
WPS_INPUT, 0, 1,
"grass_resolution_ew",
"Resolution of the mapset in east-west direction in meters or degrees",
417 "This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.",
421 if(num_raster_inputs > 0)
422 wps_print_literal_input_output(
WPS_INPUT, 0, 1,
"grass_band_number",
"Band to select for processing (default is all bands)",
423 "This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.",
427 wps_print_data_inputs_end();
429 wps_print_process_outputs_begin();
435 opt = &
st->first_option;
436 while (opt !=
NULL) {
446 const char *atts[] = {
"age",
"element",
"prompt",
NULL };
449 s = strtok(top,
",");
450 for (i = 0; s !=
NULL && atts[i] !=
NULL; i++) {
455 if(strcmp(token,
"new") == 0)
457 if(strcmp(token,
"raster") == 0)
461 if(strcmp(token,
"vector") == 0)
465 if(strcmp(token,
"stds") == 0)
469 if(strcmp(token,
"strds") == 0)
473 if(strcmp(token,
"stvds") == 0)
477 if(strcmp(token,
"file") == 0)
481 s = strtok(
NULL,
",");
490 G_warning(
_(
"Multiple outputs are not supported by WPS 1.0.0"));
491 identifier = opt->
key;
506 wps_print_complex_output(identifier, title,
abstract, data_type);
513 if(found_output == 0)
514 wps_print_complex_output(
"stdout",
"Module output on stdout",
"The output of the module written to stdout",
TYPE_PLAIN_TEXT);
517 wps_print_process_outputs_end();
518 wps_print_process_description_end();
519 wps_print_process_descriptions_end();
530 static void wps_print_process_descriptions_begin(
void)
532 fprintf(stdout,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
533 fprintf(stdout,
"<wps:ProcessDescriptions xmlns:wps=\"http://www.opengis.net/wps/1.0.0\"\n");
534 fprintf(stdout,
"xmlns:ows=\"http://www.opengis.net/ows/1.1\"\n");
535 fprintf(stdout,
"xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n");
536 fprintf(stdout,
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
537 fprintf(stdout,
"xsi:schemaLocation=\"http://www.opengis.net/wps/1.0.0\n http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd\"\n service=\"WPS\" version=\"1.0.0\" xml:lang=\"en-US\"> \n");
542 static void wps_print_process_descriptions_end(
void)
544 fprintf(stdout,
"</wps:ProcessDescriptions>\n");
549 static void wps_print_process_description_begin(
int store,
int status,
const char *identifier,
550 const char *title,
const char *
abstract,
551 const char **keywords,
int num_keywords)
555 fprintf(stdout,
"\t<ProcessDescription wps:processVersion=\"1\" storeSupported=\"%s\" statusSupported=\"%s\">\n", (store?
"true":
"false"), (status?
"true":
"false"));
558 fprintf(stdout,
"\t\t<ows:Identifier>");
559 print_escaped_for_xml(stdout, identifier);
560 fprintf(stdout,
"</ows:Identifier>\n");
567 fprintf(stdout,
"\t\t<ows:Title>");
568 print_escaped_for_xml(stdout, title);
569 fprintf(stdout,
"</ows:Title>\n");
572 fprintf(stdout,
"\t\t<ows:Title>");
573 print_escaped_for_xml(stdout,
"No title available");
574 fprintf(stdout,
"</ows:Title>\n");
580 fprintf(stdout,
"\t\t<ows:Abstract>");
581 fprintf(stdout,
"https://grass.osgeo.org/grass79/manuals/%s.html", identifier);
582 fprintf(stdout,
"</ows:Abstract>\n");
585 for(i = 0; i < num_keywords; i++)
587 fprintf(stdout,
"\t\t<ows:Metadata xlink:title=\"");
588 print_escaped_for_xml(stdout, keywords[i]);
589 fprintf(stdout,
"\" />\n");
595 static void wps_print_process_description_end(
void)
597 fprintf(stdout,
"\t</ProcessDescription>\n");
602 static void wps_print_data_inputs_begin(
void)
604 fprintf(stdout,
"\t\t<DataInputs>\n");
609 static void wps_print_data_inputs_end(
void)
611 fprintf(stdout,
"\t\t</DataInputs>\n");
616 static void wps_print_process_outputs_begin(
void)
618 fprintf(stdout,
"\t\t<ProcessOutputs>\n");
623 static void wps_print_process_outputs_end(
void)
625 fprintf(stdout,
"\t\t</ProcessOutputs>\n");
630 static void wps_print_complex_input(
int min,
int max,
const char *identifier,
const char *title,
const char *
abstract,
int megs,
int type)
632 wps_print_comlpex_input_output(
WPS_INPUT, min, max, identifier, title,
abstract, megs, type);
637 static void wps_print_complex_output(
const char *identifier,
const char *title,
const char *
abstract,
int type)
639 wps_print_comlpex_input_output(
WPS_OUTPUT, 0, 0, identifier, title,
abstract, 0, type);
644 static void wps_print_comlpex_input_output(
int inout_type,
int min,
int max,
const char *identifier,
const char *title,
const char *
abstract,
int megs,
int type)
647 fprintf(stdout,
"\t\t\t<Input minOccurs=\"%i\" maxOccurs=\"%i\">\n", min, max);
649 fprintf(stdout,
"\t\t\t<Output>\n");
651 wps_print_ident_title_abstract(identifier, title,
abstract);
654 fprintf(stdout,
"\t\t\t\t<ComplexData maximumMegabytes=\"%i\">\n", megs);
656 fprintf(stdout,
"\t\t\t\t<ComplexOutput>\n");
658 fprintf(stdout,
"\t\t\t\t\t<Default>\n");
661 wps_print_mimetype_raster_tiff();
665 wps_print_mimetype_vector_gml311();
670 wps_print_mimetype_space_time_raster_datasets_tar_gz();
674 wps_print_mimetype_space_time_raster_datasets_tar_gz();
678 wps_print_mimetype_space_time_vector_datasets_tar_gz();
682 wps_print_mimetype_text_plain();
684 fprintf(stdout,
"\t\t\t\t\t</Default>\n");
685 fprintf(stdout,
"\t\t\t\t\t<Supported>\n");
690 wps_print_mimetype_raster_tiff();
691 wps_print_mimetype_raster_tiff_other();
692 wps_print_mimetype_raster_png();
693 wps_print_mimetype_raster_gif();
694 wps_print_mimetype_raster_jpeg();
695 wps_print_mimetype_raster_hfa();
696 wps_print_mimetype_raster_netCDF();
697 wps_print_mimetype_raster_netCDF_other();
699 wps_print_mimetype_raster_tiff();
700 wps_print_mimetype_raster_tiff_other();
701 wps_print_mimetype_raster_hfa();
702 wps_print_mimetype_raster_netCDF();
703 wps_print_mimetype_raster_netCDF_other();
709 wps_print_mimetype_vector_gml311();
710 wps_print_mimetype_vector_gml311_appl();
711 wps_print_mimetype_vector_gml212();
712 wps_print_mimetype_vector_gml212_appl();
713 wps_print_mimetype_vector_kml22();
714 wps_print_mimetype_vector_dgn();
715 wps_print_mimetype_vector_shape();
716 wps_print_mimetype_vector_zipped_shape();
718 wps_print_mimetype_vector_gml311();
719 wps_print_mimetype_vector_gml311_appl();
720 wps_print_mimetype_vector_gml212();
721 wps_print_mimetype_vector_gml212_appl();
722 wps_print_mimetype_vector_kml22();
727 wps_print_mimetype_space_time_datasets();
731 wps_print_mimetype_space_time_raster_datasets();
735 wps_print_mimetype_space_time_vector_datasets();
739 wps_print_mimetype_text_plain();
741 fprintf(stdout,
"\t\t\t\t\t</Supported>\n");
744 fprintf(stdout,
"\t\t\t\t</ComplexData>\n");
746 fprintf(stdout,
"\t\t\t\t</ComplexOutput>\n");
749 fprintf(stdout,
"\t\t\t</Input>\n");
751 fprintf(stdout,
"\t\t\t</Output>\n");
756 static void wps_print_ident_title_abstract(
const char *identifier,
const char *title,
const char *
abstract)
760 fprintf(stdout,
"\t\t\t\t<ows:Identifier>");
761 print_escaped_for_xml(stdout, identifier);
762 fprintf(stdout,
"</ows:Identifier>\n");
769 fprintf(stdout,
"\t\t\t\t<ows:Title>");
770 print_escaped_for_xml(stdout, title);
771 fprintf(stdout,
"</ows:Title>\n");
774 fprintf(stdout,
"\t\t\t\t<ows:Title>");
775 print_escaped_for_xml(stdout,
"No title available");
776 fprintf(stdout,
"</ows:Title>\n");
781 fprintf(stdout,
"\t\t\t\t<ows:Abstract>");
782 print_escaped_for_xml(stdout,
abstract);
783 fprintf(stdout,
"</ows:Abstract>\n");
789 static void wps_print_literal_input_output(
int inout_type,
int min,
int max,
const char *identifier,
790 const char *title,
const char *
abstract,
const char *datatype,
int unitofmesure,
791 const char **choices,
int num_choices,
const char *default_value,
int type)
798 fprintf(stdout,
"\t\t\t<Input minOccurs=\"%i\" maxOccurs=\"%i\">\n", min, max);
800 fprintf(stdout,
"\t\t\t<Output>\n");
802 wps_print_ident_title_abstract(identifier, title,
abstract);
804 fprintf(stdout,
"\t\t\t\t<LiteralData>\n");
807 fprintf(stdout,
"\t\t\t\t\t<ows:DataType ows:reference=\"xs:%s\">%s</ows:DataType>\n", datatype, datatype);
811 fprintf(stdout,
"\t\t\t\t\t<UOMs>\n");
812 fprintf(stdout,
"\t\t\t\t\t\t<Default>\n");
813 fprintf(stdout,
"\t\t\t\t\t\t\t<ows:UOM>meters</ows:UOM>\n");
814 fprintf(stdout,
"\t\t\t\t\t\t</Default>\n");
815 fprintf(stdout,
"\t\t\t\t\t\t<Supported>\n");
816 fprintf(stdout,
"\t\t\t\t\t\t\t<ows:UOM>meters</ows:UOM>\n");
817 fprintf(stdout,
"\t\t\t\t\t\t\t<ows:UOM>degrees</ows:UOM>\n");
818 fprintf(stdout,
"\t\t\t\t\t\t</Supported>\n");
819 fprintf(stdout,
"\t\t\t\t\t</UOMs>\n");
821 if(num_choices == 0 || choices ==
NULL)
822 fprintf(stdout,
"\t\t\t\t\t<ows:AnyValue/>\n");
826 if(strcmp(datatype,
"integer") == 0 || strcmp(datatype,
"float") == 0) {
827 str = strtok((
char*)choices[0],
"-");
830 str = strtok(
NULL,
"-");
838 fprintf(stdout,
"\t\t\t\t\t<ows:AllowedValues>\n");
841 fprintf(stdout,
"\t\t\t\t\t\t<ows:Range ows:rangeClosure=\"closed\">\n");
842 fprintf(stdout,
"\t\t\t\t\t\t\t<ows:MinimumValue>%s</ows:MinimumValue>\n", range[0]);
843 fprintf(stdout,
"\t\t\t\t\t\t\t<ows:MaximumValue>%s</ows:MaximumValue>\n", range[1]);
844 fprintf(stdout,
"\t\t\t\t\t\t</ows:Range>\n");
848 for(i = 0; i < num_choices; i++)
850 fprintf(stdout,
"\t\t\t\t\t\t<ows:Value>");
851 print_escaped_for_xml(stdout, choices[i]);
852 fprintf(stdout,
"</ows:Value>\n");
855 fprintf(stdout,
"\t\t\t\t\t</ows:AllowedValues>\n");
860 fprintf(stdout,
"\t\t\t\t\t<DefaultValue>");
861 print_escaped_for_xml(stdout, default_value);
862 fprintf(stdout,
"</DefaultValue>\n");
864 fprintf(stdout,
"\t\t\t\t</LiteralData>\n");
868 fprintf(stdout,
"\t\t\t</Input>\n");
870 fprintf(stdout,
"\t\t\t</Output>\n");
875 static void wps_print_mimetype_text_plain(
void)
877 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
878 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>text/plain</MimeType>\n");
879 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
883 static void wps_print_mimetype_raster_tiff(
void)
885 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
886 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/tiff</MimeType>\n");
887 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
892 static void wps_print_mimetype_raster_png(
void)
894 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
895 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/png</MimeType>\n");
896 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
901 static void wps_print_mimetype_raster_grass_binary(
void)
903 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
904 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/grass-raster-binary</MimeType>\n");
905 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
910 static void wps_print_mimetype_raster_grass_ascii(
void)
912 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
913 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/grass-raster-ascii</MimeType>\n");
914 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
919 static void wps_print_mimetype_vector_gml311_appl(
void)
921 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
922 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/xml</MimeType>\n");
923 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
924 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/3.1.1/base/gml.xsd</Schema>\n");
925 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
930 static void wps_print_mimetype_vector_gml212_appl(
void)
932 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
933 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/xml</MimeType>\n");
934 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
935 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/2.1.2/feature.xsd</Schema>\n");
936 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
942 static void wps_print_mimetype_vector_gml311(
void)
944 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
945 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>text/xml</MimeType>\n");
946 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
947 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/3.1.1/base/gml.xsd</Schema>\n");
948 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
953 static void wps_print_mimetype_vector_gml212(
void)
955 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
956 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>text/xml</MimeType>\n");
957 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
958 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/2.1.2/feature.xsd</Schema>\n");
959 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
964 static void wps_print_mimetype_vector_grass_ascii(
void)
966 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
967 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/grass-vector-ascii</MimeType>\n");
968 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
973 static void wps_print_mimetype_vector_grass_binary(
void)
975 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
976 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/grass-vector-binary</MimeType>\n");
977 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
982 static void wps_print_mimetype_space_time_datasets(
void)
984 wps_print_mimetype_space_time_raster_datasets();
985 wps_print_mimetype_space_time_vector_datasets();
990 static void wps_print_mimetype_space_time_raster_datasets(
void)
992 wps_print_mimetype_space_time_raster_datasets_tar();
993 wps_print_mimetype_space_time_raster_datasets_tar_gz();
994 wps_print_mimetype_space_time_raster_datasets_tar_bz2();
997 static void wps_print_mimetype_space_time_raster_datasets_tar(
void)
999 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1000 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-grass-strds-tar</MimeType>\n");
1001 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1004 static void wps_print_mimetype_space_time_raster_datasets_tar_gz(
void)
1006 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1007 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-grass-strds-tar-gz</MimeType>\n");
1008 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1011 static void wps_print_mimetype_space_time_raster_datasets_tar_bz2(
void)
1013 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1014 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-grass-strds-tar-bzip</MimeType>\n");
1015 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1021 static void wps_print_mimetype_space_time_vector_datasets(
void)
1023 wps_print_mimetype_space_time_vector_datasets_tar();
1024 wps_print_mimetype_space_time_vector_datasets_tar_gz();
1025 wps_print_mimetype_space_time_vector_datasets_tar_bz2();
1028 static void wps_print_mimetype_space_time_vector_datasets_tar(
void)
1030 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1031 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-grass-stvds-tar</MimeType>\n");
1032 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1035 static void wps_print_mimetype_space_time_vector_datasets_tar_gz(
void)
1037 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1038 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-grass-stvds-tar-gz</MimeType>\n");
1039 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1042 static void wps_print_mimetype_space_time_vector_datasets_tar_bz2(
void)
1044 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1045 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-grass-stvds-tar-bzip</MimeType>\n");
1046 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1050 static void wps_print_mimetype_raster_gif(
void)
1052 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1053 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/gif</MimeType>\n");
1054 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1058 static void wps_print_mimetype_raster_jpeg(
void)
1060 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1061 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/jpeg</MimeType>\n");
1062 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1066 static void wps_print_mimetype_raster_hfa(
void)
1068 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1069 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-erdas-hfa</MimeType>\n");
1070 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1074 static void wps_print_mimetype_raster_tiff_other(
void)
1076 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1077 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/geotiff</MimeType>\n");
1078 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1080 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1081 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/geotiff</MimeType>\n");
1082 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1084 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1085 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-geotiff</MimeType>\n");
1086 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1090 static void wps_print_mimetype_raster_netCDF(
void)
1092 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1093 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/netcdf</MimeType>\n");
1094 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1098 static void wps_print_mimetype_raster_netCDF_other(
void)
1100 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1101 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-netcdf</MimeType>\n");
1102 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1106 static void wps_print_mimetype_vector_kml22(
void)
1108 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1109 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>text/xml</MimeType>\n");
1110 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
1111 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd</Schema>\n");
1112 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1116 static void wps_print_mimetype_vector_dgn(
void)
1118 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1119 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/dgn</MimeType>\n");
1120 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1124 static void wps_print_mimetype_vector_shape(
void)
1126 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1127 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/shp</MimeType>\n");
1128 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1132 static void wps_print_mimetype_vector_zipped_shape(
void)
1134 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1135 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-zipped-shp</MimeType>\n");
1136 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1141 static void wps_print_bounding_box_data(
void)
1145 fprintf(stdout,
"\t\t\t<Input minOccurs=\"0\" maxOccurs=\"1\">\n");
1146 wps_print_ident_title_abstract(
"BoundingBox",
"Bounding box to process data",
1147 "The bounding box is uesed to create the reference coordinate system in grass, as well as the lower left and upper right corner of the processing area.");
1148 fprintf(stdout,
"\t\t\t\t<BoundingBoxData>\n");
1150 fprintf(stdout,
"\t\t\t\t\t<Default>\n");
1151 fprintf(stdout,
"\t\t\t\t\t\t<CRS>urn:ogc:def:crs,crs:EPSG:6.3:32760</CRS>\n");
1152 fprintf(stdout,
"\t\t\t\t\t</Default>\n");
1154 fprintf(stdout,
"\t\t\t\t\t<Supported>\n");
1155 for(i = 0; i < 1; i++)
1156 fprintf(stdout,
"\t\t\t\t\t\t<CRS>urn:ogc:def:crs,crs:EPSG:6.3:32760</CRS>\n");
1157 fprintf(stdout,
"\t\t\t\t\t</Supported>\n");
1158 fprintf(stdout,
"\t\t\t\t</BoundingBoxData>\n");
1159 fprintf(stdout,
"\t\t\t</Input>\n");
int G__uses_new_gisprompt(void)
const char * G_program_name(void)
Return module name.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_free(void *)
Free allocated memory.
Structure that stores flag info.
int G_snprintf(char *, size_t, const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
Structure that stores option information.
char * G_store(const char *)
Copy string to allocated memory.
void G__wps_print_process_description(void)
Print the WPS 1.0.0 process description XML document to stdout.