]> granicus.if.org Git - postgis/commitdiff
Fix compiler warnings
authorSandro Santilli <strk@keybit.net>
Mon, 9 Jan 2012 15:03:36 +0000 (15:03 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 9 Jan 2012 15:03:36 +0000 (15:03 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8715 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/liblwgeom.h.in
liblwgeom/lwgeom_geos.c

index c59541fc33d615665de780f4ad73a101afb4333b..6cb7ef227c0d934f77bd3482a4830053dc59e27a 100644 (file)
@@ -1786,11 +1786,11 @@ LWGEOM* lwgeom_sharedpaths(const LWGEOM* geom1, const LWGEOM* geom2);
  * @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);
 
 
 /*******************************************************************************
index 7960d521657b6f6d963b64b7bcfd4599e4e97db2..ccb024918d053b40a30943026039cfd9f154bed4 100644 (file)
@@ -1044,7 +1044,7 @@ lwgeom_sharedpaths(const LWGEOM* geom1, const LWGEOM* geom2)
 #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
@@ -1055,7 +1055,7 @@ lwgeom_offsetcurve(const LWLINE *lwline, double size, int quadsegs, int joinStyl
 
        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);
@@ -1082,9 +1082,9 @@ lwgeom_offsetcurve(const LWLINE *lwline, double size, int quadsegs, int joinStyl
 
        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)
@@ -1096,4 +1096,4 @@ lwgeom_offsetcurve(const LWLINE *lwline, double size, int quadsegs, int joinStyl
        return lwgeom_result;
        
 #endif /* POSTGIS_GEOS_VERSION < 32 */
-}
\ No newline at end of file
+}