Changeset 24780
- Timestamp:
- 05/04/20 12:55:08 (5 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/m4/issm_options.m4
r24675 r24780 1471 1471 fi 1472 1472 dnl }}} 1473 dnl PROJ .4{{{1473 dnl PROJ{{{ 1474 1474 AC_ARG_WITH( 1475 1475 [proj4-dir], 1476 AS_HELP_STRING([--with-proj4-dir=DIR], [PROJ .4root directory]),1477 [PROJ 4_ROOT=${withval}],1478 [PROJ 4_ROOT="no"]1479 ) 1480 AC_MSG_CHECKING([for PROJ .4])1481 if test "x${PROJ 4_ROOT}" == "xno"; then1482 HAVE_PROJ 4=no1483 else 1484 HAVE_PROJ 4=yes1485 if ! test -d "${PROJ 4_ROOT}"; then1486 AC_MSG_ERROR([PROJ .4 directory provided (${PROJ4_ROOT}) does not exist!]);1487 fi 1488 fi 1489 AC_MSG_RESULT([${HAVE_PROJ 4}])1490 1491 dnl PROJ .4libraries and header files1492 if test "x${HAVE_PROJ 4}" == "xyes"; then1493 PROJ 4INCL="-I${PROJ4_ROOT}/include"1494 PROJ 4LIB="-L${PROJ4_ROOT}/lib -lproj"1495 AC_DEFINE([_HAVE_PROJ 4_], [1], [with PROJ4in ISSM src])1496 AC_SUBST([PROJ 4INCL])1497 AC_SUBST([PROJ 4LIB])1498 fi 1499 AM_CONDITIONAL([PROJ 4], [test "x${HAVE_PROJ4}" == "xyes"])1476 AS_HELP_STRING([--with-proj4-dir=DIR], [PROJ root directory]), 1477 [PROJ_ROOT=${withval}], 1478 [PROJ_ROOT="no"] 1479 ) 1480 AC_MSG_CHECKING([for PROJ]) 1481 if test "x${PROJ_ROOT}" == "xno"; then 1482 HAVE_PROJ=no 1483 else 1484 HAVE_PROJ=yes 1485 if ! test -d "${PROJ_ROOT}"; then 1486 AC_MSG_ERROR([PROJ directory provided (${PROJ_ROOT}) does not exist!]); 1487 fi 1488 fi 1489 AC_MSG_RESULT([${HAVE_PROJ}]) 1490 1491 dnl PROJ libraries and header files 1492 if test "x${HAVE_PROJ}" == "xyes"; then 1493 PROJINCL="-I${PROJ_ROOT}/include" 1494 PROJLIB="-L${PROJ_ROOT}/lib -lproj" 1495 AC_DEFINE([_HAVE_PROJ_], [1], [with PROJ in ISSM src]) 1496 AC_SUBST([PROJINCL]) 1497 AC_SUBST([PROJLIB]) 1498 fi 1499 AM_CONDITIONAL([PROJ], [test "x${HAVE_PROJ}" == "xyes"]) 1500 1500 dnl }}} 1501 1501 dnl SLEPc{{{ -
issm/trunk-jpl/src/c/modules/CoordinateSystemTransformx/CoordinateSystemTransformx.cpp
r23285 r24780 11 11 void CoordinateSystemTransformx(double** px_dest,double** py_dest,double* x_src,double* y_src,int size,const char* str_src,const char* str_dst){ 12 12 13 #if !defined(_HAVE_PROJ 4_)14 _error_("proj .4 has not beeninstalled");13 #if !defined(_HAVE_PROJ_) 14 _error_("proj not installed"); 15 15 #else 16 16 … … 27 27 projPJ pj_src = pj_init_plus(str_src); 28 28 projPJ pj_dst = pj_init_plus(str_dst); 29 if(!pj_src) _error_("Failed to initialize PROJ .4with source projection \"" <<str_src<<"\"\n");30 if(!pj_dst) _error_("Failed to initialize PROJ .4with destination projection\""<<str_dst<<"\"\n");29 if(!pj_src) _error_("Failed to initialize PROJ with source projection \"" <<str_src<<"\"\n"); 30 if(!pj_dst) _error_("Failed to initialize PROJ with destination projection\""<<str_dst<<"\"\n"); 31 31 32 32 /*Perform transformation*/ 33 33 int p = pj_transform(pj_src,pj_dst,size,1,x_dest,y_dest,NULL); 34 if(p!=0) _error_("Reprojection failed, PROJ .4error code: "<<p<<"\n");34 if(p!=0) _error_("Reprojection failed, PROJ error code: "<<p<<"\n"); 35 35 36 36 /*Output : */
Note:
See TracChangeset
for help on using the changeset viewer.