]> granicus.if.org Git - postgis/commitdiff
merge all export functions in a same file. remove useless old ones. rename SVG one...
authorOlivier Courtin <olivier.courtin@camptocamp.com>
Mon, 22 Feb 2010 19:16:00 +0000 (19:16 +0000)
committerOlivier Courtin <olivier.courtin@camptocamp.com>
Mon, 22 Feb 2010 19:16:00 +0000 (19:16 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5294 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/Makefile.in
postgis/geography_inout.c
postgis/lwgeom_export.c
postgis/lwgeom_export.h [deleted file]
postgis/lwgeom_geojson.c [deleted file]
postgis/lwgeom_gml.c [deleted file]
postgis/lwgeom_kml.c [deleted file]
postgis/lwgeom_svg.c [deleted file]
postgis/postgis.sql.in.c

index 3a22bb514c06b8a9ddac8573f5a6aa9805f470b3..e9fa5c1c05fe3e0bf81804ba7f41a88ca16b3f5f 100644 (file)
@@ -41,10 +41,6 @@ PG_OBJS=lwgeom_pg.o \
        lwgeom_geos_prepared.o \
        lwgeom_geos_clean.o \
        lwgeom_export.o \
-       lwgeom_svg.o \
-       lwgeom_gml.o \
-       lwgeom_kml.o \
-       lwgeom_geojson.o \
        lwgeom_in_gml.o \
        lwgeom_in_kml.o \
        lwgeom_triggers.o \
index faa1a2fddca184e7bdc098c2283c440ac32a6292..4ae609c627ea6ec9e74cfc2571cc283a395c66bd 100644 (file)
@@ -28,7 +28,6 @@
 #include "libgeom.h"         /* For standard geometry types. */
 #include "lwgeom_pg.h"       /* For debugging macros. */
 #include "geography.h"      /* For utility functions. */
-#include "lwgeom_export.h"   /* For exports functions. */
 
 Datum geography_in(PG_FUNCTION_ARGS);
 Datum geography_out(PG_FUNCTION_ARGS);
index af35b3b6350c53627299a8594db3db09331a396d..1e3a8c84da4e9a51f8769fcea8aeebcf71e53111 100644 (file)
 #include "lwgeom_pg.h"
 #include "liblwgeom.h"
 
-#include "lwgeom_export.h"
+Datum LWGEOM_asGML(PG_FUNCTION_ARGS);
+Datum LWGEOM_asKML(PG_FUNCTION_ARGS);
+Datum LWGEOM_asGeoJson(PG_FUNCTION_ARGS);
+Datum LWGEOM_asSVG(PG_FUNCTION_ARGS);
+
 
 /*
  * Retrieve an SRS from a given SRID
@@ -84,3 +88,249 @@ char * getSRSbySRID(int SRID, bool short_crs)
 
        return srscopy;
 }
+
+
+/**
+ * Encode feature in GML
+ */
+PG_FUNCTION_INFO_V1(LWGEOM_asGML);
+Datum LWGEOM_asGML(PG_FUNCTION_ARGS)
+{
+       PG_LWGEOM *geom;
+       char *gml;
+       text *result;
+       int len;
+       int version;
+       char *srs;
+       int SRID;
+       int option = 0;
+       int is_deegree = 0;
+       int precision = OUT_MAX_DOUBLE_PRECISION;
+
+       /* Get the version */
+       version = PG_GETARG_INT32(0);
+       if ( version != 2 && version != 3 )
+       {
+               elog(ERROR, "Only GML 2 and GML 3 are supported");
+               PG_RETURN_NULL();
+       }
+
+       /* Get the geometry */
+       if ( PG_ARGISNULL(1) ) PG_RETURN_NULL();
+       geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
+
+       /* Retrieve precision if any (default is max) */
+       if (PG_NARGS() >2 && !PG_ARGISNULL(2))
+       {
+               precision = PG_GETARG_INT32(2);
+               if ( precision > OUT_MAX_DOUBLE_PRECISION )
+                       precision = OUT_MAX_DOUBLE_PRECISION;
+               else if ( precision < 0 ) precision = 0;
+       }
+
+       /* retrieve option */
+       if (PG_NARGS() >3 && !PG_ARGISNULL(3))
+               option = PG_GETARG_INT32(3);
+
+       SRID = lwgeom_getsrid(SERIALIZED_FORM(geom));
+       if (SRID == -1)      srs = NULL;
+       else if (option & 1) srs = getSRSbySRID(SRID, false);
+       else                 srs = getSRSbySRID(SRID, true);
+
+       if (option & 16) is_deegree = 1;
+
+       if (version == 2)
+               gml = lwgeom_to_gml2(SERIALIZED_FORM(geom), srs, precision);
+       else
+               gml = lwgeom_to_gml3(SERIALIZED_FORM(geom), srs, precision, is_deegree);
+
+       PG_FREE_IF_COPY(geom, 1);
+
+       len = strlen(gml) + VARHDRSZ;
+
+       result = palloc(len);
+       SET_VARSIZE(result, len);
+
+       memcpy(VARDATA(result), gml, len-VARHDRSZ);
+
+       lwfree(gml);
+
+       PG_RETURN_POINTER(result);
+}
+
+
+/**
+ * Encode feature in KML
+ */
+PG_FUNCTION_INFO_V1(LWGEOM_asKML);
+Datum LWGEOM_asKML(PG_FUNCTION_ARGS)
+{
+       PG_LWGEOM *geom;
+       char *kml;
+       text *result;
+       int len;
+       int version;
+       int precision = OUT_MAX_DOUBLE_PRECISION;
+
+
+       /* Get the version */
+       version = PG_GETARG_INT32(0);
+       if ( version != 2)
+       {
+               elog(ERROR, "Only KML 2 is supported");
+               PG_RETURN_NULL();
+       }
+
+       /* Get the geometry */
+       if ( PG_ARGISNULL(1) ) PG_RETURN_NULL();
+       geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
+
+       /* Retrieve precision if any (default is max) */
+       if (PG_NARGS() >2 && !PG_ARGISNULL(2))
+       {
+               precision = PG_GETARG_INT32(2);
+               if ( precision > OUT_MAX_DOUBLE_PRECISION )
+                       precision = OUT_MAX_DOUBLE_PRECISION;
+               else if ( precision < 0 ) precision = 0;
+       }
+
+       kml = lwgeom_to_kml2(SERIALIZED_FORM(geom), precision);
+
+       PG_FREE_IF_COPY(geom, 1);
+
+       len = strlen(kml) + VARHDRSZ;
+
+       result = palloc(len);
+       SET_VARSIZE(result, len);
+
+       memcpy(VARDATA(result), kml, len-VARHDRSZ);
+
+       lwfree(kml);
+
+       PG_RETURN_POINTER(result);
+}
+
+
+/**
+ * Encode Feature in GeoJson
+ */
+PG_FUNCTION_INFO_V1(LWGEOM_asGeoJson);
+Datum LWGEOM_asGeoJson(PG_FUNCTION_ARGS)
+{
+       PG_LWGEOM *geom;
+       char *geojson;
+       text *result;
+       int SRID;
+       int len;
+       int version;
+       int option = 0;
+       int has_bbox = 0;
+       int precision = OUT_MAX_DOUBLE_PRECISION;
+       char * srs = NULL;
+
+       /* Get the version */
+       version = PG_GETARG_INT32(0);
+       if ( version != 1)
+       {
+               elog(ERROR, "Only GeoJSON 1 is supported");
+               PG_RETURN_NULL();
+       }
+
+       /* Get the geometry */
+       if (PG_ARGISNULL(1) ) PG_RETURN_NULL();
+       geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
+
+       /* Retrieve precision if any (default is max) */
+       if (PG_NARGS() >2 && !PG_ARGISNULL(2))
+       {
+               precision = PG_GETARG_INT32(2);
+               if ( precision > OUT_MAX_DOUBLE_PRECISION )
+                       precision = OUT_MAX_DOUBLE_PRECISION;
+               else if ( precision < 0 ) precision = 0;
+       }
+
+       /* Retrieve output option
+        * 0 = without option (default)
+        * 1 = bbox
+        * 2 = short crs
+        * 4 = long crs
+        */
+       if (PG_NARGS() >3 && !PG_ARGISNULL(3))
+               option = PG_GETARG_INT32(3);
+
+       if (option & 2 || option & 4)
+       {
+               SRID = lwgeom_getsrid(SERIALIZED_FORM(geom));
+               if ( SRID != -1 )
+               {
+                       if (option & 2) srs = getSRSbySRID(SRID, true);
+                       if (option & 4) srs = getSRSbySRID(SRID, false);
+                       if (!srs)
+                       {
+                               elog(   ERROR, 
+                                       "SRID %i unknown in spatial_ref_sys table",
+                                       SRID);
+                               PG_RETURN_NULL();
+                       }
+               }
+       }
+
+       if (option & 1) has_bbox = 1;
+
+       geojson = lwgeom_to_geojson(SERIALIZED_FORM(geom), srs, precision, has_bbox);
+
+       PG_FREE_IF_COPY(geom, 1);
+       if (srs) pfree(srs);
+
+       len = strlen(geojson) + VARHDRSZ;
+       result = palloc(len);
+       SET_VARSIZE(result, len);
+       memcpy(VARDATA(result), geojson, len-VARHDRSZ);
+
+       lwfree(geojson);
+
+       PG_RETURN_POINTER(result);
+}
+
+
+/**
+ * SVG features
+ */
+PG_FUNCTION_INFO_V1(LWGEOM_asSVG);
+Datum LWGEOM_asSVG(PG_FUNCTION_ARGS)
+{
+       PG_LWGEOM *geom;
+       char *svg;
+       text *result;
+       int len;
+       int relative = 0;
+       int precision=OUT_MAX_DOUBLE_PRECISION;
+
+       if ( PG_ARGISNULL(0) ) PG_RETURN_NULL();
+
+       geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
+
+       /* check for relative path notation */
+       if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) )
+               relative = PG_GETARG_INT32(1) ? 1:0;
+
+       if ( PG_NARGS() > 2 && ! PG_ARGISNULL(2) )
+       {
+               precision = PG_GETARG_INT32(2);
+               if ( precision > OUT_MAX_DOUBLE_PRECISION )
+                       precision = OUT_MAX_DOUBLE_PRECISION;
+               else if ( precision < 0 ) precision = 0;
+       }
+
+       svg = lwgeom_to_svg(SERIALIZED_FORM(geom), precision, relative);
+       PG_FREE_IF_COPY(geom, 0);
+
+       len = strlen(svg) + VARHDRSZ;
+       result = palloc(len);
+       SET_VARSIZE(result, len);
+       memcpy(VARDATA(result), svg, len-VARHDRSZ);
+
+       lwfree(svg);
+
+       PG_RETURN_POINTER(result);
+}
diff --git a/postgis/lwgeom_export.h b/postgis/lwgeom_export.h
deleted file mode 100644 (file)
index c21a995..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/**********************************************************************
- * $Id:$
- *
- * PostGIS - Export functions for PostgreSQL/PostGIS
- * Copyright 2009 Olivier Courtin <olivier.courtin@oslandia.com>
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU General Public Licence. See the COPYING file.
- *
- **********************************************************************/
-
-/**
- * Commons define and prototype function for all export functions
- */
-
-char * getSRSbySRID(int SRID, bool short_crs);
diff --git a/postgis/lwgeom_geojson.c b/postgis/lwgeom_geojson.c
deleted file mode 100644 (file)
index 746d3e7..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/**********************************************************************
- * $Id$
- *
- * PostGIS - Spatial Types for PostgreSQL
- * http://postgis.refractions.net
- * Copyright 2001-2003 Refractions Research Inc.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of hte GNU General Public Licence. See the COPYING file.
- *
- **********************************************************************/
-/** @file
-* GeoJSON output routines.
-* Originally written by Olivier Courtin (Camptocamp)
-* 
-**********************************************************************/
-
-#include "postgres.h"
-
-#include "lwgeom_pg.h"
-#include "liblwgeom.h"
-#include "lwgeom_export.h"
-
-Datum LWGEOM_asGeoJson(PG_FUNCTION_ARGS);
-
-/**
- * Encode Feature in GeoJson
- */
-PG_FUNCTION_INFO_V1(LWGEOM_asGeoJson);
-Datum LWGEOM_asGeoJson(PG_FUNCTION_ARGS)
-{
-       PG_LWGEOM *geom;
-       char *geojson;
-       text *result;
-       int SRID;
-       int len;
-       int version;
-       int option = 0;
-       int has_bbox = 0;
-       int precision = OUT_MAX_DOUBLE_PRECISION;
-       char * srs = NULL;
-
-       /* Get the version */
-       version = PG_GETARG_INT32(0);
-       if ( version != 1)
-       {
-               elog(ERROR, "Only GeoJSON 1 is supported");
-               PG_RETURN_NULL();
-       }
-
-       /* Get the geometry */
-       if (PG_ARGISNULL(1) ) PG_RETURN_NULL();
-       geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
-
-       /* Retrieve precision if any (default is max) */
-       if (PG_NARGS() >2 && !PG_ARGISNULL(2))
-       {
-               precision = PG_GETARG_INT32(2);
-               if ( precision > OUT_MAX_DOUBLE_PRECISION )
-                       precision = OUT_MAX_DOUBLE_PRECISION;
-               else if ( precision < 0 ) precision = 0;
-       }
-
-       /* Retrieve output option
-        * 0 = without option (default)
-        * 1 = bbox
-        * 2 = short crs
-        * 4 = long crs
-        */
-       if (PG_NARGS() >3 && !PG_ARGISNULL(3))
-               option = PG_GETARG_INT32(3);
-
-       if (option & 2 || option & 4)
-       {
-               SRID = lwgeom_getsrid(SERIALIZED_FORM(geom));
-               if ( SRID != -1 )
-               {
-                       if (option & 2) srs = getSRSbySRID(SRID, true);
-                       if (option & 4) srs = getSRSbySRID(SRID, false);
-                       if (!srs)
-                       {
-                               elog(   ERROR, 
-                                       "SRID %i unknown in spatial_ref_sys table",
-                                       SRID);
-                               PG_RETURN_NULL();
-                       }
-               }
-       }
-
-       if (option & 1) has_bbox = 1;
-
-       geojson = lwgeom_to_geojson(SERIALIZED_FORM(geom), srs, precision, has_bbox);
-
-       PG_FREE_IF_COPY(geom, 1);
-       if (srs) pfree(srs);
-
-       len = strlen(geojson) + VARHDRSZ;
-       result = palloc(len);
-       SET_VARSIZE(result, len);
-       memcpy(VARDATA(result), geojson, len-VARHDRSZ);
-
-       lwfree(geojson);
-
-       PG_RETURN_POINTER(result);
-}
diff --git a/postgis/lwgeom_gml.c b/postgis/lwgeom_gml.c
deleted file mode 100644 (file)
index 35f6b2f..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/**********************************************************************
- * $Id$
- *
- * PostGIS - Spatial Types for PostgreSQL
- * http://postgis.refractions.net
- * Copyright 2001-2003 Refractions Research Inc.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of hte GNU General Public Licence. See the COPYING file.
- *
- **********************************************************************/
-
-/**
-* @file GML output routines.
-*
-**********************************************************************/
-
-
-#include "postgres.h"
-
-#include "lwgeom_pg.h"
-#include "liblwgeom.h"
-#include "lwgeom_export.h"
-
-
-Datum LWGEOM_asGML(PG_FUNCTION_ARGS);
-
-/**
- * Encode feature in GML
- */
-PG_FUNCTION_INFO_V1(LWGEOM_asGML);
-Datum LWGEOM_asGML(PG_FUNCTION_ARGS)
-{
-       PG_LWGEOM *geom;
-       char *gml;
-       text *result;
-       int len;
-       int version;
-       char *srs;
-       int SRID;
-       int option = 0;
-       int is_deegree = 0;
-       int precision = OUT_MAX_DOUBLE_PRECISION;
-
-       /* Get the version */
-       version = PG_GETARG_INT32(0);
-       if ( version != 2 && version != 3 )
-       {
-               elog(ERROR, "Only GML 2 and GML 3 are supported");
-               PG_RETURN_NULL();
-       }
-
-       /* Get the geometry */
-       if ( PG_ARGISNULL(1) ) PG_RETURN_NULL();
-       geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
-
-       /* Retrieve precision if any (default is max) */
-       if (PG_NARGS() >2 && !PG_ARGISNULL(2))
-       {
-               precision = PG_GETARG_INT32(2);
-               if ( precision > OUT_MAX_DOUBLE_PRECISION )
-                       precision = OUT_MAX_DOUBLE_PRECISION;
-               else if ( precision < 0 ) precision = 0;
-       }
-
-       /* retrieve option */
-       if (PG_NARGS() >3 && !PG_ARGISNULL(3))
-               option = PG_GETARG_INT32(3);
-
-       SRID = lwgeom_getsrid(SERIALIZED_FORM(geom));
-       if (SRID == -1)      srs = NULL;
-       else if (option & 1) srs = getSRSbySRID(SRID, false);
-       else                 srs = getSRSbySRID(SRID, true);
-
-       if (option & 16) is_deegree = 1;
-
-       if (version == 2)
-               gml = lwgeom_to_gml2(SERIALIZED_FORM(geom), srs, precision);
-       else
-               gml = lwgeom_to_gml3(SERIALIZED_FORM(geom), srs, precision, is_deegree);
-
-       PG_FREE_IF_COPY(geom, 1);
-
-       len = strlen(gml) + VARHDRSZ;
-
-       result = palloc(len);
-       SET_VARSIZE(result, len);
-
-       memcpy(VARDATA(result), gml, len-VARHDRSZ);
-
-       lwfree(gml);
-
-       PG_RETURN_POINTER(result);
-}
diff --git a/postgis/lwgeom_kml.c b/postgis/lwgeom_kml.c
deleted file mode 100644 (file)
index 774b1bb..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/**********************************************************************
- * $Id$
- *
- * PostGIS - Spatial Types for PostgreSQL
- * http://postgis.refractions.net
- * Copyright 2001-2003 Refractions Research Inc.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of hte GNU General Public Licence. See the COPYING file.
- *
- **********************************************************************/
-
-/**
-* @file
-* KML output routines based on lwgeom_gml.c
-* Written by: Eduin Carrillo <yecarrillo@cas.gov.co>
-*             © 2006 Corporacion Autonoma Regional de Santander - CAS
-*
-**********************************************************************/
-
-
-#include "postgres.h"
-#include "executor/spi.h"
-
-#include "lwgeom_pg.h"
-#include "liblwgeom.h"
-#include "lwgeom_export.h"
-
-Datum LWGEOM_asKML(PG_FUNCTION_ARGS);
-
-/**
- * Encode feature in KML
- */
-PG_FUNCTION_INFO_V1(LWGEOM_asKML);
-Datum LWGEOM_asKML(PG_FUNCTION_ARGS)
-{
-       PG_LWGEOM *geom;
-       char *kml;
-       text *result;
-       int len;
-       int version;
-       int precision = OUT_MAX_DOUBLE_PRECISION;
-
-
-       /* Get the version */
-       version = PG_GETARG_INT32(0);
-       if ( version != 2)
-       {
-               elog(ERROR, "Only KML 2 is supported");
-               PG_RETURN_NULL();
-       }
-
-       /* Get the geometry */
-       if ( PG_ARGISNULL(1) ) PG_RETURN_NULL();
-       geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
-
-       /* Retrieve precision if any (default is max) */
-       if (PG_NARGS() >2 && !PG_ARGISNULL(2))
-       {
-               precision = PG_GETARG_INT32(2);
-               if ( precision > OUT_MAX_DOUBLE_PRECISION )
-                       precision = OUT_MAX_DOUBLE_PRECISION;
-               else if ( precision < 0 ) precision = 0;
-       }
-
-       kml = lwgeom_to_kml2(SERIALIZED_FORM(geom), precision);
-
-       PG_FREE_IF_COPY(geom, 1);
-
-       len = strlen(kml) + VARHDRSZ;
-
-       result = palloc(len);
-       SET_VARSIZE(result, len);
-
-       memcpy(VARDATA(result), kml, len-VARHDRSZ);
-
-       lwfree(kml);
-
-       PG_RETURN_POINTER(result);
-}
diff --git a/postgis/lwgeom_svg.c b/postgis/lwgeom_svg.c
deleted file mode 100644 (file)
index f10c607..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/**********************************************************************
- * $Id$
- *
- * PostGIS - Spatial Types for PostgreSQL
- * http://postgis.refractions.net
- * Copyright 2001-2003 Refractions Research Inc.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of hte GNU General Public Licence. See the COPYING file.
- *
- **********************************************************************/
-
-/** @file
-*
-* SVG output routines.
-* Originally written by: Klaus Förster <klaus@svg.cc>
-* Refactored by: Olivier Courtin (Camptocamp)
-*
-* BNF SVG Path: <http://www.w3.org/TR/SVG/paths.html#PathDataBNF>
-**********************************************************************/
-
-
-#include "postgres.h"
-#include "liblwgeom.h"
-#include "lwgeom_pg.h"
-#include "lwgeom_export.h"
-
-Datum assvg_geometry(PG_FUNCTION_ARGS);
-
-/**
- * SVG features
- */
-PG_FUNCTION_INFO_V1(assvg_geometry);
-Datum assvg_geometry(PG_FUNCTION_ARGS)
-{
-       PG_LWGEOM *geom;
-       char *svg;
-       text *result;
-       int len;
-       int relative = 0;
-       int precision=OUT_MAX_DOUBLE_PRECISION;
-
-       if ( PG_ARGISNULL(0) ) PG_RETURN_NULL();
-
-       geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
-
-       /* check for relative path notation */
-       if ( PG_NARGS() > 1 && ! PG_ARGISNULL(1) )
-               relative = PG_GETARG_INT32(1) ? 1:0;
-
-       if ( PG_NARGS() > 2 && ! PG_ARGISNULL(2) )
-       {
-               precision = PG_GETARG_INT32(2);
-               if ( precision > OUT_MAX_DOUBLE_PRECISION )
-                       precision = OUT_MAX_DOUBLE_PRECISION;
-               else if ( precision < 0 ) precision = 0;
-       }
-
-       svg = lwgeom_to_svg(SERIALIZED_FORM(geom), precision, relative);
-       PG_FREE_IF_COPY(geom, 0);
-
-       len = strlen(svg) + VARHDRSZ;
-       result = palloc(len);
-       SET_VARSIZE(result, len);
-       memcpy(VARDATA(result), svg, len-VARHDRSZ);
-
-       lwfree(svg);
-
-       PG_RETURN_POINTER(result);
-}
index 00506d8949081aa3fef93099b54f31c33d769643..69a07840535bb2f22c31945ca55864d533693243 100644 (file)
@@ -4625,37 +4625,37 @@ CREATE OR REPLACE FUNCTION ST_GeomFromKML(text)
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsSVG(geometry,int4,int4)
        RETURNS TEXT
