Changeset: 286bfa93d4e7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=286bfa93d4e7
Modified Files:
configure.ag
geom/monetdb5/geom.c
Branch: geo
Log Message:
configure treats proj_api.h as an optional library
diffs (76 lines):
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2429,7 +2429,7 @@ AC_ARG_WITH(proj,
AS_HELP_STRING([--with-proj=DIR],
[proj library is installed in DIR]),
have_proj="$withval")
-case "$enable_geom" in
+case "$have_proj" in
yes|auto)
case "$have_proj" in
auto|yes)
@@ -2453,14 +2453,14 @@ yes|auto)
CPPFLAGS="$save_CPPFLAGS"
case "$have_proj" in
no)
- if test "x$enable_geom" = xyes; then
- AC_MSG_ERROR([$why_have_proj])
- fi
- # no proj, so don't compile geom
- enable_geom=no
- if test "x$disable_geom" = x; then
- disable_geom="$why_have_proj"
- fi
+ #if test "x$enable_geom" = xyes; then
+ # AC_MSG_ERROR([$why_have_proj])
+ #fi
+ ## no proj, so don't compile geom
+ #enable_geom=no
+ #if test "x$disable_geom" = x; then
+ # disable_geom="$why_have_proj"
+ #fi
PROJ_INCS=""
PROJ_LIBS=""
;;
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -32,6 +32,7 @@ const double pi=3.14159265358979323846;
/* the first argument in the functions is the return variable */
+#ifdef HAVE_PROJ
/** convert degrees to radians */
static void degrees2radians(double *x, double *y, double *z) {
(*x) *= pi/180.0;
@@ -46,7 +47,6 @@ static void radians2degrees(double *x, d
(*z) *= 180.0/pi;
}
-#ifdef HAVE_PROJ
static str transformCoordSeq(int idx, int coordinatesNum, projPJ proj4_src,
projPJ proj4_dst, const GEOSCoordSequence* gcs_old, GEOSCoordSequence**
gcs_new){
double x=0, y=0, z=0;
int* errorNum =0 ;
@@ -334,6 +334,12 @@ static str transformMultiGeometry(GEOSGe
/* It gets a geometry and transforms its coordinates to the provided srid */
str wkbTransform(wkb** transformedWKB, wkb** geomWKB, int* srid_src, int*
srid_dst, char** proj4_src_str, char** proj4_dst_str) {
#ifndef HAVE_PROJ
+*transformedWKB = NULL;
+geomWKB = geomWKB;
+srid_src = srid_src;
+srid_dst = srid_dst;
+proj4_src_str = proj4_src_str;
+proj4_dst_str = proj4_dst_str;
return createException(MAL, "geom.Transform", "Function Not Implemented");
#else
projPJ proj4_src, proj4_dst;
@@ -342,8 +348,6 @@ return createException(MAL, "geom.Transf
str ret = MAL_SUCCEED;
-
-
if(!strcmp(*proj4_src_str, "null"))
throw(MAL, "geom.wkbTransform", "Could not find in
spatial_ref_sys srid %d\n", *srid_src);
if(!strcmp(*proj4_dst_str, "null"))
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list