10 #if defined(HAVE_LANGINFO_H)
13 #if defined(__MINGW32__) && defined(USE_NLS)
14 #include <localcharset.h>
17 #include "parser_local_proto.h"
24 #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_vector_gml311(
void);
44 static void wps_print_mimetype_vector_gml311_appl(
void);
45 static void wps_print_mimetype_vector_gml212(
void);
46 static void wps_print_mimetype_vector_gml212_appl(
void);
47 static void wps_print_mimetype_vector_kml22(
void);
48 static void wps_print_mimetype_vector_dgn(
void);
49 static void wps_print_mimetype_vector_shape(
void);
50 static void wps_print_mimetype_vector_zipped_shape(
void);
53 static void wps_print_mimetype_raster_grass_binary(
void);
54 static void wps_print_mimetype_raster_grass_ascii(
void);
55 static void wps_print_mimetype_vector_grass_ascii(
void);
56 static void wps_print_mimetype_vector_grass_binary(
void);
59 static void wps_print_mimetype_space_time_datasets(
void);
60 static void wps_print_mimetype_space_time_raster_datasets(
void);
61 static void wps_print_mimetype_space_time_vector_datasets(
void);
62 static void wps_print_mimetype_space_time_vector_datasets_tar(
void);
63 static void wps_print_mimetype_space_time_raster_datasets_tar(
void);
64 static void wps_print_mimetype_space_time_vector_datasets_tar_gz(
void);
65 static void wps_print_mimetype_space_time_raster_datasets_tar_gz(
void);
66 static void wps_print_mimetype_space_time_vector_datasets_tar_bz2(
void);
67 static void wps_print_mimetype_space_time_raster_datasets_tar_bz2(
void);
69 static void wps_print_process_descriptions_begin(
void);
70 static void wps_print_process_descriptions_end(
void);
71 static void wps_print_process_description_begin(
int,
int,
const char *,
72 const char *,
const char *,
74 static void wps_print_process_description_end(
void);
75 static void wps_print_data_inputs_begin(
void);
76 static void wps_print_data_inputs_end(
void);
77 static void wps_print_process_outputs_begin(
void);
78 static void wps_print_process_outputs_end(
void);
79 static void wps_print_bounding_box_data(
void);
80 static void wps_print_ident_title_abstract(
const char *,
const char *,
82 static void wps_print_complex_input(
int,
int,
const char *,
const char *,
83 const char *,
int,
int);
84 static void wps_print_complex_output(
const char *,
const char *,
const char *,
86 static void wps_print_comlpex_input_output(
int,
int,
int,
const char *,
87 const char *,
const char *,
int,
89 static void wps_print_literal_input_output(
int,
int,
int,
const char *,
90 const char *,
const char *,
91 const char *,
int,
const char **,
92 int,
const char *,
int);
94 static void print_escaped_for_xml(FILE *fp,
const char *str)
162 const char *value =
NULL;
164 const char *encoding;
169 const char *identifier =
NULL;
170 const char *title =
NULL;
171 const char *
abstract =
NULL;
172 const char **keywords =
NULL;
173 int data_type, is_input, is_output;
174 int num_raster_inputs = 0, num_raster_outputs = 0;
175 int num_strds_inputs = 0, num_strds_outputs = 0;
177 int num_keywords = 0;
178 int found_output = 0;
186 #if defined(HAVE_LANGINFO_H)
187 encoding = nl_langinfo(CODESET);
188 if (!encoding || strlen(encoding) == 0) {
191 #elif defined(__MINGW32__) && defined(USE_NLS)
192 encoding = locale_charset();
193 if (!encoding || strlen(encoding) == 0) {
206 identifier =
st->pgm_name;
208 if (
st->module_info.description) {
209 title =
st->module_info.description;
210 abstract =
st->module_info.description;
213 if (
st->module_info.keywords) {
214 keywords =
st->module_info.keywords;
215 num_keywords =
st->n_keys;
218 wps_print_process_descriptions_begin();
221 wps_print_process_description_begin(store, status, identifier, title,
222 abstract, keywords, num_keywords);
223 wps_print_data_inputs_begin();
230 wps_print_bounding_box_data();
234 opt = &
st->first_option;
235 while (opt !=
NULL) {
251 const char *atts[] = {
"age",
"element",
"prompt",
NULL};
254 s = strtok(top,
",");
255 for (i = 0; s !=
NULL && atts[i] !=
NULL; i++) {
261 if (strcmp(token,
"new") == 0) {
265 if (strcmp(token,
"raster") == 0) {
272 num_raster_outputs++;
274 if (strcmp(token,
"vector") == 0) {
279 if (strcmp(token,
"stds") == 0) {
282 if (strcmp(token,
"strds") == 0) {
289 if (strcmp(token,
"stvds") == 0) {
292 if (strcmp(token,
"file") == 0) {
295 s = strtok(
NULL,
",");
305 s = strtok(top,
",");
307 for (i = 0; s !=
NULL; i++) {
309 s = strtok(
NULL,
",");
333 identifier = opt->
key;
373 while (opt->
opts[i]) {
376 keywords = opt->
opts;
383 wps_print_complex_input(
min,
max, identifier, title,
384 abstract, 2048, data_type);
389 wps_print_literal_input_output(
391 0, keywords, num_keywords, value,
TYPE_OTHER);
400 flag = &
st->first_flag;
401 while (flag !=
NULL) {
404 char *ident = (
char *)
G_calloc(3,
sizeof(
char));
407 ident[1] = flag->
key;
416 const char *val[] = {
"true",
"false"};
417 wps_print_literal_input_output(
WPS_INPUT, 0, 1, ident, title,
NULL,
418 "boolean", 0, val, 2,
"false",
426 if (num_raster_inputs > 0 || num_raster_outputs > 0 ||
427 num_strds_inputs > 0 || num_strds_outputs > 0) {
428 wps_print_literal_input_output(
430 "Resolution of the mapset in north-south direction in meters or "
432 "This parameter defines the north-south resolution of the mapset "
433 "in meter or degrees, which should be used to process the input "
434 "and output raster data. To enable this setting, you need to "
435 "specify north-south and east-west resolution.",
437 wps_print_literal_input_output(
439 "Resolution of the mapset in east-west direction in meters or "
441 "This parameter defines the east-west resolution of the mapset in "
442 "meters or degrees, which should be used to process the input and "
443 "output raster data. To enable this setting, you need to specify "
444 "north-south and east-west resolution.",
449 if (num_raster_inputs > 0)
450 wps_print_literal_input_output(
452 "Band to select for processing (default is all bands)",
453 "This parameter defines band number of the input raster files "
454 "which should be processed. As default all bands are processed and "
455 "used as single and multiple inputs for raster modules.",
459 wps_print_data_inputs_end();
461 wps_print_process_outputs_begin();
468 opt = &
st->first_option;
469 while (opt !=
NULL) {
479 const char *atts[] = {
"age",
"element",
"prompt",
NULL};
482 s = strtok(top,
",");
483 for (i = 0; s !=
NULL && atts[i] !=
NULL; i++) {
488 if (strcmp(token,
"new") == 0)
490 if (strcmp(token,
"raster") == 0) {
493 if (strcmp(token,
"vector") == 0) {
496 if (strcmp(token,
"stds") == 0) {
499 if (strcmp(token,
"strds") == 0) {
502 if (strcmp(token,
"stvds") == 0) {
505 if (strcmp(token,
"file") == 0) {
508 s = strtok(
NULL,
",");
514 if (is_output == 1) {
517 _(
"Multiple outputs are not supported by WPS 1.0.0"));
518 identifier = opt->
key;
533 wps_print_complex_output(identifier, title,
abstract,
542 if (found_output == 0)
543 wps_print_complex_output(
544 "stdout",
"Module output on stdout",
548 wps_print_process_outputs_end();
549 wps_print_process_description_end();
550 wps_print_process_descriptions_end();
560 static void wps_print_process_descriptions_begin(
void)
562 fprintf(stdout,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
563 fprintf(stdout,
"<wps:ProcessDescriptions "
564 "xmlns:wps=\"http://www.opengis.net/wps/1.0.0\"\n");
565 fprintf(stdout,
"xmlns:ows=\"http://www.opengis.net/ows/1.1\"\n");
566 fprintf(stdout,
"xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n");
568 "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
569 fprintf(stdout,
"xsi:schemaLocation=\"http://www.opengis.net/wps/1.0.0\n "
570 "http://schemas.opengis.net/wps/1.0.0/"
571 "wpsDescribeProcess_response.xsd\"\n service=\"WPS\" "
572 "version=\"1.0.0\" xml:lang=\"en-US\"> \n");
577 static void wps_print_process_descriptions_end(
void)
579 fprintf(stdout,
"</wps:ProcessDescriptions>\n");
584 static void wps_print_process_description_begin(
585 int store,
int status,
const char *identifier,
const char *title,
586 const char *
abstract,
const char **keywords,
int num_keywords)
591 "\t<ProcessDescription wps:processVersion=\"1\" "
592 "storeSupported=\"%s\" statusSupported=\"%s\">\n",
593 (store ?
"true" :
"false"), (status ?
"true" :
"false"));
595 fprintf(stdout,
"\t\t<ows:Identifier>");
596 print_escaped_for_xml(stdout, identifier);
597 fprintf(stdout,
"</ows:Identifier>\n");
604 fprintf(stdout,
"\t\t<ows:Title>");
605 print_escaped_for_xml(stdout, title);
606 fprintf(stdout,
"</ows:Title>\n");
610 fprintf(stdout,
"\t\t<ows:Title>");
611 print_escaped_for_xml(stdout,
"No title available");
612 fprintf(stdout,
"</ows:Title>\n");
616 fprintf(stdout,
"\t\t<ows:Abstract>");
617 fprintf(stdout,
"https://grass.osgeo.org/grass-devel/manuals/%s.html",
619 fprintf(stdout,
"</ows:Abstract>\n");
622 for (i = 0; i < num_keywords; i++) {
623 fprintf(stdout,
"\t\t<ows:Metadata xlink:title=\"");
624 print_escaped_for_xml(stdout, keywords[i]);
625 fprintf(stdout,
"\" />\n");
631 static void wps_print_process_description_end(
void)
633 fprintf(stdout,
"\t</ProcessDescription>\n");
638 static void wps_print_data_inputs_begin(
void)
640 fprintf(stdout,
"\t\t<DataInputs>\n");
645 static void wps_print_data_inputs_end(
void)
647 fprintf(stdout,
"\t\t</DataInputs>\n");
652 static void wps_print_process_outputs_begin(
void)
654 fprintf(stdout,
"\t\t<ProcessOutputs>\n");
659 static void wps_print_process_outputs_end(
void)
661 fprintf(stdout,
"\t\t</ProcessOutputs>\n");
666 static void wps_print_complex_input(
int min,
int max,
const char *identifier,
667 const char *title,
const char *
abstract,
671 abstract, megs, type);
676 static void wps_print_complex_output(
const char *identifier,
const char *title,
677 const char *
abstract,
int type)
679 wps_print_comlpex_input_output(
WPS_OUTPUT, 0, 0, identifier, title,
685 static void wps_print_comlpex_input_output(
int inout_type,
int min,
int max,
686 const char *identifier,
688 const char *
abstract,
int megs,
692 fprintf(stdout,
"\t\t\t<Input minOccurs=\"%i\" maxOccurs=\"%i\">\n",
695 fprintf(stdout,
"\t\t\t<Output>\n");
697 wps_print_ident_title_abstract(identifier, title,
abstract);
700 fprintf(stdout,
"\t\t\t\t<ComplexData maximumMegabytes=\"%i\">\n",
703 fprintf(stdout,
"\t\t\t\t<ComplexOutput>\n");
705 fprintf(stdout,
"\t\t\t\t\t<Default>\n");
707 wps_print_mimetype_raster_tiff();
710 wps_print_mimetype_vector_gml311();
715 wps_print_mimetype_space_time_raster_datasets_tar_gz();
718 wps_print_mimetype_space_time_raster_datasets_tar_gz();
721 wps_print_mimetype_space_time_vector_datasets_tar_gz();
724 wps_print_mimetype_text_plain();
726 fprintf(stdout,
"\t\t\t\t\t</Default>\n");
727 fprintf(stdout,
"\t\t\t\t\t<Supported>\n");
731 wps_print_mimetype_raster_tiff();
732 wps_print_mimetype_raster_tiff_other();
733 wps_print_mimetype_raster_png();
734 wps_print_mimetype_raster_gif();
735 wps_print_mimetype_raster_jpeg();
736 wps_print_mimetype_raster_hfa();
737 wps_print_mimetype_raster_netCDF();
738 wps_print_mimetype_raster_netCDF_other();
741 wps_print_mimetype_raster_tiff();
742 wps_print_mimetype_raster_tiff_other();
743 wps_print_mimetype_raster_hfa();
744 wps_print_mimetype_raster_netCDF();
745 wps_print_mimetype_raster_netCDF_other();
750 wps_print_mimetype_vector_gml311();
751 wps_print_mimetype_vector_gml311_appl();
752 wps_print_mimetype_vector_gml212();
753 wps_print_mimetype_vector_gml212_appl();
754 wps_print_mimetype_vector_kml22();
755 wps_print_mimetype_vector_dgn();
756 wps_print_mimetype_vector_shape();
757 wps_print_mimetype_vector_zipped_shape();
760 wps_print_mimetype_vector_gml311();
761 wps_print_mimetype_vector_gml311_appl();
762 wps_print_mimetype_vector_gml212();
763 wps_print_mimetype_vector_gml212_appl();
764 wps_print_mimetype_vector_kml22();
768 wps_print_mimetype_space_time_datasets();
771 wps_print_mimetype_space_time_raster_datasets();
774 wps_print_mimetype_space_time_vector_datasets();
777 wps_print_mimetype_text_plain();
779 fprintf(stdout,
"\t\t\t\t\t</Supported>\n");
782 fprintf(stdout,
"\t\t\t\t</ComplexData>\n");
784 fprintf(stdout,
"\t\t\t\t</ComplexOutput>\n");
787 fprintf(stdout,
"\t\t\t</Input>\n");
789 fprintf(stdout,
"\t\t\t</Output>\n");
794 static void wps_print_ident_title_abstract(
const char *identifier,
796 const char *
abstract)
799 fprintf(stdout,
"\t\t\t\t<ows:Identifier>");
800 print_escaped_for_xml(stdout, identifier);
801 fprintf(stdout,
"</ows:Identifier>\n");
808 fprintf(stdout,
"\t\t\t\t<ows:Title>");
809 print_escaped_for_xml(stdout, title);
810 fprintf(stdout,
"</ows:Title>\n");
814 fprintf(stdout,
"\t\t\t\t<ows:Title>");
815 print_escaped_for_xml(stdout,
"No title available");
816 fprintf(stdout,
"</ows:Title>\n");
820 fprintf(stdout,
"\t\t\t\t<ows:Abstract>");
821 print_escaped_for_xml(stdout,
abstract);
822 fprintf(stdout,
"</ows:Abstract>\n");
828 static void wps_print_literal_input_output(
829 int inout_type,
int min,
int max,
const char *identifier,
const char *title,
830 const char *
abstract,
const char *datatype,
int unitofmesure,
831 const char **choices,
int num_choices,
const char *default_value,
int type)
838 fprintf(stdout,
"\t\t\t<Input minOccurs=\"%i\" maxOccurs=\"%i\">\n",
841 fprintf(stdout,
"\t\t\t<Output>\n");
843 wps_print_ident_title_abstract(identifier, title,
abstract);
845 fprintf(stdout,
"\t\t\t\t<LiteralData>\n");
849 "\t\t\t\t\t<ows:DataType "
850 "ows:reference=\"xs:%s\">%s</ows:DataType>\n",
854 fprintf(stdout,
"\t\t\t\t\t<UOMs>\n");
855 fprintf(stdout,
"\t\t\t\t\t\t<Default>\n");
856 fprintf(stdout,
"\t\t\t\t\t\t\t<ows:UOM>meters</ows:UOM>\n");
857 fprintf(stdout,
"\t\t\t\t\t\t</Default>\n");
858 fprintf(stdout,
"\t\t\t\t\t\t<Supported>\n");
859 fprintf(stdout,
"\t\t\t\t\t\t\t<ows:UOM>meters</ows:UOM>\n");
860 fprintf(stdout,
"\t\t\t\t\t\t\t<ows:UOM>degrees</ows:UOM>\n");
861 fprintf(stdout,
"\t\t\t\t\t\t</Supported>\n");
862 fprintf(stdout,
"\t\t\t\t\t</UOMs>\n");
864 if (num_choices == 0 || choices ==
NULL)
865 fprintf(stdout,
"\t\t\t\t\t<ows:AnyValue/>\n");
868 if (strcmp(datatype,
"integer") == 0 ||
869 strcmp(datatype,
"float") == 0) {
870 str = strtok((
char *)choices[0],
"-");
872 snprintf(range[0], 24,
"%s", str);
873 str = strtok(
NULL,
"-");
875 snprintf(range[1], 24,
"%s", str);
881 fprintf(stdout,
"\t\t\t\t\t<ows:AllowedValues>\n");
884 "\t\t\t\t\t\t<ows:Range ows:rangeClosure=\"closed\">\n");
886 "\t\t\t\t\t\t\t<ows:MinimumValue>%s</ows:MinimumValue>\n",
889 "\t\t\t\t\t\t\t<ows:MaximumValue>%s</ows:MaximumValue>\n",
891 fprintf(stdout,
"\t\t\t\t\t\t</ows:Range>\n");
894 for (i = 0; i < num_choices; i++) {
895 fprintf(stdout,
"\t\t\t\t\t\t<ows:Value>");
896 print_escaped_for_xml(stdout, choices[i]);
897 fprintf(stdout,
"</ows:Value>\n");
900 fprintf(stdout,
"\t\t\t\t\t</ows:AllowedValues>\n");
904 fprintf(stdout,
"\t\t\t\t\t<DefaultValue>");
905 print_escaped_for_xml(stdout, default_value);
906 fprintf(stdout,
"</DefaultValue>\n");
908 fprintf(stdout,
"\t\t\t\t</LiteralData>\n");
911 fprintf(stdout,
"\t\t\t</Input>\n");
913 fprintf(stdout,
"\t\t\t</Output>\n");
918 static void wps_print_mimetype_text_plain(
void)
920 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
921 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>text/plain</MimeType>\n");
922 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
927 static void wps_print_mimetype_raster_tiff(
void)
929 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
930 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/tiff</MimeType>\n");
931 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
936 static void wps_print_mimetype_raster_png(
void)
938 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
939 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/png</MimeType>\n");
940 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
945 static void wps_print_mimetype_raster_grass_binary(
void)
947 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
949 "\t\t\t\t\t\t\t<MimeType>application/grass-raster-binary</MimeType>\n");
950 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
954 static void wps_print_mimetype_raster_grass_ascii(
void)
956 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
958 "\t\t\t\t\t\t\t<MimeType>application/grass-raster-ascii</MimeType>\n");
959 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
964 static void wps_print_mimetype_vector_gml311_appl(
void)
966 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
967 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/xml</MimeType>\n");
968 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
969 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/"
970 "3.1.1/base/gml.xsd</Schema>\n");
971 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
976 static void wps_print_mimetype_vector_gml212_appl(
void)
978 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
979 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/xml</MimeType>\n");
980 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
981 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/"
982 "2.1.2/feature.xsd</Schema>\n");
983 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
988 static void wps_print_mimetype_vector_gml311(
void)
990 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
991 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>text/xml</MimeType>\n");
992 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
993 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/"
994 "3.1.1/base/gml.xsd</Schema>\n");
995 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1000 static void wps_print_mimetype_vector_gml212(
void)
1002 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1003 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>text/xml</MimeType>\n");
1004 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
1005 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/gml/"
1006 "2.1.2/feature.xsd</Schema>\n");
1007 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1013 static void wps_print_mimetype_vector_grass_ascii(
void)
1015 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1017 "\t\t\t\t\t\t\t<MimeType>application/grass-vector-ascii</MimeType>\n");
1018 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1023 static void wps_print_mimetype_vector_grass_binary(
void)
1025 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1027 "\t\t\t\t\t\t\t<MimeType>application/grass-vector-binary</MimeType>\n");
1028 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1034 static void wps_print_mimetype_space_time_datasets(
void)
1036 wps_print_mimetype_space_time_raster_datasets();
1037 wps_print_mimetype_space_time_vector_datasets();
1043 static void wps_print_mimetype_space_time_raster_datasets(
void)
1045 wps_print_mimetype_space_time_raster_datasets_tar();
1046 wps_print_mimetype_space_time_raster_datasets_tar_gz();
1047 wps_print_mimetype_space_time_raster_datasets_tar_bz2();
1050 static void wps_print_mimetype_space_time_raster_datasets_tar(
void)
1052 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1055 "\t\t\t\t\t\t\t<MimeType>application/x-grass-strds-tar</MimeType>\n");
1056 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1059 static void wps_print_mimetype_space_time_raster_datasets_tar_gz(
void)
1061 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1062 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-grass-strds-tar-gz</"
1064 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1067 static void wps_print_mimetype_space_time_raster_datasets_tar_bz2(
void)
1069 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1070 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/"
1071 "x-grass-strds-tar-bzip</MimeType>\n");
1072 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1078 static void wps_print_mimetype_space_time_vector_datasets(
void)
1080 wps_print_mimetype_space_time_vector_datasets_tar();
1081 wps_print_mimetype_space_time_vector_datasets_tar_gz();
1082 wps_print_mimetype_space_time_vector_datasets_tar_bz2();
1085 static void wps_print_mimetype_space_time_vector_datasets_tar(
void)
1087 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1090 "\t\t\t\t\t\t\t<MimeType>application/x-grass-stvds-tar</MimeType>\n");
1091 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1094 static void wps_print_mimetype_space_time_vector_datasets_tar_gz(
void)
1096 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1097 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/x-grass-stvds-tar-gz</"
1099 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1102 static void wps_print_mimetype_space_time_vector_datasets_tar_bz2(
void)
1104 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1105 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/"
1106 "x-grass-stvds-tar-bzip</MimeType>\n");
1107 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1111 static void wps_print_mimetype_raster_gif(
void)
1113 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1114 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/gif</MimeType>\n");
1115 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1119 static void wps_print_mimetype_raster_jpeg(
void)
1121 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1122 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/jpeg</MimeType>\n");
1123 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1127 static void wps_print_mimetype_raster_hfa(
void)
1129 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1131 "\t\t\t\t\t\t\t<MimeType>application/x-erdas-hfa</MimeType>\n");
1132 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1137 static void wps_print_mimetype_raster_tiff_other(
void)
1139 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1140 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>image/geotiff</MimeType>\n");
1141 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1143 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1144 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/geotiff</MimeType>\n");
1145 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1147 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1149 "\t\t\t\t\t\t\t<MimeType>application/x-geotiff</MimeType>\n");
1150 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1154 static void wps_print_mimetype_raster_netCDF(
void)
1156 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1157 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/netcdf</MimeType>\n");
1158 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1162 static void wps_print_mimetype_raster_netCDF_other(
void)
1164 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1166 "\t\t\t\t\t\t\t<MimeType>application/x-netcdf</MimeType>\n");
1167 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1171 static void wps_print_mimetype_vector_kml22(
void)
1173 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1174 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>text/xml</MimeType>\n");
1175 fprintf(stdout,
"\t\t\t\t\t\t\t<Encoding>UTF-8</Encoding>\n");
1176 fprintf(stdout,
"\t\t\t\t\t\t\t<Schema>http://schemas.opengis.net/kml/"
1177 "2.2.0/ogckml22.xsd</Schema>\n");
1178 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1182 static void wps_print_mimetype_vector_dgn(
void)
1184 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1185 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/dgn</MimeType>\n");
1186 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1190 static void wps_print_mimetype_vector_shape(
void)
1192 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1193 fprintf(stdout,
"\t\t\t\t\t\t\t<MimeType>application/shp</MimeType>\n");
1194 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1198 static void wps_print_mimetype_vector_zipped_shape(
void)
1200 fprintf(stdout,
"\t\t\t\t\t\t<Format>\n");
1202 "\t\t\t\t\t\t\t<MimeType>application/x-zipped-shp</MimeType>\n");
1203 fprintf(stdout,
"\t\t\t\t\t\t</Format>\n");
1209 static void wps_print_bounding_box_data(
void)
1213 fprintf(stdout,
"\t\t\t<Input minOccurs=\"0\" maxOccurs=\"1\">\n");
1214 wps_print_ident_title_abstract(
1215 "BoundingBox",
"Bounding box to process data",
1216 "The bounding box is uesed to create the reference coordinate system "
1217 "in grass, as well as the lower left and upper right corner of the "
1218 "processing area.");
1219 fprintf(stdout,
"\t\t\t\t<BoundingBoxData>\n");
1221 fprintf(stdout,
"\t\t\t\t\t<Default>\n");
1223 "\t\t\t\t\t\t<CRS>urn:ogc:def:crs,crs:EPSG:6.3:32760</CRS>\n");
1224 fprintf(stdout,
"\t\t\t\t\t</Default>\n");
1227 fprintf(stdout,
"\t\t\t\t\t<Supported>\n");
1228 for (i = 0; i < 1; i++)
1230 "\t\t\t\t\t\t<CRS>urn:ogc:def:crs,crs:EPSG:6.3:32760</CRS>\n");
1231 fprintf(stdout,
"\t\t\t\t\t</Supported>\n");
1232 fprintf(stdout,
"\t\t\t\t</BoundingBoxData>\n");
1233 fprintf(stdout,
"\t\t\t</Input>\n");
void G_free(void *)
Free allocated memory.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
const char * G_program_name(void)
Return module name.
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.
Structure that stores flag info.
Structure that stores option information.