#include "liblwgeom_internal.h"
-static size_t asgml2_point_size(const LWPOINT *point, char *srs, int precision, const char *prefix);
-static char *asgml2_point(const LWPOINT *point, char *srs, int precision, const char *prefix);
-static size_t asgml2_line_size(const LWLINE *line, char *srs, int precision, const char *prefix);
-static char *asgml2_line(const LWLINE *line, char *srs, int precision, const char *prefix);
-static size_t asgml2_poly_size(const LWPOLY *poly, char *srs, int precision, const char *prefix);
-static char *asgml2_poly(const LWPOLY *poly, char *srs, int precision, const char *prefix);
-static size_t asgml2_multi_size(const LWCOLLECTION *col, char *srs, int precision, const char *prefix);
-static char *asgml2_multi(const LWCOLLECTION *col, char *srs, int precision, const char *prefix);
-static size_t asgml2_collection_size(const LWCOLLECTION *col, char *srs, int precision, const char *prefix);
-static char *asgml2_collection(const LWCOLLECTION *col, char *srs, int precision, const char *prefix);
+static size_t asgml2_point_size(const LWPOINT *point, const char *srs, int precision, const char *prefix);
+static char *asgml2_point(const LWPOINT *point, const char *srs, int precision, const char *prefix);
+static size_t asgml2_line_size(const LWLINE *line, const char *srs, int precision, const char *prefix);
+static char *asgml2_line(const LWLINE *line, const char *srs, int precision, const char *prefix);
+static size_t asgml2_poly_size(const LWPOLY *poly, const char *srs, int precision, const char *prefix);
+static char *asgml2_poly(const LWPOLY *poly, const char *srs, int precision, const char *prefix);
+static size_t asgml2_multi_size(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix);
+static char *asgml2_multi(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix);
+static size_t asgml2_collection_size(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix);
+static char *asgml2_collection(const LWCOLLECTION *col, const char *srs, int precision, const char *prefix);
static size_t pointArray_toGML2(POINTARRAY *pa, char *buf, int precision);
-static size_t asgml3_point_size(const LWPOINT *point, char *srs, int precision, int opts, const char *prefix);
-static char *asgml3_point(const LWPOINT *point, char *srs, int precision, int opts, const char *prefix);
-static size_t asgml3_line_size(const LWLINE *line, char *srs, int precision, int opts, const char *prefix);
-static char *asgml3_line(const LWLINE *line, char *srs, int precision, int opts, const char *prefix);
-static size_t asgml3_poly_size(const LWPOLY *poly, char *srs, int precision, int opts, const char *prefix);
-static char *asgml3_poly(const LWPOLY *poly, char *srs, int precision, int opts, int is_patch, const char *prefix);
-static size_t asgml3_triangle_size(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *prefix);
-static char *asgml3_triangle(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *prefix);
-static size_t asgml3_multi_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *prefix);
-static char *asgml3_multi(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *prefix);
-static char *asgml3_psurface(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *prefix);
-static char *asgml3_tin(const LWTIN *tin, char *srs, int precision, int opts, const char *prefix);
-static size_t asgml3_collection_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *prefix);
-static char *asgml3_collection(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *prefix);
+static size_t asgml3_point_size(const LWPOINT *point, const char *srs, int precision, int opts, const char *prefix);
+static char *asgml3_point(const LWPOINT *point, const char *srs, int precision, int opts, const char *prefix);
+static size_t asgml3_line_size(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix);
+static char *asgml3_line(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix);
+static size_t asgml3_poly_size(const LWPOLY *poly, const char *srs, int precision, int opts, const char *prefix);
+static char *asgml3_poly(const LWPOLY *poly, const char *srs, int precision, int opts, int is_patch, const char *prefix);
+static size_t asgml3_triangle_size(const LWTRIANGLE *triangle, const char *srs, int precision, int opts, const char *prefix);
+static char *asgml3_triangle(const LWTRIANGLE *triangle, const char *srs, int precision, int opts, const char *prefix);
+static size_t asgml3_multi_size(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix);
+static char *asgml3_multi(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix);
+static char *asgml3_psurface(const LWPSURFACE *psur, const char *srs, int precision, int opts, const char *prefix);
+static char *asgml3_tin(const LWTIN *tin, const char *srs, int precision, int opts, const char *prefix);
+static size_t asgml3_collection_size(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix);
+static char *asgml3_collection(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix);
static size_t pointArray_toGML3(POINTARRAY *pa, char *buf, int precision, int opts);
static size_t pointArray_GMLsize(POINTARRAY *pa, int precision);
extern char *
-lwgeom_extent_to_gml2(const LWGEOM *geom, char *srs, int precision, const char *prefix)
+lwgeom_extent_to_gml2(const LWGEOM *geom, const char *srs, int precision, const char *prefix)
{
int size;
POINT4D pt;
extern char *
-lwgeom_extent_to_gml3(const LWGEOM *geom, char *srs, int precision, int opts, const char *prefix)
+lwgeom_extent_to_gml3(const LWGEOM *geom, const char *srs, int precision, int opts, const char *prefix)
{
int size;
POINT4D pt;
* takes a GEOMETRY and returns a GML2 representation
*/
extern char *
-lwgeom_to_gml2(const LWGEOM *geom, char *srs, int precision, const char* prefix)
+lwgeom_to_gml2(const LWGEOM *geom, const char *srs, int precision, const char* prefix)
{
int type = geom->type;
}
static size_t
-asgml2_point_size(const LWPOINT *point, char *srs, int precision, const char* prefix)
+asgml2_point_size(const LWPOINT *point, const char *srs, int precision, const char* prefix)
{
int size;
size_t prefixlen = strlen(prefix);
}
static size_t
-asgml2_point_buf(const LWPOINT *point, char *srs, char *output, int precision, const char* prefix)
+asgml2_point_buf(const LWPOINT *point, const char *srs, char *output, int precision, const char* prefix)
{
char *ptr = output;
}
static char *
-asgml2_point(const LWPOINT *point, char *srs, int precision, const char *prefix)
+asgml2_point(const LWPOINT *point, const char *srs, int precision, const char *prefix)
{
char *output;
int size;
}
static size_t
-asgml2_line_size(const LWLINE *line, char *srs, int precision, const char *prefix)
+asgml2_line_size(const LWLINE *line, const char *srs, int precision, const char *prefix)
{
int size;
size_t prefixlen = strlen(prefix);
}
static size_t
-asgml2_line_buf(const LWLINE *line, char *srs, char *output, int precision,
+asgml2_line_buf(const LWLINE *line, const char *srs, char *output, int precision,
const char *prefix)
{
char *ptr=output;
}
static char *
-asgml2_line(const LWLINE *line, char *srs, int precision, const char *prefix)
+asgml2_line(const LWLINE *line, const char *srs, int precision, const char *prefix)
{
char *output;
int size;
}
static size_t
-asgml2_poly_size(const LWPOLY *poly, char *srs, int precision, const char *prefix)
+asgml2_poly_size(const LWPOLY *poly, const char *srs, int precision, const char *prefix)
{
size_t size;
int i;
}
static size_t
-asgml2_poly_buf(const LWPOLY *poly, char *srs, char *output, int precision,
+asgml2_poly_buf(const LWPOLY *poly, const char *srs, char *output, int precision,
const char *prefix)
{
int i;
}
static char *
-asgml2_poly(const LWPOLY *poly, char *srs, int precision, const char *prefix)
+asgml2_poly(const LWPOLY *poly, const char *srs, int precision, const char *prefix)
{
char *output;
int size;
* Don't call this with single-geoms inspected.
*/
static size_t
-asgml2_multi_size(const LWCOLLECTION *col, char *srs, int precision,
+asgml2_multi_size(const LWCOLLECTION *col, const char *srs, int precision,
const char *prefix)
{
int i;
* Don't call this with single-geoms inspected!
*/
static size_t
-asgml2_multi_buf(const LWCOLLECTION *col, char *srs, char *output,
+asgml2_multi_buf(const LWCOLLECTION *col, const char *srs, char *output,
int precision, const char *prefix)
{
int type = col->type;
* Don't call this with single-geoms inspected!
*/
static char *
-asgml2_multi(const LWCOLLECTION *col, char *srs, int precision,
+asgml2_multi(const LWCOLLECTION *col, const char *srs, int precision,
const char *prefix)
{
char *gml;
* Don't call this with single-geoms!
*/
static size_t
-asgml2_collection_size(const LWCOLLECTION *col, char *srs, int precision,
+asgml2_collection_size(const LWCOLLECTION *col, const char *srs, int precision,
const char *prefix)
{
int i;
* Don't call this with single-geoms inspected!
*/
static size_t
-asgml2_collection_buf(const LWCOLLECTION *col, char *srs, char *output, int precision, const char *prefix)
+asgml2_collection_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, const char *prefix)
{
char *ptr;
int i;
* Don't call this with single-geoms inspected!
*/
static char *
-asgml2_collection(const LWCOLLECTION *col, char *srs, int precision,
+asgml2_collection(const LWCOLLECTION *col, const char *srs, int precision,
const char *prefix)
{
char *gml;
/* takes a GEOMETRY and returns a GML representation */
extern char *
-lwgeom_to_gml3(const LWGEOM *geom, char *srs, int precision, int opts, const char *prefix)
+lwgeom_to_gml3(const LWGEOM *geom, const char *srs, int precision, int opts, const char *prefix)
{
int type = geom->type;
}
static size_t
-asgml3_point_size(const LWPOINT *point, char *srs, int precision, int opts, const char *prefix)
+asgml3_point_size(const LWPOINT *point, const char *srs, int precision, int opts, const char *prefix)
{
int size;
size_t prefixlen = strlen(prefix);
}
static size_t
-asgml3_point_buf(const LWPOINT *point, char *srs, char *output, int precision, int opts, const char *prefix)
+asgml3_point_buf(const LWPOINT *point, const char *srs, char *output, int precision, int opts, const char *prefix)
{
char *ptr = output;
int dimension=2;
}
static char *
-asgml3_point(const LWPOINT *point, char *srs, int precision, int opts, const char *prefix)
+asgml3_point(const LWPOINT *point, const char *srs, int precision, int opts, const char *prefix)
{
char *output;
int size;
static size_t
-asgml3_line_size(const LWLINE *line, char *srs, int precision, int opts, const char *prefix)
+asgml3_line_size(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix)
{
int size;
size_t prefixlen = strlen(prefix);
}
static size_t
-asgml3_line_buf(const LWLINE *line, char *srs, char *output, int precision, int opts, const char *prefix)
+asgml3_line_buf(const LWLINE *line, const char *srs, char *output, int precision, int opts, const char *prefix)
{
char *ptr=output;
int dimension=2;
}
static char *
-asgml3_line(const LWLINE *line, char *srs, int precision, int opts, const char *prefix)
+asgml3_line(const LWLINE *line, const char *srs, int precision, int opts, const char *prefix)
{
char *output;
int size;
static size_t
-asgml3_poly_size(const LWPOLY *poly, char *srs, int precision, int opts, const char *prefix)
+asgml3_poly_size(const LWPOLY *poly, const char *srs, int precision, int opts, const char *prefix)
{
size_t size;
size_t prefixlen = strlen(prefix);
}
static size_t
-asgml3_poly_buf(const LWPOLY *poly, char *srs, char *output, int precision, int opts, int is_patch, const char *prefix)
+asgml3_poly_buf(const LWPOLY *poly, const char *srs, char *output, int precision, int opts, int is_patch, const char *prefix)
{
int i;
char *ptr=output;
}
static char *
-asgml3_poly(const LWPOLY *poly, char *srs, int precision, int opts, int is_patch, const char *prefix)
+asgml3_poly(const LWPOLY *poly, const char *srs, int precision, int opts, int is_patch, const char *prefix)
{
char *output;
int size;
static size_t
-asgml3_triangle_size(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *prefix)
+asgml3_triangle_size(const LWTRIANGLE *triangle, const char *srs, int precision, int opts, const char *prefix)
{
size_t size;
size_t prefixlen = strlen(prefix);
}
static size_t
-asgml3_triangle_buf(const LWTRIANGLE *triangle, char *srs, char *output, int precision, int opts, const char *prefix)
+asgml3_triangle_buf(const LWTRIANGLE *triangle, const char *srs, char *output, int precision, int opts, const char *prefix)
{
char *ptr=output;
int dimension=2;
}
static char *
-asgml3_triangle(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *prefix)
+asgml3_triangle(const LWTRIANGLE *triangle, const char *srs, int precision, int opts, const char *prefix)
{
char *output;
int size;
* Don't call this with single-geoms inspected.
*/
static size_t
-asgml3_multi_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *prefix)
+asgml3_multi_size(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix)
{
int i;
size_t size;
* Don't call this with single-geoms inspected!
*/
static size_t
-asgml3_multi_buf(const LWCOLLECTION *col, char *srs, char *output, int precision, int opts, const char *prefix)
+asgml3_multi_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, int opts, const char *prefix)
{
int type = col->type;
char *ptr, *gmltype;
* Don't call this with single-geoms inspected!
*/
static char *
-asgml3_multi(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *prefix)
+asgml3_multi(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix)
{
char *gml;
size_t size;
static size_t
-asgml3_psurface_size(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *prefix)
+asgml3_psurface_size(const LWPSURFACE *psur, const char *srs, int precision, int opts, const char *prefix)
{
int i;
size_t size;
* Don't call this with single-geoms inspected!
*/
static size_t
-asgml3_psurface_buf(const LWPSURFACE *psur, char *srs, char *output, int precision, int opts, const char *prefix)
+asgml3_psurface_buf(const LWPSURFACE *psur, const char *srs, char *output, int precision, int opts, const char *prefix)
{
char *ptr;
int i;
* Don't call this with single-geoms inspected!
*/
static char *
-asgml3_psurface(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *prefix)
+asgml3_psurface(const LWPSURFACE *psur, const char *srs, int precision, int opts, const char *prefix)
{
char *gml;
size_t size;
static size_t
-asgml3_tin_size(const LWTIN *tin, char *srs, int precision, int opts, const char *prefix)
+asgml3_tin_size(const LWTIN *tin, const char *srs, int precision, int opts, const char *prefix)
{
int i;
size_t size;
* Don't call this with single-geoms inspected!
*/
static size_t
-asgml3_tin_buf(const LWTIN *tin, char *srs, char *output, int precision, int opts, const char *prefix)
+asgml3_tin_buf(const LWTIN *tin, const char *srs, char *output, int precision, int opts, const char *prefix)
{
char *ptr;
int i;
* Don't call this with single-geoms inspected!
*/
static char *
-asgml3_tin(const LWTIN *tin, char *srs, int precision, int opts, const char *prefix)
+asgml3_tin(const LWTIN *tin, const char *srs, int precision, int opts, const char *prefix)
{
char *gml;
size_t size;
}
static size_t
-asgml3_collection_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *prefix)
+asgml3_collection_size(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix)
{
int i;
size_t size;
}
static size_t
-asgml3_collection_buf(const LWCOLLECTION *col, char *srs, char *output, int precision, int opts, const char *prefix)
+asgml3_collection_buf(const LWCOLLECTION *col, const char *srs, char *output, int precision, int opts, const char *prefix)
{
char *ptr;
int i;
* Don't call this with single-geoms inspected!
*/
static char *
-asgml3_collection(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *prefix)
+asgml3_collection(const LWCOLLECTION *col, const char *srs, int precision, int opts, const char *prefix)
{
char *gml;
size_t size;