81 size_t prefixlen = strlen(prefix);
85 size = (
sizeof(
"<Box>/") + (prefixlen*2) ) * 2;
86 if ( srs ) size += strlen(srs) +
sizeof(
" srsName=..");
90 ptr += sprintf(ptr,
"<%sBox", prefix);
92 if ( srs ) ptr += sprintf(ptr,
" srsName=\"%s\"", srs);
94 ptr += sprintf(ptr,
"/>");
112 size += (
sizeof(
"<Box><coordinates>/") + (prefixlen*2) ) * 2;
113 if ( srs ) size += strlen(srs) +
sizeof(
" srsName=..");
117 if ( srs ) ptr += sprintf(ptr,
"<%sBox srsName=\"%s\">", prefix, srs);
118 else ptr += sprintf(ptr,
"<%sBox>", prefix);
120 ptr += sprintf(ptr,
"<%scoordinates>", prefix);
122 ptr += sprintf(ptr,
"</%scoordinates></%sBox>", prefix, prefix);
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
void ptarray_free(POINTARRAY *pa)
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int allow_duplicates)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE, then a duplicate point will not be added.
#define LW_TRUE
Return types for functions with status returns.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision)
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision)
void * lwalloc(size_t size)