* @param quadsegs number of quadrature segments in curves (try 8)
* @param joinStyle (1 = round, 2 = mitre, 3 = bevel)
* @param mitreLimit (try 5.0)
- * @return derived geometry
+ * @return derived geometry (linestring or multilinestring)
*
* Requires GEOS-3.2.0+
*/
-LWLINE* lwgeom_offsetcurve(const LWLINE *lwline, double size, int quadsegs, int joinStyle, double mitreLimit);
+LWGEOM* lwgeom_offsetcurve(const LWLINE *lwline, double size, int quadsegs, int joinStyle, double mitreLimit);
/*******************************************************************************
#endif /* POSTGIS_GEOS_VERSION >= 33 */
}
-LWLINE*
+LWGEOM*
lwgeom_offsetcurve(const LWLINE *lwline, double size, int quadsegs, int joinStyle, double mitreLimit)
{
#if POSTGIS_GEOS_VERSION < 32
initGEOS(lwnotice, lwgeom_geos_error);
- g1 = (GEOSGeometry *)LWGEOM2GEOS(lwline);
+ g1 = (GEOSGeometry *)LWGEOM2GEOS(lwline_as_lwgeom(lwline));
if ( ! g1 )
{
lwerror("lwgeom_offsetcurve: Geometry could not be converted to GEOS: %s", lwgeom_geos_errmsg);
LWDEBUGF(3, "result: %s", GEOSGeomToWKT(g3));
- GEOSSetSRID(g3, lwgeom_get_srid(lwline));
+ GEOSSetSRID(g3, lwgeom_get_srid(lwline_as_lwgeom(lwline)));
- lwgeom_result = GEOS2LWGEOM(g3, lwgeom_has_z(lwline));
+ lwgeom_result = GEOS2LWGEOM(g3, lwgeom_has_z(lwline_as_lwgeom(lwline)));
GEOSGeom_destroy(g3);
if (lwgeom_result == NULL)
return lwgeom_result;
#endif /* POSTGIS_GEOS_VERSION < 32 */
-}
\ No newline at end of file
+}