MCPcopy Index your code
hub / github.com/MapServer/MapServer / gmlWriteBounds_GML3

Function gmlWriteBounds_GML3

mapgml.c:73–96  ·  view source on GitHub ↗

GML 3.1 (MapServer limits GML encoding to the level 0 profile) */

Source from the content-addressed store, hash-verified

71
72/* GML 3.1 (MapServer limits GML encoding to the level 0 profile) */
73static int gmlWriteBounds_GML3(FILE *stream, rectObj *rect, const char *srsname, char *tab)
74{
75 char *srsname_encoded;
76
77 if(!stream) return(MS_FAILURE);
78 if(!rect) return(MS_FAILURE);
79 if(!tab) return(MS_FAILURE);
80
81 msIO_fprintf(stream, "%s<gml:boundedBy>\n", tab);
82 if(srsname) {
83 srsname_encoded = msEncodeHTMLEntities(srsname);
84 msIO_fprintf(stream, "%s\t<gml:Envelope srsName=\"%s\">\n", tab, srsname_encoded);
85 msFree(srsname_encoded);
86 } else
87 msIO_fprintf(stream, "%s\t<gml:Envelope>\n", tab);
88
89 msIO_fprintf(stream, "%s\t\t<gml:lowerCorner>%.6f %.6f</gml:lowerCorner>\n", tab, rect->minx, rect->miny);
90 msIO_fprintf(stream, "%s\t\t<gml:upperCorner>%.6f %.6f</gml:upperCorner>\n", tab, rect->maxx, rect->maxy);
91
92 msIO_fprintf(stream, "%s\t</gml:Envelope>\n", tab);
93 msIO_fprintf(stream, "%s</gml:boundedBy>\n", tab);
94
95 return MS_SUCCESS;
96}
97
98static void gmlStartGeometryContainer(FILE *stream, char *name, char *namespace, const char *tab)
99{

Callers 1

gmlWriteBoundsFunction · 0.85

Calls 3

msIO_fprintfFunction · 0.85
msEncodeHTMLEntitiesFunction · 0.85
msFreeFunction · 0.85

Tested by

no test coverage detected