-       AS 'MODULE_PATHNAME','assvg_geometry'
+       AS 'MODULE_PATHNAME','LWGEOM_asSVG'
        LANGUAGE 'C' IMMUTABLE STRICT;
 
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_AsSVG(geometry,int4,int4)
        RETURNS TEXT
-       AS 'MODULE_PATHNAME','assvg_geometry'
+       AS 'MODULE_PATHNAME','LWGEOM_asSVG'
        LANGUAGE 'C' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsSVG(geometry,int4)
        RETURNS TEXT
-       AS 'MODULE_PATHNAME','assvg_geometry'
+       AS 'MODULE_PATHNAME','LWGEOM_asSVG'
        LANGUAGE 'C' IMMUTABLE STRICT;
 
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_AsSVG(geometry,int4)
        RETURNS TEXT
-       AS 'MODULE_PATHNAME','assvg_geometry'
+       AS 'MODULE_PATHNAME','LWGEOM_asSVG'
        LANGUAGE 'C' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsSVG(geometry)
        RETURNS TEXT
-       AS 'MODULE_PATHNAME','assvg_geometry'
+       AS 'MODULE_PATHNAME','LWGEOM_asSVG'
        LANGUAGE 'C' IMMUTABLE STRICT;
 
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_AsSVG(geometry)
        RETURNS TEXT
-       AS 'MODULE_PATHNAME','assvg_geometry'
+       AS 'MODULE_PATHNAME','LWGEOM_asSVG'
        LANGUAGE 'C' IMMUTABLE STRICT;
 
 -----------------------------------------------------------------------