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

Function gmlWriteBounds_GML2

mapgml.c:47–70  ·  view source on GitHub ↗

GML 2.1.2 */

Source from the content-addressed store, hash-verified

45
46/* GML 2.1.2 */
47static int gmlWriteBounds_GML2(FILE *stream, rectObj *rect, const char *srsname, char *tab)
48{
49 char *srsname_encoded;
50
51 if(!stream) return(MS_FAILURE);
52 if(!rect) return(MS_FAILURE);
53 if(!tab) return(MS_FAILURE);
54
55 msIO_fprintf(stream, "%s<gml:boundedBy>\n", tab);
56 if(srsname) {
57 srsname_encoded = msEncodeHTMLEntities(srsname);
58 msIO_fprintf(stream, "%s\t<gml:Box srsName=\"%s\">\n", tab, srsname_encoded);
59 msFree(srsname_encoded);
60 } else
61 msIO_fprintf(stream, "%s\t<gml:Box>\n", tab);
62
63 msIO_fprintf(stream, "%s\t\t<gml:coordinates>", tab);
64 msIO_fprintf(stream, "%.6f,%.6f %.6f,%.6f", rect->minx, rect->miny, rect->maxx, rect->maxy );
65 msIO_fprintf(stream, "</gml:coordinates>\n");
66 msIO_fprintf(stream, "%s\t</gml:Box>\n", tab);
67 msIO_fprintf(stream, "%s</gml:boundedBy>\n", tab);
68
69 return MS_SUCCESS;
70}
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)

Callers 1

gmlWriteBoundsFunction · 0.85

Calls 3

msIO_fprintfFunction · 0.85
msEncodeHTMLEntitiesFunction · 0.85
msFreeFunction · 0.85

Tested by

no test coverage detected