#include "lwgeom_log.h"
-LWMLINE *lwmcurve_stroke(LWMCURVE *mcurve, uint32_t perQuad);
-LWMPOLY *lwmsurface_stroke(LWMSURFACE *msurface, uint32_t perQuad);
-LWCOLLECTION *lwcollection_stroke(LWCOLLECTION *collection, uint32_t perQuad);
+LWMLINE* lwmcurve_stroke(const LWMCURVE *mcurve, uint32_t perQuad);
+LWMPOLY* lwmsurface_stroke(const LWMSURFACE *msurface, uint32_t perQuad);
+LWCOLLECTION* lwcollection_stroke(const LWCOLLECTION *collection, uint32_t perQuad);
-LWGEOM *pta_unstroke(POINTARRAY *points, int type, int srid);
-LWGEOM *lwline_unstroke(LWLINE *line);
-LWGEOM *lwpolygon_unstroke(LWPOLY *poly);
-LWGEOM *lwmline_unstroke(LWMLINE *mline);
-LWGEOM *lwmpolygon_unstroke(LWMPOLY *mpoly);
-LWGEOM *lwgeom_unstroke(LWGEOM *geom);
+LWGEOM* pta_unstroke(const POINTARRAY *points, int type, int srid);
+LWGEOM* lwline_unstroke(const LWLINE *line);
+LWGEOM* lwpolygon_unstroke(const LWPOLY *poly);
+LWGEOM* lwmline_unstroke(const LWMLINE *mline);
+LWGEOM* lwmpolygon_unstroke(const LWMPOLY *mpoly);
+LWGEOM* lwgeom_unstroke(const LWGEOM *geom);
/*
}
static POINTARRAY *
-lwcircle_stroke(POINT4D *p1, POINT4D *p2, POINT4D *p3, uint32_t perQuad)
+lwcircle_stroke(const POINT4D *p1, const POINT4D *p2, const POINT4D *p3, uint32_t perQuad)
{
POINT2D center;
POINT2D *t1 = (POINT2D*)p1;
}
LWMLINE *
-lwmcurve_stroke(LWMCURVE *mcurve, uint32_t perQuad)
+lwmcurve_stroke(const LWMCURVE *mcurve, uint32_t perQuad)
{
LWMLINE *ogeom;
- LWGEOM *tmp;
LWGEOM **lines;
int i;
for (i = 0; i < mcurve->ngeoms; i++)
{
- tmp = mcurve->geoms[i];
+ const LWGEOM *tmp = mcurve->geoms[i];
if (tmp->type == CIRCSTRINGTYPE)
{
lines[i] = (LWGEOM *)lwcircstring_stroke((LWCIRCSTRING *)tmp, perQuad);
}
LWMPOLY *
-lwmsurface_stroke(LWMSURFACE *msurface, uint32_t perQuad)
+lwmsurface_stroke(const LWMSURFACE *msurface, uint32_t perQuad)
{
LWMPOLY *ogeom;
LWGEOM *tmp;
}
LWCOLLECTION *
-lwcollection_stroke(LWCOLLECTION *collection, uint32_t perQuad)
+lwcollection_stroke(const LWCOLLECTION *collection, uint32_t perQuad)
{
LWCOLLECTION *ocol;
LWGEOM *tmp;
}
LWGEOM *
-lwgeom_stroke(LWGEOM *geom, uint32_t perQuad)
+lwgeom_stroke(const LWGEOM *geom, uint32_t perQuad)
{
LWGEOM * ogeom = NULL;
switch (geom->type)
}
LWGEOM*
-pta_unstroke(POINTARRAY *points, int type, int srid)
+pta_unstroke(const POINTARRAY *points, int type, int srid)
{
int i = 0, j, k;
POINT4D a1, a2, a3, b;
LWGEOM *
-lwline_unstroke(LWLINE *line)
+lwline_unstroke(const LWLINE *line)
{
LWDEBUG(2, "lwline_unstroke called.");
}
LWGEOM *
-lwpolygon_unstroke(LWPOLY *poly)
+lwpolygon_unstroke(const LWPOLY *poly)
{
LWGEOM **geoms;
int i, hascurve = 0;
}
LWGEOM *
-lwmline_unstroke(LWMLINE *mline)
+lwmline_unstroke(const LWMLINE *mline)
{
LWGEOM **geoms;
int i, hascurve = 0;
return (LWGEOM *)lwcollection_construct(MULTICURVETYPE, mline->srid, NULL, mline->ngeoms, geoms);
}
-LWGEOM *
-lwmpolygon_unstroke(LWMPOLY *mpoly)
+LWGEOM *
+lwmpolygon_unstroke(const LWMPOLY *mpoly)
{
LWGEOM **geoms;
int i, hascurve = 0;
}
LWGEOM *
-lwgeom_unstroke(LWGEOM *geom)
+lwgeom_unstroke(const LWGEOM *geom)
{
LWDEBUG(2, "lwgeom_unstroke called.");