]> granicus.if.org Git - postgis/commitdiff
Made unparsable proj strings error more verbose and removed a typo
authorSandro Santilli <strk@keybit.net>
Sun, 30 Jan 2005 09:12:00 +0000 (09:12 +0000)
committerSandro Santilli <strk@keybit.net>
Sun, 30 Jan 2005 09:12:00 +0000 (09:12 +0000)
in transform_geom().

git-svn-id: http://svn.osgeo.org/postgis/trunk@1353 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_transform.c

index f519dbe908c4f8a25e4b2827877c5b91149bd558..910c17100b1ff40158fe290b4ae546411e2dd681 100644 (file)
@@ -282,19 +282,21 @@ Datum transform_geom(PG_FUNCTION_ARGS)
        input_pj = make_project(input_proj4);
        if ( (input_pj == NULL) || pj_errno)
        {
-               pfree(input_proj4); pfree(output_proj4);
+               //pfree(input_proj4);
+               pfree(output_proj4);
                pfree(geom);
-               elog(ERROR,"tranform: couldnt parse proj4 input string");
+               elog(ERROR, "transform: couldn't parse proj4 input string: '%s': %s", input_proj4, pj_strerrno(pj_errno));
                PG_RETURN_NULL();
        }
 
        output_pj = make_project(output_proj4);
        if ((output_pj == NULL)|| pj_errno)
        {
-               pfree(input_proj4); pfree(output_proj4);
+               pfree(input_proj4);
+               //pfree(output_proj4);
                pj_free(input_pj);
                pfree(geom);
-               elog(ERROR,"tranform: couldnt parse proj4 output string");
+               elog(ERROR, "transform: couldn't parse proj4 output string: '%s': %s", output_proj4, pj_strerrno(pj_errno));
                PG_RETURN_NULL();
        }
 
@@ -353,7 +355,7 @@ transform_point(POINT2D *pt, PJ *srcpj, PJ *dstpj)
 
                if (pj_errno)
                {
-                       elog(ERROR,"transform: couldnt project point: %i (%s)",
+                       elog(ERROR,"transform: couldn't project point: %i (%s)",
                                pj_errno,pj_strerrno(pj_errno));
                        return 0;
                }