Changeset: e49a8a7e18cf for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e49a8a7e18cf
Modified Files:
        sql/backends/monet5/sql_upgrades.c
        sql/storage/bat/Makefile.ag
        sql/storage/bat/bat_logger.c
        sql/storage/store.c
Branch: geo
Log Message:

Added the upgrade code for the geom module


diffs (truncated from 4333 to 300 lines):

diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -1615,7 +1615,6 @@ sql_update_jul2015(Client c)
        return err;             /* usually MAL_SUCCEED */
 }
 
-#if 0
 static str
 sql_update_dec2015(Client c)
 {
@@ -1639,7 +1638,4150 @@ sql_update_dec2015(Client c)
                "create procedure profiler.setpoolsize(poolsize int) external 
name profiler.setpoolsize;"
                "create procedure profiler.setstream(host string, port int) 
external name profiler.setstream;");
 
-                       if (schema) {
+       /* drop the previous geometry types */
+       /* drop old types */
+       /** Keep only the geometry type **/
+       /** pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE Geometry;"); 
**/
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE Point;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE Curve;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE LineString;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE Surface;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE Polygon;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE MultiPoint;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE MultiCurve;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE MultiLineString;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE MultiSurface;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE MultiPolygon;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP TYPE GeomCollection;");
+
+       /* drop old functions */
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION mbr;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION mbroverlaps;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
GeomFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
PointFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
LineFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
PolyFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
MPointFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
MLineFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
MPolyFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
GeomCollectionFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
PolygonFromText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION AsText;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION X;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Y;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Point;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Dimension;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
GeometryTypeId;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION SRID;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Envelope;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION IsEmpty;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION IsSimple;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Boundary;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Equals;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Disjoint;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
\"Intersect\";");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Touches;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Crosses;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Within;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Contains;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Contains;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Overlaps;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Relate;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Area;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Length;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Distance;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Buffer;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION ConvexHull;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
Intersection;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION \"Union\";");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION Difference;");
+       pos += snprintf(buf + pos, bufsize - pos, "DROP FUNCTION 
SymDifference;");
+
+       /* create the new geometry types */
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION Has_Z(info 
integer) RETURNS integer EXTERNAL NAME geom.\"hasZ\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION Has_M(info 
integer) RETURNS integer EXTERNAL NAME geom.\"hasM\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
get_type(info integer, format integer) RETURNS string EXTERNAL NAME 
geom.\"getType\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE TABLE spatial_ref_sys 
(srid INTEGER NOT NULL PRIMARY KEY, auth_name VARCHAR (256), auth_srid INTEGER, 
srtext VARCHAR (2048), proj4text VARCHAR (2048));");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE VIEW geometry_columns 
AS");
+       pos += snprintf(buf + pos, bufsize - pos, "     SELECT e.value AS 
f_table_catalog, s.name AS f_table_schema, y.f_table_name, y.f_geometry_column, 
y.coord_dimension, y.srid, y.type");
+       pos += snprintf(buf + pos, bufsize - pos, "     FROM schemas s, 
environment e, (");
+       pos += snprintf(buf + pos, bufsize - pos, "             SELECT 
t.schema_id,");
+       pos += snprintf(buf + pos, bufsize - pos, "                     t.name 
AS f_table_name,");
+       pos += snprintf(buf + pos, bufsize - pos, "                     x.name 
AS f_geometry_column,");
+       pos += snprintf(buf + pos, bufsize - pos, "                     
has_z(info)+has_m(info)+2 AS coord_dimension,");
+       pos += snprintf(buf + pos, bufsize - pos, "                     srid, 
get_type(info, 0) AS type");
+       pos += snprintf(buf + pos, bufsize - pos, "             FROM tables t, 
(");
+       pos += snprintf(buf + pos, bufsize - pos, "                     SELECT 
name, table_id, type_digits AS info, type_scale AS srid");
+       pos += snprintf(buf + pos, bufsize - pos, "                     FROM 
columns");
+       pos += snprintf(buf + pos, bufsize - pos, "                     WHERE 
type IN ( SELECT DISTINCT sqlname FROM types WHERE systemname='wkb')");
+       pos += snprintf(buf + pos, bufsize - pos, "                     ) AS 
x");
+       pos += snprintf(buf + pos, bufsize - pos, "             WHERE 
t.id=x.table_id");
+       pos += snprintf(buf + pos, bufsize - pos, "             ) y");
+       pos += snprintf(buf + pos, bufsize - pos, "     WHERE y.schema_id=s.id 
AND e.name='gdk_dbname';");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION mbr(geom 
Geometry) RETURNS mbr external name geom.\"mbr\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Overlaps(box1 mbr, box2 mbr) RETURNS boolean EXTERNAL NAME 
geom.\"mbrOverlaps\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Contains(box1 mbr, box2 mbr) RETURNS boolean EXTERNAL NAME 
geom.\"mbrContains\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Equals(box1 mbr, box2 mbr) RETURNS boolean EXTERNAL NAME 
geom.\"mbrEqual\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Distance(box1 mbr, box2 mbr) RETURNS double EXTERNAL NAME 
geom.\"mbrDistance\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_WKTToSQL(wkt string) RETURNS Geometry external name geom.\"GeomFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_WKBToSQL(geom string) RETURNS Geometry EXTERNAL NAME geom.\"FromBinary\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_AsText(geom Geometry) RETURNS string EXTERNAL NAME geom.\"AsText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_AsBinary(geom Geometry) RETURNS string EXTERNAL NAME geom.\"AsBinary\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Dimension(geom Geometry) RETURNS integer EXTERNAL NAME geom.\"Dimension\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_GeometryType(geom Geometry) RETURNS string EXTERNAL NAME 
geom.\"GeometryType2\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_SRID(geom 
Geometry) RETURNS integer EXTERNAL NAME geom.\"getSRID\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_SetSRID(geom Geometry, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"setSRID\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_IsEmpty(geom Geometry) RETURNS boolean EXTERNAL NAME geom.\"IsEmpty\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_IsSimple(geom Geometry) RETURNS boolean EXTERNAL NAME geom.\"IsSimple\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Boundary(geom Geometry) RETURNS Geometry EXTERNAL NAME geom.\"Boundary\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Envelope(geom Geometry) RETURNS Geometry EXTERNAL NAME geom.\"Envelope\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Equals(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Equals\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Disjoint(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Disjoint\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Intersects(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Intersects\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Touches(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Touches\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Crosses(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Crosses\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Within(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Within\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Contains(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Contains\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Overlaps(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Overlaps\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Relate(geom1 Geometry, geom2 Geometry, intersection_matrix_pattern string) 
RETURNS boolean EXTERNAL NAME geom.\"Relate\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Distance(geom1 Geometry, geom2 Geometry) RETURNS double EXTERNAL NAME 
geom.\"Distance\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Intersection(geom1 Geometry, geom2 Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"Intersection\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Difference(geom1 Geometry, geom2 Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"Difference\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Union(geom1 Geometry, geom2 Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"Union\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE AGGREGATE 
ST_Union(geom Geometry) RETURNS Geometry external name geom.\"Union\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_SymDifference(geom1 Geometry, geom2 Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"SymDifference\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Buffer(geom Geometry, radius double) RETURNS Geometry EXTERNAL NAME 
geom.\"Buffer\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_ConvexHull(geom Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"ConvexHull\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_X(geom 
Geometry) RETURNS double EXTERNAL NAME geom.\"X\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_Y(geom 
Geometry) RETURNS double EXTERNAL NAME geom.\"Y\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_Z(geom 
Geometry) RETURNS double EXTERNAL NAME geom.\"Z\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_StartPoint(geom Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"StartPoint\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_EndPoint(geom Geometry) RETURNS Geometry EXTERNAL NAME geom.\"EndPoint\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_IsRing(geom Geometry) RETURNS boolean EXTERNAL NAME geom.\"IsRing\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Length(geom Geometry) RETURNS double EXTERNAL NAME geom.\"Length\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_IsClosed(geom Geometry) RETURNS boolean EXTERNAL NAME geom.\"IsClosed\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_NumPoints(geom Geometry) RETURNS integer EXTERNAL NAME geom.\"NumPoints\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_PointN(geom Geometry, positionNum integer) RETURNS Geometry EXTERNAL NAME 
geom.\"PointN\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Centroid(geom Geometry) RETURNS Geometry EXTERNAL NAME geom.\"Centroid\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_PointOnSurface(geom Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"PointOnSurface\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_Area(geom 
Geometry) RETURNS double EXTERNAL NAME geom.\"Area\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_ExteriorRing(geom Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"ExteriorRing\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_SetExteriorRing(geom Geometry) RETURNS Geometry external name 
geom.\"MakePolygon\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_NumInteriorRing(geom Geometry) RETURNS integer EXTERNAL NAME 
geom.\"NumInteriorRings\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_InteriorRingN(geom Geometry, positionNum integer) RETURNS Geometry EXTERNAL 
NAME geom.\"InteriorRingN\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_InteriorRings(geom Geometry) RETURNS GeometryA EXTERNAL NAME 
geom.\"InteriorRings\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_NumGeometries(geom Geometry) RETURNS integer EXTERNAL NAME 
geom.\"NumGeometries\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_GeometryN(geom Geometry, positionNum integer) RETURNS Geometry EXTERNAL NAME 
geom.\"GeometryN\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_NumPatches(geom Geometry) RETURNS integer");
+       pos += snprintf(buf + pos, bufsize - pos, "BEGIN");
+       pos += snprintf(buf + pos, bufsize - pos, "     RETURN SELECT 
ST_NumGeometries(geom);");
+       pos += snprintf(buf + pos, bufsize - pos, "END;");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_PatchN(geom Geometry, patchNum integer) RETURNS Geometry");
+       pos += snprintf(buf + pos, bufsize - pos, "BEGIN");
+       pos += snprintf(buf + pos, bufsize - pos, "     RETURN SELECT 
ST_GeometryN(geom, patchNum);");
+       pos += snprintf(buf + pos, bufsize - pos, "END; ");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_GeomFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"GeomFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_PointFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"PointFromText\"; ");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_LineFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"LineFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_PolygonFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"PolygonFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MPointFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"MPointFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MLineFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"MLineFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MPolyFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"MPolyFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_GeomCollFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"GeomCollFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_BdPolyFromText(wkt string, srid integer) RETURNS Geometry external name 
geom.\"BdPolyFromText\"; ");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_BdMPolyFromText(wkt string, srid integer) RETURNS Geometry external name 
geom.\"BdMPolyFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_GeometryFromText(wkt string, srid integer) RETURNS Geometry EXTERNAL NAME 
geom.\"GeomFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_GeomFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"GeomFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_GeometryFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"GeomFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_PointFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"PointFromText\"; ");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_LineFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"LineFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_PolygonFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"PolygonFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MPointFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"MPointFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MLineFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"MLineFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MPolyFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"MPolyFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_GeomCollFromText(wkt string) RETURNS Geometry EXTERNAL NAME 
geom.\"GeomCollFromText\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakePoint(x double, y double) RETURNS Geometry EXTERNAL NAME 
geom.\"MakePoint\"; ");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_Point(x 
double, y double) RETURNS Geometry EXTERNAL NAME geom.\"MakePoint\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakePoint(x double, y double, z double) RETURNS Geometry EXTERNAL NAME 
geom.\"MakePoint\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakePoint(x double, y double, z double, m double) RETURNS Geometry EXTERNAL 
NAME geom.\"MakePoint\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakePointM(x double, y double, m double) RETURNS Geometry EXTERNAL NAME 
geom.\"MakePointM\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE AGGREGATE 
ST_MakeLine(geom Geometry) RETURNS Geometry external name geom.\"MakeLine\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakeLine(geom1 Geometry, geom2 Geometry) RETURNS Geometry external name 
geom.\"MakeLine\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakeEnvelope(xmin double, ymin double, xmax double, ymax double, srid 
integer) RETURNS Geometry external name geom.\"MakeEnvelope\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakeEnvelope(xmin double, ymin double, xmax double, ymax double) RETURNS 
Geometry external name geom.\"MakeEnvelope\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakePolygon(geom Geometry) RETURNS Geometry external name 
geom.\"MakePolygon\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Polygon(geom Geometry, srid integer) RETURNS Geometry external name 
geom.\"MakePolygon\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_MakeBox2D(lowLeftPointGeom Geometry, upRightPointGeom Geometry) RETURNS mbr 
external name geom.\"MakeBox2D\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
GeometryType(geom Geometry) RETURNS string EXTERNAL NAME 
geom.\"GeometryType1\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_CoordDim(geom Geometry) RETURNS integer EXTERNAL NAME geom.\"CoordDim\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_IsValid(geom Geometry) RETURNS boolean EXTERNAL NAME geom.\"IsValid\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_IsValidReason(geom Geometry) RETURNS string EXTERNAL NAME 
geom.\"IsValidReason\"; ");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_NPoints(geom Geometry) RETURNS integer EXTERNAL NAME geom.\"NPoints\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_NRings(geom Geometry) RETURNS integer EXTERNAL NAME geom.\"NRings\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_NumInteriorRings(geom Geometry) RETURNS integer EXTERNAL NAME 
geom.\"NumInteriorRings\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_XMax(geom 
Geometry) RETURNS double EXTERNAL NAME geom.\"XMaxFromWKB\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_XMax(box 
mbr) RETURNS double EXTERNAL NAME geom.\"XMaxFromMBR\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_XMin(geom 
Geometry) RETURNS double EXTERNAL NAME geom.\"XMinFromWKB\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_XMin(box 
mbr) RETURNS double EXTERNAL NAME geom.\"XMinFromMBR\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_YMax(geom 
Geometry) RETURNS double EXTERNAL NAME geom.\"YMaxFromWKB\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_YMax(box 
mbr) RETURNS double EXTERNAL NAME geom.\"YMaxFromMBR\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_YMin(geom 
Geometry) RETURNS double EXTERNAL NAME geom.\"YMinFromWKB\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_YMin(box 
mbr) RETURNS double EXTERNAL NAME geom.\"YMinFromMBR\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Force2D(geom Geometry) RETURNS Geometry EXTERNAL NAME geom.\"Force2D\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Force3D(geom Geometry) RETURNS Geometry EXTERNAL NAME geom.\"Force3D\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Segmentize(geom Geometry, sz double) RETURNS Geometry EXTERNAL NAME 
geom.\"Segmentize\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
getProj4(srid_in integer) RETURNS string ");
+       pos += snprintf(buf + pos, bufsize - pos, "BEGIN");
+       pos += snprintf(buf + pos, bufsize - pos, "     RETURN SELECT proj4text 
FROM spatial_ref_sys WHERE srid=srid_in; ");
+       pos += snprintf(buf + pos, bufsize - pos, "END;");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
InternalTransform(geom Geometry, srid_src integer, srid_dest integer, proj4_src 
string, proj4_dest string) RETURNS Geometry EXTERNAL NAME geom.\"Transform\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Transform(geom Geometry, srid integer) RETURNS Geometry");
+       pos += snprintf(buf + pos, bufsize - pos, "BEGIN");
+       pos += snprintf(buf + pos, bufsize - pos, "     DECLARE srid_src 
integer;");
+       pos += snprintf(buf + pos, bufsize - pos, "     DECLARE proj4_src 
string;");
+       pos += snprintf(buf + pos, bufsize - pos, "     DECLARE proj4_dest 
string;");
+       pos += snprintf(buf + pos, bufsize - pos, "     SELECT st_srid(geom) 
INTO srid_src;");
+       pos += snprintf(buf + pos, bufsize - pos, "     SELECT 
getProj4(srid_src) INTO proj4_src;");
+       pos += snprintf(buf + pos, bufsize - pos, "     SELECT getProj4(srid) 
INTO proj4_dest;");
+       pos += snprintf(buf + pos, bufsize - pos, "     IF proj4_src IS NULL 
THEN");
+       pos += snprintf(buf + pos, bufsize - pos, "             RETURN SELECT 
InternalTransform(geom, srid_src, srid, 'null', proj4_dest); ");
+       pos += snprintf(buf + pos, bufsize - pos, "     ELSE");
+       pos += snprintf(buf + pos, bufsize - pos, "             IF proj4_dest 
IS NULL THEN");
+       pos += snprintf(buf + pos, bufsize - pos, "                     RETURN 
SELECT InternalTransform(geom, srid_src, srid, proj4_src, 'null'); ");
+       pos += snprintf(buf + pos, bufsize - pos, "             ELSE");
+       pos += snprintf(buf + pos, bufsize - pos, "                     RETURN 
SELECT InternalTransform(geom, srid_src, srid, proj4_src, proj4_dest);");
+       pos += snprintf(buf + pos, bufsize - pos, "             END IF; ");
+       pos += snprintf(buf + pos, bufsize - pos, "     END IF;");
+       pos += snprintf(buf + pos, bufsize - pos, "END;");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Translate(geom Geometry, dx double, dy double) RETURNS Geometry EXTERNAL 
NAME geom.\"Translate\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Translate(geom Geometry, dx double, dy double, dz double) RETURNS Geometry 
EXTERNAL NAME geom.\"Translate\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_AsEWKT(geom Geometry) RETURNS string EXTERNAL NAME geom.\"AsEWKT\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Covers(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"Covers\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_CoveredBy(geom1 Geometry, geom2 Geometry) RETURNS boolean EXTERNAL NAME 
geom.\"CoveredBy\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_DWithin(geom1 Geometry, geom2 Geometry, dst double) RETURNS boolean EXTERNAL 
NAME geom.\"DWithin\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Length2D(geom Geometry) RETURNS double EXTERNAL NAME geom.\"Length\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_Collect(geom1 Geometry, geom2 Geometry) RETURNS Geometry EXTERNAL NAME 
geom.\"Union\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE AGGREGATE 
ST_Collect(geom Geometry) RETURNS Geometry external name geom.\"Union\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_DelaunayTriangles(geom Geometry, tolerance double, flags integer) RETURNS 
Geometry EXTERNAL NAME geom.\"DelaunayTriangles\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION ST_Dump(geom 
Geometry) RETURNS TABLE(id string, polygonWKB Geometry) EXTERNAL NAME 
geom.\"Dump\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION 
ST_DumpPoints(geom Geometry) RETURNS TABLE(path string, pointG Geometry) 
EXTERNAL NAME geom.\"DumpPoints\";");
+       pos += snprintf(buf + pos, bufsize - pos, "CREATE FUNCTION Contains(a 
Geometry, x double, y double) RETURNS BOOLEAN external name 
geom.\"Contains\";");
+
+       /* populate the spatial_ref_sys table */
+       pos += snprintf(buf + pos, bufsize - pos, "COPY 3911 RECORDS INTO 
spatial_ref_sys FROM STDIN USING DELIMITERS ',';");
+       pos += snprintf(buf + pos, bufsize - pos, 
"3819,EPSG,3819,GEOGCS[\"HD1909\"\\,DATUM[\"Hungarian_Datum_1909\"\\,SPHEROID[\"Bessel
 
1841\"\\,6377397.155\\,299.1528128\\,AUTHORITY[\"EPSG\"\\,\"7004\"]]\\,TOWGS84[595.48\\,121.69\\,515.35\\,4.115\\,-2.9383\\,0.853\\,-3.408]\\,AUTHORITY[\"EPSG\"\\,\"1024\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"3819\"]],+proj=longlat
 +ellps=bessel 
+towgs84=595.48\\,121.69\\,515.35\\,4.115\\,-2.9383\\,0.853\\,-3.408 +no_defs 
");
+       pos += snprintf(buf + pos, bufsize - pos, 
"3821,EPSG,3821,GEOGCS[\"TWD67\"\\,DATUM[\"Taiwan_Datum_1967\"\\,SPHEROID[\"GRS 
1967 
Modified\"\\,6378160\\,298.25\\,AUTHORITY[\"EPSG\"\\,\"7050\"]]\\,AUTHORITY[\"EPSG\"\\,\"1025\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"3821\"]],+proj=longlat
 +ellps=aust_SA +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"3824,EPSG,3824,GEOGCS[\"TWD97\"\\,DATUM[\"Taiwan_Datum_1997\"\\,SPHEROID[\"GRS 
1980\"\\,6378137\\,298.257222101\\,AUTHORITY[\"EPSG\"\\,\"7019\"]]\\,TOWGS84[0\\,0\\,0\\,0\\,0\\,0\\,0]\\,AUTHORITY[\"EPSG\"\\,\"1026\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"3824\"]],+proj=longlat
 +ellps=GRS80 +towgs84=0\\,0\\,0\\,0\\,0\\,0\\,0 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"3889,EPSG,3889,GEOGCS[\"IGRS\"\\,DATUM[\"Iraqi_Geospatial_Reference_System\"\\,SPHEROID[\"GRS
 
1980\"\\,6378137\\,298.257222101\\,AUTHORITY[\"EPSG\"\\,\"7019\"]]\\,TOWGS84[0\\,0\\,0\\,0\\,0\\,0\\,0]\\,AUTHORITY[\"EPSG\"\\,\"1029\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"3889\"]],+proj=longlat
 +ellps=GRS80 +towgs84=0\\,0\\,0\\,0\\,0\\,0\\,0 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, "3906,EPSG,3906,GEOGCS[\"MGI 
1901\"\\,DATUM[\"MGI_1901\"\\,SPHEROID[\"Bessel 
1841\"\\,6377397.155\\,299.1528128\\,AUTHORITY[\"EPSG\"\\,\"7004\"]]\\,TOWGS84[682\\,-203\\,480\\,0\\,0\\,0\\,0]\\,AUTHORITY[\"EPSG\"\\,\"1031\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"3906\"]],+proj=longlat
 +ellps=bessel +towgs84=682\\,-203\\,480\\,0\\,0\\,0\\,0 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4001,EPSG,4001,GEOGCS[\"Unknown datum based upon the Airy 1830 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Airy_1830_ellipsoid\"\\,SPHEROID[\"Airy
 
1830\"\\,6377563.396\\,299.3249646\\,AUTHORITY[\"EPSG\"\\,\"7001\"]]\\,AUTHORITY[\"EPSG\"\\,\"6001\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4001\"]],+proj=longlat
 +ellps=airy +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4002,EPSG,4002,GEOGCS[\"Unknown datum based upon the Airy Modified 1849 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Airy_Modified_1849_ellipsoid\"\\,SPHEROID[\"Airy
 Modified 
1849\"\\,6377340.189\\,299.3249646\\,AUTHORITY[\"EPSG\"\\,\"7002\"]]\\,AUTHORITY[\"EPSG\"\\,\"6002\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4002\"]],+proj=longlat
 +ellps=mod_airy +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4003,EPSG,4003,GEOGCS[\"Unknown datum based upon the Australian National 
Spheroid\"\\,DATUM[\"Not_specified_based_on_Australian_National_Spheroid\"\\,SPHEROID[\"Australian
 National 
Spheroid\"\\,6378160\\,298.25\\,AUTHORITY[\"EPSG\"\\,\"7003\"]]\\,AUTHORITY[\"EPSG\"\\,\"6003\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4003\"]],+proj=longlat
 +ellps=aust_SA +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4004,EPSG,4004,GEOGCS[\"Unknown datum based upon the Bessel 1841 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Bessel_1841_ellipsoid\"\\,SPHEROID[\"Bessel
 
1841\"\\,6377397.155\\,299.1528128\\,AUTHORITY[\"EPSG\"\\,\"7004\"]]\\,AUTHORITY[\"EPSG\"\\,\"6004\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4004\"]],+proj=longlat
 +ellps=bessel +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4005,EPSG,4005,GEOGCS[\"Unknown datum based upon the Bessel Modified 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Bessel_Modified_ellipsoid\"\\,SPHEROID[\"Bessel
 
Modified\"\\,6377492.018\\,299.1528128\\,AUTHORITY[\"EPSG\"\\,\"7005\"]]\\,AUTHORITY[\"EPSG\"\\,\"6005\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4005\"]],+proj=longlat
 +a=6377492.018 +b=6356173.508712696 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4006,EPSG,4006,GEOGCS[\"Unknown datum based upon the Bessel Namibia 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Bessel_Namibia_ellipsoid\"\\,SPHEROID[\"Bessel
 Namibia 
(GLM)\"\\,6377483.865280419\\,299.1528128\\,AUTHORITY[\"EPSG\"\\,\"7046\"]]\\,AUTHORITY[\"EPSG\"\\,\"6006\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4006\"]],+proj=longlat
 +ellps=bess_nam +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4007,EPSG,4007,GEOGCS[\"Unknown datum based upon the Clarke 1858 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1858_ellipsoid\"\\,SPHEROID[\"Clarke
 
1858\"\\,6378293.645208759\\,294.2606763692569\\,AUTHORITY[\"EPSG\"\\,\"7007\"]]\\,AUTHORITY[\"EPSG\"\\,\"6007\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4007\"]],+proj=longlat
 +a=6378293.645208759 +b=6356617.987679838 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4008,EPSG,4008,GEOGCS[\"Unknown datum based upon the Clarke 1866 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1866_ellipsoid\"\\,SPHEROID[\"Clarke
 
1866\"\\,6378206.4\\,294.9786982139006\\,AUTHORITY[\"EPSG\"\\,\"7008\"]]\\,AUTHORITY[\"EPSG\"\\,\"6008\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4008\"]],+proj=longlat
 +ellps=clrk66 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4009,EPSG,4009,GEOGCS[\"Unknown datum based upon the Clarke 1866 Michigan 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1866_Michigan_ellipsoid\"\\,SPHEROID[\"Clarke
 1866 
Michigan\"\\,6378450.047548896\\,294.9786971646739\\,AUTHORITY[\"EPSG\"\\,\"7009\"]]\\,AUTHORITY[\"EPSG\"\\,\"6009\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4009\"]],+proj=longlat
 +a=6378450.047548896 +b=6356826.621488444 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4010,EPSG,4010,GEOGCS[\"Unknown datum based upon the Clarke 1880 (Benoit) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1880_Benoit_ellipsoid\"\\,SPHEROID[\"Clarke
 1880 
(Benoit)\"\\,6378300.789\\,293.4663155389802\\,AUTHORITY[\"EPSG\"\\,\"7010\"]]\\,AUTHORITY[\"EPSG\"\\,\"6010\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4010\"]],+proj=longlat
 +a=6378300.789 +b=6356566.435 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4011,EPSG,4011,GEOGCS[\"Unknown datum based upon the Clarke 1880 (IGN) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1880_IGN_ellipsoid\"\\,SPHEROID[\"Clarke
 1880 
(IGN)\"\\,6378249.2\\,293.4660212936265\\,AUTHORITY[\"EPSG\"\\,\"7011\"]]\\,AUTHORITY[\"EPSG\"\\,\"6011\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4011\"]],+proj=longlat
 +a=6378249.2 +b=6356515 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4012,EPSG,4012,GEOGCS[\"Unknown datum based upon the Clarke 1880 (RGS) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1880_RGS_ellipsoid\"\\,SPHEROID[\"Clarke
 1880 
(RGS)\"\\,6378249.145\\,293.465\\,AUTHORITY[\"EPSG\"\\,\"7012\"]]\\,AUTHORITY[\"EPSG\"\\,\"6012\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4012\"]],+proj=longlat
 +ellps=clrk80 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4013,EPSG,4013,GEOGCS[\"Unknown datum based upon the Clarke 1880 (Arc) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1880_Arc_ellipsoid\"\\,SPHEROID[\"Clarke
 1880 
(Arc)\"\\,6378249.145\\,293.4663077\\,AUTHORITY[\"EPSG\"\\,\"7013\"]]\\,AUTHORITY[\"EPSG\"\\,\"6013\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4013\"]],+proj=longlat
 +a=6378249.145 +b=6356514.966398753 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4014,EPSG,4014,GEOGCS[\"Unknown datum based upon the Clarke 1880 (SGA 1922) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1880_SGA_1922_ellipsoid\"\\,SPHEROID[\"Clarke
 1880 (SGA 
1922)\"\\,6378249.2\\,293.46598\\,AUTHORITY[\"EPSG\"\\,\"7014\"]]\\,AUTHORITY[\"EPSG\"\\,\"6014\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4014\"]],+proj=longlat
 +a=6378249.2 +b=6356514.996941779 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4015,EPSG,4015,GEOGCS[\"Unknown datum based upon the Everest 1830 (1937 
Adjustment) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Everest_1830_1937_Adjustment_ellipsoid\"\\,SPHEROID[\"Everest
 1830 (1937 
Adjustment)\"\\,6377276.345\\,300.8017\\,AUTHORITY[\"EPSG\"\\,\"7015\"]]\\,AUTHORITY[\"EPSG\"\\,\"6015\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4015\"]],+proj=longlat
 +a=6377276.345 +b=6356075.41314024 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4016,EPSG,4016,GEOGCS[\"Unknown datum based upon the Everest 1830 (1967 
Definition) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Everest_1830_1967_Definition_ellipsoid\"\\,SPHEROID[\"Everest
 1830 (1967 
Definition)\"\\,6377298.556\\,300.8017\\,AUTHORITY[\"EPSG\"\\,\"7016\"]]\\,AUTHORITY[\"EPSG\"\\,\"6016\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4016\"]],+proj=longlat
 +ellps=evrstSS +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4018,EPSG,4018,GEOGCS[\"Unknown datum based upon the Everest 1830 Modified 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Everest_1830_Modified_ellipsoid\"\\,SPHEROID[\"Everest
 1830 
Modified\"\\,6377304.063\\,300.8017\\,AUTHORITY[\"EPSG\"\\,\"7018\"]]\\,AUTHORITY[\"EPSG\"\\,\"6018\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4018\"]],+proj=longlat
 +a=6377304.063 +b=6356103.038993155 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4019,EPSG,4019,GEOGCS[\"Unknown datum based upon the GRS 1980 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_GRS_1980_ellipsoid\"\\,SPHEROID[\"GRS
 
1980\"\\,6378137\\,298.257222101\\,AUTHORITY[\"EPSG\"\\,\"7019\"]]\\,AUTHORITY[\"EPSG\"\\,\"6019\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4019\"]],+proj=longlat
 +ellps=GRS80 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4020,EPSG,4020,GEOGCS[\"Unknown datum based upon the Helmert 1906 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Helmert_1906_ellipsoid\"\\,SPHEROID[\"Helmert
 
1906\"\\,6378200\\,298.3\\,AUTHORITY[\"EPSG\"\\,\"7020\"]]\\,AUTHORITY[\"EPSG\"\\,\"6020\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4020\"]],+proj=longlat
 +ellps=helmert +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4021,EPSG,4021,GEOGCS[\"Unknown datum based upon the Indonesian National 
Spheroid\"\\,DATUM[\"Not_specified_based_on_Indonesian_National_Spheroid\"\\,SPHEROID[\"Indonesian
 National 
Spheroid\"\\,6378160\\,298.247\\,AUTHORITY[\"EPSG\"\\,\"7021\"]]\\,AUTHORITY[\"EPSG\"\\,\"6021\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4021\"]],+proj=longlat
 +a=6378160 +b=6356774.50408554 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4022,EPSG,4022,GEOGCS[\"Unknown datum based upon the International 1924 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_International_1924_ellipsoid\"\\,SPHEROID[\"International
 
1924\"\\,6378388\\,297\\,AUTHORITY[\"EPSG\"\\,\"7022\"]]\\,AUTHORITY[\"EPSG\"\\,\"6022\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4022\"]],+proj=longlat
 +ellps=intl +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4023,EPSG,4023,GEOGCS[\"MOLDREF99\"\\,DATUM[\"MOLDREF99\"\\,SPHEROID[\"GRS 
1980\"\\,6378137\\,298.257222101\\,AUTHORITY[\"EPSG\"\\,\"7019\"]]\\,AUTHORITY[\"EPSG\"\\,\"1032\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4023\"]],+proj=longlat
 +ellps=GRS80 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4024,EPSG,4024,GEOGCS[\"Unknown datum based upon the Krassowsky 1940 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Krassowsky_1940_ellipsoid\"\\,SPHEROID[\"Krassowsky
 
1940\"\\,6378245\\,298.3\\,AUTHORITY[\"EPSG\"\\,\"7024\"]]\\,AUTHORITY[\"EPSG\"\\,\"6024\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4024\"]],+proj=longlat
 +ellps=krass +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4025,EPSG,4025,GEOGCS[\"Unknown datum based upon the NWL 9D 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_NWL_9D_ellipsoid\"\\,SPHEROID[\"NWL
 
9D\"\\,6378145\\,298.25\\,AUTHORITY[\"EPSG\"\\,\"7025\"]]\\,AUTHORITY[\"EPSG\"\\,\"6025\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4025\"]],+proj=longlat
 +ellps=WGS66 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4027,EPSG,4027,GEOGCS[\"Unknown datum based upon the Plessis 1817 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Plessis_1817_ellipsoid\"\\,SPHEROID[\"Plessis
 
1817\"\\,6376523\\,308.64\\,AUTHORITY[\"EPSG\"\\,\"7027\"]]\\,AUTHORITY[\"EPSG\"\\,\"6027\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4027\"]],+proj=longlat
 +a=6376523 +b=6355862.933255573 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4028,EPSG,4028,GEOGCS[\"Unknown datum based upon the Struve 1860 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Struve_1860_ellipsoid\"\\,SPHEROID[\"Struve
 
1860\"\\,6378298.3\\,294.73\\,AUTHORITY[\"EPSG\"\\,\"7028\"]]\\,AUTHORITY[\"EPSG\"\\,\"6028\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4028\"]],+proj=longlat
 +a=6378298.3 +b=6356657.142669561 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4029,EPSG,4029,GEOGCS[\"Unknown datum based upon the War Office 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_War_Office_ellipsoid\"\\,SPHEROID[\"War
 
Office\"\\,6378300\\,296\\,AUTHORITY[\"EPSG\"\\,\"7029\"]]\\,AUTHORITY[\"EPSG\"\\,\"6029\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4029\"]],+proj=longlat
 +a=6378300 +b=6356751.689189189 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4030,EPSG,4030,GEOGCS[\"Unknown datum based upon the WGS 84 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_WGS_84_ellipsoid\"\\,SPHEROID[\"WGS
 
84\"\\,6378137\\,298.257223563\\,AUTHORITY[\"EPSG\"\\,\"7030\"]]\\,AUTHORITY[\"EPSG\"\\,\"6030\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4030\"]],+proj=longlat
 +ellps=WGS84 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4031,EPSG,4031,GEOGCS[\"Unknown datum based upon the GEM 10C 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_GEM_10C_ellipsoid\"\\,SPHEROID[\"GEM
 
10C\"\\,6378137\\,298.257223563\\,AUTHORITY[\"EPSG\"\\,\"7031\"]]\\,AUTHORITY[\"EPSG\"\\,\"6031\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4031\"]],+proj=longlat
 +ellps=WGS84 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4032,EPSG,4032,GEOGCS[\"Unknown datum based upon the OSU86F 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_OSU86F_ellipsoid\"\\,SPHEROID[\"OSU86F\"\\,6378136.2\\,298.257223563\\,AUTHORITY[\"EPSG\"\\,\"7032\"]]\\,AUTHORITY[\"EPSG\"\\,\"6032\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4032\"]],+proj=longlat
 +a=6378136.2 +b=6356751.516927429 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4033,EPSG,4033,GEOGCS[\"Unknown datum based upon the OSU91A 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_OSU91A_ellipsoid\"\\,SPHEROID[\"OSU91A\"\\,6378136.3\\,298.257223563\\,AUTHORITY[\"EPSG\"\\,\"7033\"]]\\,AUTHORITY[\"EPSG\"\\,\"6033\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4033\"]],+proj=longlat
 +a=6378136.3 +b=6356751.616592146 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4034,EPSG,4034,GEOGCS[\"Unknown datum based upon the Clarke 1880 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Clarke_1880_ellipsoid\"\\,SPHEROID[\"Clarke
 
1880\"\\,6378249.144808011\\,293.4663076556349\\,AUTHORITY[\"EPSG\"\\,\"7034\"]]\\,AUTHORITY[\"EPSG\"\\,\"6034\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4034\"]],+proj=longlat
 +a=6378249.144808011 +b=6356514.966204134 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4035,EPSG,4035,GEOGCS[\"Unknown datum based upon the Authalic 
Sphere\"\\,DATUM[\"Not_specified_based_on_Authalic_Sphere\"\\,SPHEROID[\"Sphere\"\\,6371000\\,0\\,AUTHORITY[\"EPSG\"\\,\"7035\"]]\\,AUTHORITY[\"EPSG\"\\,\"6035\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9108\"]]\\,AUTHORITY[\"EPSG\"\\,\"4035\"]],+proj=longlat
 +a=6371000 +b=6371000 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4036,EPSG,4036,GEOGCS[\"Unknown datum based upon the GRS 1967 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_GRS_1967_ellipsoid\"\\,SPHEROID[\"GRS
 
1967\"\\,6378160\\,298.247167427\\,AUTHORITY[\"EPSG\"\\,\"7036\"]]\\,AUTHORITY[\"EPSG\"\\,\"6036\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4036\"]],+proj=longlat
 +ellps=GRS67 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4041,EPSG,4041,GEOGCS[\"Unknown datum based upon the Average Terrestrial 
System 1977 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Average_Terrestrial_System_1977_ellipsoid\"\\,SPHEROID[\"Average
 Terrestrial System 
1977\"\\,6378135\\,298.257\\,AUTHORITY[\"EPSG\"\\,\"7041\"]]\\,AUTHORITY[\"EPSG\"\\,\"6041\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4041\"]],+proj=longlat
 +a=6378135 +b=6356750.304921594 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4042,EPSG,4042,GEOGCS[\"Unknown datum based upon the Everest (1830 Definition) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Everest_1830_Definition_ellipsoid\"\\,SPHEROID[\"Everest
 (1830 
Definition)\"\\,6377299.36559538\\,300.8017255433552\\,AUTHORITY[\"EPSG\"\\,\"7042\"]]\\,AUTHORITY[\"EPSG\"\\,\"6042\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4042\"]],+proj=longlat
 +a=6377299.36559538 +b=6356098.359005156 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4043,EPSG,4043,GEOGCS[\"Unknown datum based upon the WGS 72 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_WGS_72_ellipsoid\"\\,SPHEROID[\"WGS
 
72\"\\,6378135\\,298.26\\,AUTHORITY[\"EPSG\"\\,\"7043\"]]\\,AUTHORITY[\"EPSG\"\\,\"6043\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4043\"]],+proj=longlat
 +ellps=WGS72 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4044,EPSG,4044,GEOGCS[\"Unknown datum based upon the Everest 1830 (1962 
Definition) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Everest_1830_1962_Definition_ellipsoid\"\\,SPHEROID[\"Everest
 1830 (1962 
Definition)\"\\,6377301.243\\,300.8017255\\,AUTHORITY[\"EPSG\"\\,\"7044\"]]\\,AUTHORITY[\"EPSG\"\\,\"6044\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4044\"]],+proj=longlat
 +a=6377301.243 +b=6356100.230165384 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4045,EPSG,4045,GEOGCS[\"Unknown datum based upon the Everest 1830 (1975 
Definition) 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Everest_1830_1975_Definition_ellipsoid\"\\,SPHEROID[\"Everest
 1830 (1975 
Definition)\"\\,6377299.151\\,300.8017255\\,AUTHORITY[\"EPSG\"\\,\"7045\"]]\\,AUTHORITY[\"EPSG\"\\,\"6045\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4045\"]],+proj=longlat
 +a=6377299.151 +b=6356098.145120132 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4046,EPSG,4046,GEOGCS[\"RGRDC 
2005\"\\,DATUM[\"Reseau_Geodesique_de_la_RDC_2005\"\\,SPHEROID[\"GRS 
1980\"\\,6378137\\,298.257222101\\,AUTHORITY[\"EPSG\"\\,\"7019\"]]\\,TOWGS84[0\\,0\\,0\\,0\\,0\\,0\\,0]\\,AUTHORITY[\"EPSG\"\\,\"1033\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4046\"]],+proj=longlat
 +ellps=GRS80 +towgs84=0\\,0\\,0\\,0\\,0\\,0\\,0 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4047,EPSG,4047,GEOGCS[\"Unspecified datum based upon the GRS 1980 Authalic 
Sphere\"\\,DATUM[\"Not_specified_based_on_GRS_1980_Authalic_Sphere\"\\,SPHEROID[\"GRS
 1980 Authalic 
Sphere\"\\,6371007\\,0\\,AUTHORITY[\"EPSG\"\\,\"7048\"]]\\,AUTHORITY[\"EPSG\"\\,\"6047\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4047\"]],+proj=longlat
 +a=6371007 +b=6371007 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4052,EPSG,4052,GEOGCS[\"Unspecified datum based upon the Clarke 1866 Authalic 
Sphere\"\\,DATUM[\"Not_specified_based_on_Clarke_1866_Authalic_Sphere\"\\,SPHEROID[\"Clarke
 1866 Authalic 
Sphere\"\\,6370997\\,0\\,AUTHORITY[\"EPSG\"\\,\"7052\"]]\\,AUTHORITY[\"EPSG\"\\,\"6052\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4052\"]],+proj=longlat
 +a=6370997 +b=6370997 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4053,EPSG,4053,GEOGCS[\"Unspecified datum based upon the International 1924 
Authalic 
Sphere\"\\,DATUM[\"Not_specified_based_on_International_1924_Authalic_Sphere\"\\,SPHEROID[\"International
 1924 Authalic 
Sphere\"\\,6371228\\,0\\,AUTHORITY[\"EPSG\"\\,\"7057\"]]\\,AUTHORITY[\"EPSG\"\\,\"6053\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4053\"]],+proj=longlat
 +a=6371228 +b=6371228 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4054,EPSG,4054,GEOGCS[\"Unspecified datum based upon the Hughes 1980 
ellipsoid\"\\,DATUM[\"Not_specified_based_on_Hughes_1980_ellipsoid\"\\,SPHEROID[\"Hughes
 
1980\"\\,6378273\\,298.279411123061\\,AUTHORITY[\"EPSG\"\\,\"7058\"]]\\,AUTHORITY[\"EPSG\"\\,\"6054\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4054\"]],+proj=longlat
 +a=6378273 +b=6356889.449 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4055,EPSG,4055,GEOGCS[\"Popular Visualisation 
CRS\"\\,DATUM[\"Popular_Visualisation_Datum\"\\,SPHEROID[\"Popular 
Visualisation 
Sphere\"\\,6378137\\,0\\,AUTHORITY[\"EPSG\"\\,\"7059\"]]\\,TOWGS84[0\\,0\\,0\\,0\\,0\\,0\\,0]\\,AUTHORITY[\"EPSG\"\\,\"6055\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4055\"]],+proj=longlat
 +a=6378137 +b=6378137 +towgs84=0\\,0\\,0\\,0\\,0\\,0\\,0 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4075,EPSG,4075,GEOGCS[\"SREF98\"\\,DATUM[\"Serbian_Reference_Network_1998\"\\,SPHEROID[\"GRS
 
1980\"\\,6378137\\,298.257222101\\,AUTHORITY[\"EPSG\"\\,\"7019\"]]\\,TOWGS84[0\\,0\\,0\\,0\\,0\\,0\\,0]\\,AUTHORITY[\"EPSG\"\\,\"1034\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4075\"]],+proj=longlat
 +ellps=GRS80 +towgs84=0\\,0\\,0\\,0\\,0\\,0\\,0 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4081,EPSG,4081,GEOGCS[\"REGCAN95\"\\,DATUM[\"Red_Geodesica_de_Canarias_1995\"\\,SPHEROID[\"GRS
 
1980\"\\,6378137\\,298.257222101\\,AUTHORITY[\"EPSG\"\\,\"7019\"]]\\,TOWGS84[0\\,0\\,0\\,0\\,0\\,0\\,0]\\,AUTHORITY[\"EPSG\"\\,\"1035\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4081\"]],+proj=longlat
 +ellps=GRS80 +towgs84=0\\,0\\,0\\,0\\,0\\,0\\,0 +no_defs ");
+       pos += snprintf(buf + pos, bufsize - pos, 
"4120,EPSG,4120,GEOGCS[\"Greek\"\\,DATUM[\"Greek\"\\,SPHEROID[\"Bessel 
1841\"\\,6377397.155\\,299.1528128\\,AUTHORITY[\"EPSG\"\\,\"7004\"]]\\,AUTHORITY[\"EPSG\"\\,\"6120\"]]\\,PRIMEM[\"Greenwich\"\\,0\\,AUTHORITY[\"EPSG\"\\,\"8901\"]]\\,UNIT[\"degree\"\\,0.0174532925199433\\,AUTHORITY[\"EPSG\"\\,\"9122\"]]\\,AUTHORITY[\"EPSG\"\\,\"4120\"]],+proj=longlat
 +ellps=bessel +no_defs ");
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to