The following commit has been merged in the master branch: commit 902e8cbeaca849b6a9ced68f63a13b2da2ee5378 Author: Alan Boudreault <aboudrea...@mapgears.com> Date: Wed May 16 14:28:40 2012 +0000
Updated for new upstream release: 1.9.0 diff --git a/VERSION b/VERSION index 661e7ae..f8e233b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.7.3 +1.9.0 diff --git a/configure b/configure index 16a46a2..cdd9df2 100755 --- a/configure +++ b/configure @@ -3014,13 +3014,13 @@ fi else # Check for GRASS >= 7.0 - echo "$as_me:$LINENO: checking for G_putenv in -lgrass_gis" >&5 -echo $ECHO_N "checking for G_putenv in -lgrass_gis... $ECHO_C" >&6 -if test "${ac_cv_lib_grass_gis_G_putenv+set}" = set; then + echo "$as_me:$LINENO: checking for G_putenv in -lgrass_gis.7.0.svn" >&5 +echo $ECHO_N "checking for G_putenv in -lgrass_gis.7.0.svn... $ECHO_C" >&6 +if test "${ac_cv_lib_grass_gis_7_0_svn_G_putenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lgrass_gis -L$with_grass/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl -lgrass_dig2 -lgrass_rtree -lgrass_linkm $LIBS" +LIBS="-lgrass_gis.7.0.svn -L$with_grass/lib -lgrass_raster.7.0.svn -lgrass_gmath.7.0.svn -lgrass_gis.7.0.svn -lgrass_datetime.7.0.svn -lgrass_gproj.7.0.svn -lgrass_vector.7.0.svn -lgrass_dbmibase.7.0.svn -lgrass_dbmiclient.7.0.svn -lgrass_dgl.7.0.svn -lgrass_dig2.7.0.svn -lgrass_rtree.7.0.svn -lgrass_linkm.7.0.svn -lgrass_btree2.7.0.svn -lgrass_ccmath.7.0.svn $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3065,27 +3065,27 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_grass_gis_G_putenv=yes + ac_cv_lib_grass_gis_7_0_svn_G_putenv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_grass_gis_G_putenv=no +ac_cv_lib_grass_gis_7_0_svn_G_putenv=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_grass_gis_G_putenv" >&5 -echo "${ECHO_T}$ac_cv_lib_grass_gis_G_putenv" >&6 -if test $ac_cv_lib_grass_gis_G_putenv = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_grass_gis_7_0_svn_G_putenv" >&5 +echo "${ECHO_T}$ac_cv_lib_grass_gis_7_0_svn_G_putenv" >&6 +if test $ac_cv_lib_grass_gis_7_0_svn_G_putenv = yes; then GRASS_SETTING=grass7+ else GRASS_SETTING=no fi if test "$GRASS_SETTING" = "grass7+" ; then - LIBS="-L$with_grass/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl -lgrass_dig2 -lgrass_rtree -lgrass_linkm $LIBS" + LIBS="-L$with_grass/lib -lgrass_raster.7.0.svn -lgrass_gmath.7.0.svn -lgrass_gis.7.0.svn -lgrass_datetime.7.0.svn -lgrass_gproj.7.0.svn -lgrass_vector.7.0.svn -lgrass_dbmibase.7.0.svn -lgrass_dbmiclient.7.0.svn -lgrass_dgl.7.0.svn -lgrass_dig2.7.0.svn -lgrass_rtree.7.0.svn -lgrass_linkm.7.0.svn -lgrass_btree2.7.0.svn -lgrass_ccmath.7.0.svn $LIBS" GRASS_INCLUDE="-I$with_grass/include" GRASS_GISBASE="$with_grass" else diff --git a/configure.in b/configure.in index 34539c6..099a9e1 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl *************************************************************************** -dnl $Id: configure.in 16813 2009-04-21 20:05:19Z rouault $ +dnl $Id: configure.in 20157 2010-07-28 19:32:04Z rouault $ dnl dnl Project: GDAL GRASS Plugin dnl Purpose: Configure source file. @@ -132,9 +132,9 @@ if test "$with_grass" != "yes" ; then else # Check for GRASS >= 7.0 - AC_CHECK_LIB(grass_gis,G_putenv,GRASS_SETTING=grass7+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl -lgrass_dig2 -lgrass_rtree -lgrass_linkm) - if test "$GRASS_SETTING" = "grass7+" ; then - LIBS="-L$with_grass/lib -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl -lgrass_dig2 -lgrass_rtree -lgrass_linkm $LIBS" + AC_CHECK_LIB(grass_gis.7.0.svn,G_putenv,GRASS_SETTING=grass7+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_raster.7.0.svn -lgrass_gmath.7.0.svn -lgrass_gis.7.0.svn -lgrass_datetime.7.0.svn -lgrass_gproj.7.0.svn -lgrass_vector.7.0.svn -lgrass_dbmibase.7.0.svn -lgrass_dbmiclient.7.0.svn -lgrass_dgl.7.0.svn -lgrass_dig2.7.0.svn -lgrass_rtree.7.0.svn -lgrass_linkm.7.0.svn -lgrass_btree2.7.0.svn -lgrass_ccmath.7.0.svn) + if test "$GRASS_SETTING" = "grass7+" ; then + LIBS="-L$with_grass/lib -lgrass_raster.7.0.svn -lgrass_gmath.7.0.svn -lgrass_gis.7.0.svn -lgrass_datetime.7.0.svn -lgrass_gproj.7.0.svn -lgrass_vector.7.0.svn -lgrass_dbmibase.7.0.svn -lgrass_dbmiclient.7.0.svn -lgrass_dgl.7.0.svn -lgrass_dig2.7.0.svn -lgrass_rtree.7.0.svn -lgrass_linkm.7.0.svn -lgrass_btree2.7.0.svn -lgrass_ccmath.7.0.svn $LIBS" GRASS_INCLUDE="-I$with_grass/include" GRASS_GISBASE="$with_grass" else diff --git a/debian/changelog b/debian/changelog index 5c8e6f9..5086818 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libgdal-grass (1.9.0-1) unstable; urgency=low + + * New upstream release. + + -- Jerome Villeneuve Larouche <jlarou...@mapgears.com> Tue, 15 May 2012 17:04:53 +0000 + libgdal-grass (1.7.3-2) unstable; urgency=low * Introduced a strict build-dep on libgdal1-dev to use the new path diff --git a/debian/control b/debian/control index fbf0947..5815fbf 100644 --- a/debian/control +++ b/debian/control @@ -3,14 +3,14 @@ Section: science Priority: extra Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org> Uploaders: Francesco Paolo Lovergine <fran...@debian.org> -Build-Depends: debhelper (>= 8), d-shlibs, libgdal1-dev (>= 1.7.0-2~), pkg-config, grass-dev (>= 6.4.0~rc5), +Build-Depends: debhelper (>= 8), d-shlibs, libgdal-dev (>= 1.9.0), pkg-config, grass-dev (>= 6.4.0~rc5), grass (>= 6.4.0~rc5), libproj-dev Standards-Version: 3.9.1 Homepage: http://www.gdal.org/ Vcs-Browser: http://git.debian.org/?p=pkg-grass/gdal-grass.git Vcs-Git: git://git.debian.org/git/pkg-grass/gdal-grass.git -Package: libgdal1-1.7.0-grass +Package: libgdal1-1.9.0-grass Section: libs Architecture: any Depends: ${shlibs:Depends}, grass640, ${misc:Depends} diff --git a/debian/control.in b/debian/control.in index fbbc029..71eca1c 100644 --- a/debian/control.in +++ b/debian/control.in @@ -3,14 +3,14 @@ Section: science Priority: extra Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org> Uploaders: Francesco Paolo Lovergine <fran...@debian.org> -Build-Depends: debhelper (>= 8), d-shlibs, libgdal1-dev (>= 1.7.0-2~), pkg-config, grass-dev (>= 6.4.0~rc5), +Build-Depends: debhelper (>= 8), d-shlibs, libgdal-dev (>= 1.9.0), pkg-config, grass-dev (>= 6.4.0~rc5), grass (>= 6.4.0~rc5), libproj-dev Standards-Version: 3.9.1 Homepage: http://www.gdal.org/ Vcs-Browser: http://git.debian.org/?p=pkg-grass/gdal-grass.git Vcs-Git: git://git.debian.org/git/pkg-grass/gdal-grass.git -Package: libgdal1-1.7.0-grass +Package: libgdal1-1.9.0-grass Section: libs Architecture: any Depends: ${shlibs:Depends}, @GRASS_ABI@, ${misc:Depends} diff --git a/debian/libgdal1-1.7.0-grass.lintian-overrides b/debian/libgdal1-1.7.0-grass.lintian-overrides deleted file mode 100644 index 33a8f4d..0000000 --- a/debian/libgdal1-1.7.0-grass.lintian-overrides +++ /dev/null @@ -1,3 +0,0 @@ -# The run path has been added to get Grass internal library -libgdal1-1.7.0-grass: binary-or-shlib-defines-rpath ./usr/lib/gdalplugins/1.7/gdal_GRASS.so /usr/lib/grass64/lib -libgdal1-1.7.0-grass: binary-or-shlib-defines-rpath ./usr/lib/gdalplugins/1.7/ogr_GRASS.so /usr/lib/grass64/lib diff --git a/debian/patches/series b/debian/patches/series index 81ffa4b..954b10f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ rpath + diff --git a/grass57dataset.cpp b/grass57dataset.cpp index 128fd5c..a2a3dbf 100644 --- a/grass57dataset.cpp +++ b/grass57dataset.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: grass57dataset.cpp 18537 2010-01-12 15:05:51Z rblazek $ + * $Id: grass57dataset.cpp 20157 2010-07-28 19:32:04Z rouault $ * * Project: GRASS Driver * Purpose: Implement GRASS raster read/write support @@ -56,12 +56,37 @@ char *GPJ_grass_to_wkt(struct Key_Value *proj_info, #define GRASS_MAX_COLORS 100000 // what is the right value -CPL_CVSID("$Id: grass57dataset.cpp 18537 2010-01-12 15:05:51Z rblazek $"); +CPL_CVSID("$Id: grass57dataset.cpp 20157 2010-07-28 19:32:04Z rouault $"); CPL_C_START void GDALRegister_GRASS(void); CPL_C_END +#if GRASS_VERSION_MAJOR >= 7 +#define G_get_cellhd Rast_get_cellhd +#define G_raster_map_type Rast_map_type +#define G_read_fp_range Rast_read_fp_range +#define G_get_fp_range_min_max Rast_get_fp_range_min_max +#define G_set_c_null_value Rast_set_c_null_value +#define G_set_f_null_value Rast_set_f_null_value +#define G_set_d_null_value Rast_set_d_null_value +#define G_open_cell_old Rast_open_old +#define G_copy memcpy +#define G_read_colors Rast_read_colors +#define G_get_color_range Rast_get_c_color_range +#define G_colors_count Rast_colors_count +#define G_get_f_color_rule Rast_get_fp_color_rule +#define G_free_colors Rast_free_colors +#define G_close_cell Rast_close +#define G_allocate_c_raster_buf Rast_allocate_c_buf +#define G_get_c_raster_row Rast_get_c_row +#define G_is_c_null_value Rast_is_c_null_value +#define G_get_f_raster_row Rast_get_f_row +#define G_get_d_raster_row Rast_get_d_row +#define G_allocate_f_raster_buf Rast_allocate_f_buf +#define G_allocate_d_raster_buf Rast_allocate_d_buf +#endif + /************************************************************************/ /* Grass2CPLErrorHook() */ /************************************************************************/ @@ -308,7 +333,11 @@ GRASSRasterBand::GRASSRasterBand( GRASSDataset *poDS, int nBand, int nRed, nGreen, nBlue; GDALColorEntry sColor; +#if GRASS_VERSION_MAJOR >= 7 + if( Rast_get_c_color( &iColor, &nRed, &nGreen, &nBlue, &sGrassColors ) ) +#else if( G_get_color( iColor, &nRed, &nGreen, &nBlue, &sGrassColors ) ) +#endif { sColor.c1 = nRed; sColor.c2 = nGreen; @@ -713,7 +742,7 @@ GRASSDataset::~GRASSDataset() if ( pszElement ) G_free ( pszElement ); - CPLFree( pszProjection ); + G_free( pszProjection ); } /************************************************************************/ @@ -921,12 +950,16 @@ GDALDataset *GRASSDataset::Open( GDALOpenInfo * poOpenInfo ) /* -------------------------------------------------------------------- */ /* Capture some information from the file that is of interest. */ /* -------------------------------------------------------------------- */ - + +#if GRASS_VERSION_MAJOR >= 7 + Rast_get_cellhd( papszCells[0], papszMapsets[0], &(poDS->sCellInfo) ); +#else if( G_get_cellhd( papszCells[0], papszMapsets[0], &(poDS->sCellInfo) ) != 0 ) { - CPLError( CE_Warning, CPLE_AppDefined, "GRASS: Cannot open raster header"); - delete poDS; - return NULL; + CPLError( CE_Warning, CPLE_AppDefined, "GRASS: Cannot open raster header"); + delete poDS; + return NULL; } +#endif poDS->nRasterXSize = poDS->sCellInfo.cols; poDS->nRasterYSize = poDS->sCellInfo.rows; diff --git a/ogrgrass.h b/ogrgrass.h index ad1dec2..45b10e6 100644 --- a/ogrgrass.h +++ b/ogrgrass.h @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: ogrgrass.h 15583 2008-10-23 00:04:33Z warmerdam $ + * $Id: ogrgrass.h 20157 2010-07-28 19:32:04Z rouault $ * * Project: OpenGIS Simple Features Reference Implementation * Purpose: Private definitions for OGR/GRASS driver. @@ -37,7 +37,11 @@ extern "C" { #include <grass/gprojects.h> #include <grass/gis.h> #include <grass/dbmi.h> +#if GRASS_VERSION_MAJOR >= 7 + #include <grass/vector.h> +#else #include <grass/Vect.h> +#endif } /************************************************************************/ diff --git a/ogrgrassdatasource.cpp b/ogrgrassdatasource.cpp index 530a6e6..565af4a 100644 --- a/ogrgrassdatasource.cpp +++ b/ogrgrassdatasource.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: ogrgrassdatasource.cpp 16813 2009-04-21 20:05:19Z rouault $ + * $Id: ogrgrassdatasource.cpp 20157 2010-07-28 19:32:04Z rouault $ * * Project: OpenGIS Simple Features Reference Implementation * Purpose: Implements OGRGRASSDataSource class. @@ -31,7 +31,7 @@ #include "cpl_conv.h" #include "cpl_string.h" -CPL_CVSID("$Id: ogrgrassdatasource.cpp 16813 2009-04-21 20:05:19Z rouault $"); +CPL_CVSID("$Id: ogrgrassdatasource.cpp 20157 2010-07-28 19:32:04Z rouault $"); /************************************************************************/ /* Grass2CPLErrorHook() */ @@ -71,10 +71,10 @@ OGRGRASSDataSource::~OGRGRASSDataSource() if ( pszName ) CPLFree( pszName ); if ( papoLayers ) CPLFree( papoLayers ); - if ( pszGisdbase ) CPLFree( pszGisdbase ); - if ( pszLocation ) CPLFree( pszLocation ); - if ( pszMapset ) CPLFree( pszMapset ); - if ( pszMap ) CPLFree( pszMap ); + if ( pszGisdbase ) G_free( pszGisdbase ); + if ( pszLocation ) G_free( pszLocation ); + if ( pszMapset ) G_free( pszMapset ); + if ( pszMap ) G_free( pszMap ); if (bOpened) Vect_close(&map); diff --git a/ogrgrasslayer.cpp b/ogrgrasslayer.cpp index 751db79..d0b6533 100644 --- a/ogrgrasslayer.cpp +++ b/ogrgrasslayer.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * $Id: ogrgrasslayer.cpp 17122 2009-05-25 20:48:40Z rouault $ + * $Id: ogrgrasslayer.cpp 20157 2010-07-28 19:32:04Z rouault $ * * Project: OpenGIS Simple Features Reference Implementation * Purpose: Implements OGRGRASSLayer class. @@ -31,7 +31,7 @@ #include "ogrgrass.h" #include "cpl_conv.h" -CPL_CVSID("$Id: ogrgrasslayer.cpp 17122 2009-05-25 20:48:40Z rouault $"); +CPL_CVSID("$Id: ogrgrasslayer.cpp 20157 2010-07-28 19:32:04Z rouault $"); /************************************************************************/ /* OGRGRASSLayer() */ @@ -212,7 +212,7 @@ OGRGRASSLayer::OGRGRASSLayer( int layerIndex, struct Map_info * map ) if ( srsWkt ) { poSRS = new OGRSpatialReference ( srsWkt ); - CPLFree ( srsWkt ); + G_free ( srsWkt ); } G_free_key_value(projinfo); @@ -245,7 +245,7 @@ OGRGRASSLayer::~OGRGRASSLayer() if ( paFeatureIndex ) CPLFree ( paFeatureIndex ); - if ( poLink ) CPLFree ( poLink ); + if ( poLink ) G_free ( poLink ); Vect_destroy_line_struct ( poPoints ); Vect_destroy_cats_struct ( poCats ); @@ -640,7 +640,11 @@ bool OGRGRASSLayer::SetSpatialMatch() Vect_cidx_get_cat_by_index ( poMap, iLayerIndex, cidx, &cat, &type, &id ); +#if GRASS_VERSION_MAJOR >= 7 + struct bound_box box; +#else BOUND_BOX box; +#endif switch ( type ) { @@ -781,7 +785,7 @@ OGRFeature *OGRGRASSLayer::GetNextFeature() OGRFeature *OGRGRASSLayer::GetFeature( long nFeatureId ) { - CPLDebug ( "GRASS", "OGRGRASSLayer::GetFeature nFeatureId = %d", nFeatureId ); + CPLDebug ( "GRASS", "OGRGRASSLayer::GetFeature nFeatureId = %ld", nFeatureId ); int cat; OGRFeature *poFeature = NULL; @@ -857,7 +861,7 @@ OGRFeature *OGRGRASSLayer::GetFeature( long nFeatureId ) /************************************************************************/ OGRGeometry *OGRGRASSLayer::GetFeatureGeometry ( long nFeatureId, int *cat ) { - CPLDebug ( "GRASS", "OGRGRASSLayer::GetFeatureGeometry nFeatureId = %d", nFeatureId ); + CPLDebug ( "GRASS", "OGRGRASSLayer::GetFeatureGeometry nFeatureId = %ld", nFeatureId ); int cidx = paFeatureIndex[(int)nFeatureId]; @@ -1027,7 +1031,11 @@ int OGRGRASSLayer::GetFeatureCount( int bForce ) /************************************************************************/ OGRErr OGRGRASSLayer::GetExtent (OGREnvelope *psExtent, int bForce) { +#if GRASS_VERSION_MAJOR >= 7 + struct bound_box box; +#else BOUND_BOX box; +#endif Vect_get_map_box ( poMap, &box ); -- GRASS extension for the GDAL library _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel