Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (119)
7d947d3c
Update Vcs-* URLs to use HTTPS.
Jan 24, 2016
a2310d62
Merge branch 'master' into experimental
Feb 06, 2016
028545e5
Merge tag 'upstream/1.11.4' into experimental
Feb 06, 2016
e50e1be1
New upstream release.
Feb 06, 2016
d9863bf9
Update branch in gbp.conf & Vcs-Git URL.
Feb 06, 2016
b53425a9
Bump Standards-Version to 3.9.7, no changes.
Feb 07, 2016
0775b1b9
Update branch in gbp.conf & Vcs-Git URL.
Jul 04, 2016
f3c5b03e
Imported Upstream version 2.1.1~rc1
Jul 04, 2016
32fcb7ed
Merge tag 'upstream/2.1.1_rc1' into experimental-2.1
Jul 04, 2016
17ee22e3
New upstream release candidate.
Jul 04, 2016
4c364696
Move control file generation to separate templates target.
Jul 04, 2016
5fc618d5
Set distribution to experimental.
Jul 04, 2016
f172992b
Imported Upstream version 2.1.1
Jul 13, 2016
ab1b3130
Merge tag 'upstream/2.1.1' into experimental-2.1
Jul 13, 2016
559f6035
New upstream release.
Jul 13, 2016
6a3264de
Update watch file to use HTTPS for trac.osgeo.org.
Jul 13, 2016
8634159e
Set distribution to experimental.
Jul 13, 2016
f4f851cc
Revert "Update branch in gbp.conf & Vcs-Git URL."
Jul 13, 2016
208cea96
Move from experimental to unstable.
Jul 13, 2016
7ab7f546
Add metapackage to pull in the version specific binary package.
Aug 06, 2016
c61b6ef6
Set distribution to experimental.
Aug 06, 2016
c5e25344
Move from experimental to unstable.
Aug 10, 2016
cca9c46f
Bump minimum GRASS version to 7.0.5.
Oct 02, 2016
226cf23a
Set distribution to unstable.
Oct 02, 2016
901891f2
Update branch in gbp.conf & Vcs-Git URL.
Oct 14, 2016
31ed6790
Imported Upstream version 2.1.2~rc1
Oct 14, 2016
47274566
Merge tag 'upstream/2.1.2_rc1' into experimental-2.1
Oct 14, 2016
b925818e
New upstream release candidate.
Oct 14, 2016
c145dd01
Set distribution to experimental.
Oct 14, 2016
f42c6ce3
Merge tag 'upstream/2.1.2' into experimental-2.1
Oct 27, 2016
90bcbaf2
Imported Upstream version 2.1.2
Oct 27, 2016
32234921
New upstream release.
Oct 27, 2016
f91f059e
Set distribution to experimental.
Oct 27, 2016
f37766ac
Update branch in gbp.conf & Vcs-Git URL.
Oct 28, 2016
ba75d226
Move from experimental to unstable.
Oct 28, 2016
f20a4423
Update branch in gbp.conf & Vcs-Git URL.
Oct 28, 2016
80af2292
Bump minimum GRASS version to 7.2.0~rc1.
Oct 28, 2016
a813793a
Set distribution to experimental.
Oct 28, 2016
caeca5d1
Revert "Update branch in gbp.conf & Vcs-Git URL."
Dec 28, 2016
1260020c
Bump minimum GRASS version to 7.2.0.
Dec 28, 2016
5281bf4a
Set distribution to unstable.
Dec 28, 2016
c6b0b81c
Update rpath patch for GRASS 7.2.
Jan 16, 2017
1e6bfaac
Set distribution to unstable.
Jan 16, 2017
112a2f56
Add patch to link GRASS 7.2 libraries.
Jan 17, 2017
4b65e8e6
Set distribution to unstable.
Jan 17, 2017
9b9444db
Mark grass72.patch as Applied-Upstream.
Jan 17, 2017
86e95e08
Update branch in gbp.conf & Vcs-Git URL.
Jan 20, 2017
1591ed69
Imported Upstream version 2.1.3~rc1
Jan 20, 2017
0f4b2a9c
Merge tag 'upstream/2.1.3_rc1' into experimental-2.1
Jan 20, 2017
245a6d9d
New upstream release candidate.
Jan 20, 2017
83f6ba74
Drop grass72.patch, applied upstream. Refresh remaining patch.
Jan 20, 2017
1e4a3c7e
Set distribution to experimental.
Jan 20, 2017
aa6f8a68
Rename library package to libgdal-grass, drop now obsolete metapackage.
Jan 21, 2017
e1fa5013
Set distribution to experimental.
Jan 21, 2017
f9fb5f0b
Add Breaks/Replaces for old version specific binary packages.
Jan 26, 2017
ea211461
Set distribution to experimental.
Jan 26, 2017
d114d98e
Imported Upstream version 2.1.3
Jan 27, 2017
e241a13f
Merge tag 'upstream/2.1.3' into experimental-2.1
Jan 27, 2017
67a241c3
New upstream release.
Jan 27, 2017
2be83a53
Set distribution to experimental.
Jan 27, 2017
9cbed33b
Enable PIE hardening flags.
Apr 02, 2017
1d56cec0
Set distribution to unstable.
Apr 02, 2017
3e81a618
Merge branch 'experimental-2.1' into experimental
Apr 03, 2017
b27fd996
Merge tag 'debian/2.1.2-5' into experimental
Apr 03, 2017
0735fb84
Merge changes from libgdal-grass (2.1.2-5).
Apr 03, 2017
da1079cb
Set distribution to experimental.
Apr 03, 2017
6fe5c244
Update branch in gbp.conf & Vcs-Git URL.
Apr 14, 2017
657d90a9
Merge tag 'upstream/2.2.0_beta1' into experimental-2.2
Apr 14, 2017
2757bea2
Imported Upstream version 2.2.0~beta1
Apr 14, 2017
ca66ed93
New upstream beta release.
Apr 14, 2017
3a3bc1a0
Drop Breaks/Replaces for old binary packages, 2.2 subdirectory now used.
Apr 15, 2017
d77917b9
Set distribution to experimental.
Apr 15, 2017
41a727cb
Imported Upstream version 2.2.0~beta2
Apr 23, 2017
0950a611
Merge tag 'upstream/2.2.0_beta2' into experimental-2.2
Apr 23, 2017
0cb4f0fc
New upstream beta release.
Apr 23, 2017
7b610174
Imported Upstream version 2.2.0~rc1
Apr 28, 2017
22bb8f12
Merge tag 'upstream/2.2.0_rc1' into experimental-2.2
Apr 28, 2017
d2f66871
New upstream release candidate.
Apr 28, 2017
e66d553c
Bump minimum GRASS version to 7.2.1.
May 03, 2017
5d379bbc
Imported Upstream version 2.2.0
May 09, 2017
2026ac3c
Merge tag 'upstream/2.2.0' into experimental-2.2
May 09, 2017
3e3cfe3b
New upstream release.
May 09, 2017
f8d80531
Set distribution to experimental.
May 09, 2017
3ceb4361
Disable PIE on Ubuntu where it's still problematic.
Jun 04, 2017
ad6ba111
Bump minimum GRASS version to 7.2.1.
Jun 18, 2017
ae6eeea6
Bump Standards-Version to 4.0.0, no changes.
Jun 18, 2017
3ca0e20e
Add autopkgtest to test installability.
Jun 18, 2017
89d602bd
Set distribution to unstable.
Jun 18, 2017
7b98dcac
Bump Standards-Version to 4.0.0, no changes.
Jun 18, 2017
e2bc8d99
Add autopkgtest to test installability.
Jun 18, 2017
bec5ab81
New upstream version 2.2.1~rc1
Jun 23, 2017
cef8c0ab
Merge tag 'upstream/2.2.1_rc1' into experimental-2.2
Jun 23, 2017
eaf2a979
New upstream release candidate.
Jun 23, 2017
4a67dd4f
Set distribution to experimental.
Jun 23, 2017
e40aa7c9
New upstream version 2.2.1
Jun 30, 2017
2121f57d
Merge tag 'upstream/2.2.1' into experimental-2.2
Jun 30, 2017
518194d2
New upstream release.
Jun 30, 2017
e44027e2
Set distribution to experimental.
Jun 30, 2017
0dd596ff
Merge branch 'experimental-2.2'
Jul 10, 2017
41f679b5
Update branches in gbp.conf.
Jul 10, 2017
Show whitespace changes
Inline
Side-by-side
Makefile.in
View file @
8cfef0c0
...
...
@@ -14,8 +14,6 @@ LD_SHARED = @LD_SHARED@
LIBS
=
@LIBS@
GRASSTABLES_DIR
=
@prefix@/share/gdal/grass
AUTOLOAD_DIR
=
@AUTOLOAD_DIR@
GLIBNAME
=
gdal_GRASS.so
...
...
@@ -27,17 +25,6 @@ install: default
install
-d
$(
AUTOLOAD_DIR
)
cp
$(
GLIBNAME
)
$(
AUTOLOAD_DIR
)
cp
$(
OLIBNAME
)
$(
AUTOLOAD_DIR
)
test
-d
${
GRASSTABLES_DIR
}
||
mkdir
${
GRASSTABLES_DIR
}
test
-d
${
GRASSTABLES_DIR
}
/etc
||
mkdir
${
GRASSTABLES_DIR
}
/etc
test
!
-e
@GRASS_GISBASE@/etc/ellipse.table
||
cp
@GRASS_GISBASE@/etc/ellipse.table
${
GRASSTABLES_DIR
}
/etc
test
!
-e
@GRASS_GISBASE@/etc/datum.table
||
cp
@GRASS_GISBASE@/etc/datum.table
${
GRASSTABLES_DIR
}
/etc
test
!
-e
@GRASS_GISBASE@/etc/datumtransform.table
||
cp
@GRASS_GISBASE@/etc/datumtransform.table
${
GRASSTABLES_DIR
}
/etc
test
!
-e
@GRASS_GISBASE@/etc/proj/ellipse.table
||
cp
@GRASS_GISBASE@/etc/proj/ellipse.table
${
GRASSTABLES_DIR
}
/etc
test
!
-e
@GRASS_GISBASE@/etc/proj/datum.table
||
cp
@GRASS_GISBASE@/etc/proj/datum.table
${
GRASSTABLES_DIR
}
/etc
test
!
-e
@GRASS_GISBASE@/etc/proj/datumtransform.table
||
cp
@GRASS_GISBASE@/etc/proj/datumtransform.table
${
GRASSTABLES_DIR
}
/etc
test
-d
${
GRASSTABLES_DIR
}
/driver
||
mkdir
${
GRASSTABLES_DIR
}
/driver
test
-d
${
GRASSTABLES_DIR
}
/driver/db
||
mkdir
${
GRASSTABLES_DIR
}
/driver/db
cp
-r
@GRASS_GISBASE@/driver/db/
*
${
GRASSTABLES_DIR
}
/driver/db/
clean
:
rm
-f
$(
OLIBNAME
)
$(
GLIBNAME
)
*
.o
...
...
README
View file @
8cfef0c0
VERSION
View file @
8cfef0c0
2.
1.0
2.
2.2
aclocal.m4
View file @
8cfef0c0
configure
View file @
8cfef0c0
...
...
@@ -626,6 +626,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
...
...
@@ -703,6 +704,7 @@ datadir='${datarootdir}'
sysconfdir
=
'${prefix}/etc'
sharedstatedir
=
'${prefix}/com'
localstatedir
=
'${prefix}/var'
runstatedir
=
'${localstatedir}/run'
includedir
=
'${prefix}/include'
oldincludedir
=
'/usr/include'
docdir
=
'${datarootdir}/doc/${PACKAGE}'
...
...
@@ -955,6 +957,15 @@ do
|
-silent
|
--silent
|
--silen
|
--sile
|
--sil
)
silent
=
yes
;;
-runstatedir
|
--runstatedir
|
--runstatedi
|
--runstated
\
|
--runstate
|
--runstat
|
--runsta
|
--runst
|
--runs
\
|
--run
|
--ru
|
--r
)
ac_prev
=
runstatedir
;;
-runstatedir
=
*
|
--runstatedir
=
*
|
--runstatedi
=
*
|
--runstated
=
*
\
|
--runstate
=
*
|
--runstat
=
*
|
--runsta
=
*
|
--runst
=
*
|
--runs
=
*
\
|
--run
=
*
|
--ru
=
*
|
--r
=
*
)
runstatedir
=
$ac_optarg
;;
-sbindir
|
--sbindir
|
--sbindi
|
--sbind
|
--sbin
|
--sbi
|
--sb
)
ac_prev
=
sbindir
;;
-sbindir
=
*
|
--sbindir
=
*
|
--sbindi
=
*
|
--sbind
=
*
|
--sbin
=
*
\
...
...
@@ -1092,7 +1103,7 @@ fi
for
ac_var
in
exec_prefix prefix bindir sbindir libexecdir datarootdir
\
datadir sysconfdir sharedstatedir localstatedir includedir
\
oldincludedir docdir infodir htmldir dvidir pdfdir psdir
\
libdir localedir mandir
libdir localedir mandir
runstatedir
do
eval
ac_val
=
\$
$ac_var
# Remove trailing slashes.
...
...
@@ -1245,6 +1256,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
...
...
@@ -3279,6 +3291,49 @@ fi
if
test
"
$with_grass
"
!=
"yes"
;
then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for G_read_compressed in -lgrass_gis"
>
&5
$as_echo_n
"checking for G_read_compressed in -lgrass_gis... "
>
&6
;
}
if
${
ac_cv_lib_grass_gis_G_read_compressed
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_check_lib_save_LIBS
=
$LIBS
LIBS
=
"-lgrass_gis -L
$with_grass
/lib -lgrass_datetime
$LIBS
"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char G_read_compressed ();
int
main ()
{
return G_read_compressed ();
;
return 0;
}
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
ac_cv_lib_grass_gis_G_read_compressed
=
yes
else
ac_cv_lib_grass_gis_G_read_compressed
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_lib_save_LIBS
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_lib_grass_gis_G_read_compressed
"
>
&5
$as_echo
"
$ac_cv_lib_grass_gis_G_read_compressed
"
>
&6
;
}
if
test
"x
$ac_cv_lib_grass_gis_G_read_compressed
"
=
xyes
;
then
:
GRASS_SETTING
=
grass72+
else
GRASS_SETTING
=
no
fi
if
test
"
$GRASS_SETTING
"
=
"no"
;
then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for G_is_initialized in -lgrass_gis"
>
&5
$as_echo_n
"checking for G_is_initialized in -lgrass_gis... "
>
&6
;
}
if
${
ac_cv_lib_grass_gis_G_is_initialized
+
:
}
false
;
then
:
...
...
@@ -3365,9 +3420,14 @@ else
fi
fi
fi
if
test
"
$GRASS_SETTING
"
!=
"no"
;
then
if
test
"
$GRASS_SETTING
"
=
"grass70+"
;
then
if
test
"
$GRASS_SETTING
"
=
"grass72+"
;
then
G_RASTLIBS
=
"-lgrass_raster -lgrass_imagery"
G_VECTLIBS
=
"-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
LIBS
=
"-L
$with_grass
/lib
$G_VECTLIBS
$G_RASTLIBS
-lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_btree2 -lgrass_ccmath
$LIBS
"
elif
test
"
$GRASS_SETTING
"
=
"grass70+"
;
then
G_RASTLIBS
=
"-lgrass_raster -lgrass_imagery"
G_VECTLIBS
=
"-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
LIBS
=
"-L
$with_grass
/lib
$G_VECTLIBS
$G_RASTLIBS
-lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime
$LIBS
"
...
...
configure.in
View file @
8cfef0c0
dnl ***************************************************************************
dnl $Id: configure.in
3
371
7
201
6
-0
3
-1
4
0
6:29:14Z goatbar
$
dnl $Id: configure.in 371
60
201
7
-0
1
-1
7
0
7:34:22Z rouault
$
dnl
dnl Project: GDAL GRASS Plugin
dnl Purpose: Configure source file.
...
...
@@ -123,13 +123,20 @@ fi
if test "$with_grass" != "yes" ; then
AC_CHECK_LIB(grass_gis,G_read_compressed,GRASS_SETTING=grass72+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
if test "$GRASS_SETTING" = "no" ; then
AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
if test "$GRASS_SETTING" = "no" ; then
AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
fi
fi
if test "$GRASS_SETTING" != "no" ; then
if test "$GRASS_SETTING" = "grass70+" ; then
if test "$GRASS_SETTING" = "grass72+" ; then
G_RASTLIBS="-lgrass_raster -lgrass_imagery"
G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_btree2 -lgrass_ccmath $LIBS"
elif test "$GRASS_SETTING" = "grass70+" ; then
G_RASTLIBS="-lgrass_raster -lgrass_imagery"
G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
...
...
debian/changelog
View file @
8cfef0c0
libgdal-grass (2.2.2-1~trusty2) trusty; urgency=medium
* Rebuild for trusty.
* Bump minimum version to GRASS 7.4.0.
-- Martin Landa <landa.martin@gmail.com> Sun, 28 Jan 2018 19:51:49 +0100
libgdal-grass (2.2.2-1) unstable; urgency=medium
* Bump Standards-Version to 4.1.1, no changes.
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Tue, 03 Oct 2017 20:02:16 +0200
libgdal-grass (2.2.2-1~exp1) experimental; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.1.0, no changes.
-- Bas Couwenberg <sebastic@debian.org> Fri, 22 Sep 2017 15:07:24 +0200
libgdal-grass (2.2.2~rc1-1~exp1) experimental; urgency=medium
* New upstream release candidate.
-- Bas Couwenberg <sebastic@debian.org> Sat, 16 Sep 2017 02:21:56 +0200
libgdal-grass (2.2.1-2) unstable; urgency=medium
* Bump minimum GRASS version to 7.2.2.
-- Bas Couwenberg <sebastic@debian.org> Sat, 16 Sep 2017 16:42:42 +0200
libgdal-grass (2.2.1-1) unstable; urgency=medium
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Mon, 10 Jul 2017 18:31:09 +0200
libgdal-grass (2.2.1-1~exp1) experimental; urgency=medium
* New upstream release.
-- Bas Couwenberg <sebastic@debian.org> Fri, 30 Jun 2017 15:04:00 +0200
libgdal-grass (2.2.1~rc1-1~exp1) experimental; urgency=medium
* New upstream release candidate.
* Disable PIE on Ubuntu where it's still problematic.
* Bump Standards-Version to 4.0.0, no changes.
* Add autopkgtest to test installability.
-- Bas Couwenberg <sebastic@debian.org> Fri, 23 Jun 2017 17:07:35 +0200
libgdal-grass (2.2.0-1~exp1) experimental; urgency=medium
* New upstream release.
* Bump minimum GRASS version to 7.2.1.
-- Bas Couwenberg <sebastic@debian.org> Tue, 09 May 2017 18:23:57 +0200
libgdal-grass (2.2.0~beta1-1~exp1) experimental; urgency=medium
* New upstream beta release.
* Drop Breaks/Replaces for old binary packages, 2.2 subdirectory now used.
-- Bas Couwenberg <sebastic@debian.org> Sat, 15 Apr 2017 12:17:42 +0200
libgdal-grass (2.1.3-1~exp2) experimental; urgency=medium
* Merge changes from libgdal-grass (2.1.2-5).
-- Bas Couwenberg <sebastic@debian.org> Mon, 03 Apr 2017 01:22:02 +0200
libgdal-grass (2.1.3-1~exp1) experimental; urgency=medium
* New upstream release.
-- Bas Couwenberg <sebastic@debian.org> Fri, 27 Jan 2017 13:12:12 +0100
libgdal-grass (2.1.3~rc1-1~exp3) experimental; urgency=medium
* Add Breaks/Replaces for old version specific binary packages.
-- Bas Couwenberg <sebastic@debian.org> Thu, 26 Jan 2017 21:11:06 +0100
libgdal-grass (2.1.3~rc1-1~exp2) experimental; urgency=medium
* Rename library package to libgdal-grass, drop now obsolete metapackage.
-- Bas Couwenberg <sebastic@debian.org> Sat, 21 Jan 2017 12:20:20 +0100
libgdal-grass (2.1.3~rc1-1~exp1) experimental; urgency=medium
* New upstream release candidate.
* Drop grass72.patch, applied upstream. Refresh remaining patch.
-- Bas Couwenberg <sebastic@debian.org> Fri, 20 Jan 2017 11:41:22 +0100
libgdal-grass (2.1.2-6) unstable; urgency=medium
* Bump minimum GRASS version to 7.2.1.
* Bump Standards-Version to 4.0.0, no changes.
* Add autopkgtest to test installability.
-- Bas Couwenberg <sebastic@debian.org> Sun, 18 Jun 2017 19:46:34 +0200
libgdal-grass (2.1.2-5) unstable; urgency=medium
* Enable PIE hardening flags.
-- Bas Couwenberg <sebastic@debian.org> Sun, 02 Apr 2017 23:43:22 +0200
libgdal-grass (2.1.0-1~trusty3) trusty; urgency=medium
* Bump minimum GRASS version to 7.2.0.
...
...
@@ -9,6 +122,49 @@ libgdal-grass (2.1.0-1~trusty3) trusty; urgency=medium
-- Bas Couwenberg <sebastic@debian.org> Tue, 17 Jan 2017 15:23:33 +0100
libgdal-grass (2.1.2-4) unstable; urgency=medium
* Add patch to link GRASS 7.2 libraries.
-- Bas Couwenberg <sebastic@debian.org> Tue, 17 Jan 2017 01:50:21 +0100
libgdal-grass (2.1.2-3) unstable; urgency=medium
* Update rpath patch for GRASS 7.2.
-- Bas Couwenberg <sebastic@debian.org> Mon, 16 Jan 2017 19:15:15 +0100
libgdal-grass (2.1.2-2) unstable; urgency=medium
* Bump minimum GRASS version to 7.2.0.
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Wed, 28 Dec 2016 19:46:06 +0100
libgdal-grass (2.1.2-2~exp1) experimental; urgency=medium
* Bump minimum GRASS version to 7.2.0~rc1.
-- Bas Couwenberg <sebastic@debian.org> Fri, 28 Oct 2016 16:30:08 +0200
libgdal-grass (2.1.2-1) unstable; urgency=medium
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Fri, 28 Oct 2016 00:08:05 +0200
libgdal-grass (2.1.2-1~exp1) experimental; urgency=medium
* New upstream release.
-- Bas Couwenberg <sebastic@debian.org> Thu, 27 Oct 2016 20:20:08 +0200
libgdal-grass (2.1.2~rc1-1~exp1) experimental; urgency=medium
* New upstream release candidate.
-- Bas Couwenberg <sebastic@debian.org> Fri, 14 Oct 2016 19:40:18 +0200
libgdal-grass (2.1.0-1~trusty2) trusty; urgency=medium
* Update branch in gbp.conf & Vcs-Git URL.
...
...
@@ -16,6 +172,44 @@ libgdal-grass (2.1.0-1~trusty2) trusty; urgency=medium
-- Bas Couwenberg <sebastic@debian.org> Mon, 03 Oct 2016 13:13:13 +0200
libgdal-grass (2.1.1-3) unstable; urgency=medium
* Bump minimum GRASS version to 7.0.5.
-- Bas Couwenberg <sebastic@debian.org> Sun, 02 Oct 2016 22:30:08 +0200
libgdal-grass (2.1.1-2) unstable; urgency=medium
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Wed, 10 Aug 2016 15:02:31 +0200
libgdal-grass (2.1.1-2~exp1) experimental; urgency=medium
* Add metapackage to pull in the version specific binary package.
-- Bas Couwenberg <sebastic@debian.org> Sat, 06 Aug 2016 23:04:16 +0200
libgdal-grass (2.1.1-1) unstable; urgency=medium
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Wed, 13 Jul 2016 16:30:03 +0200
libgdal-grass (2.1.1-1~exp1) experimental; urgency=medium
* New upstream release.
* Update watch file to use HTTPS for trac.osgeo.org.
-- Bas Couwenberg <sebastic@debian.org> Wed, 13 Jul 2016 12:11:01 +0200
libgdal-grass (2.1.1~rc1-1~exp1) experimental; urgency=medium
* New upstream release candidate.
* Move control file generation to separate templates target.
-- Bas Couwenberg <sebastic@debian.org> Mon, 04 Jul 2016 21:56:57 +0200
libgdal-grass (2.1.0-1~trusty1) trusty; urgency=medium
* Backport to Trusty.
...
...
@@ -57,6 +251,13 @@ libgdal-grass (2.0.2-1~exp1) experimental; urgency=medium
-- Bas Couwenberg <sebastic@debian.org> Fri, 19 Feb 2016 15:55:24 +0100
libgdal-grass (1.11.4-1) UNRELEASED; urgency=medium
* New upstream release.
* Bump Standards-Version to 3.9.7, no changes.
-- Bas Couwenberg <sebastic@debian.org> Sat, 06 Feb 2016 16:16:29 +0100
libgdal-grass (1.11.3-3) unstable; urgency=medium
* Update Vcs-Git URL to use HTTPS.
...
...
debian/control
View file @
8cfef0c0
...
...
@@ -7,21 +7,21 @@ Priority: optional
Build-Depends: debhelper (>= 9),
dh-autoreconf,
d-shlibs,
grass (>= 7.
2
.0),
grass-dev (>= 7.
2
.0),
libgdal-dev (>= 2.
1.0
),
grass (>= 7.
4
.0),
grass-dev (>= 7.
4
.0),
libgdal-dev (>= 2.
2.2
),
libproj-dev,
libpq-dev,
pkg-config
Standards-Version:
3.9.8
Standards-Version:
4.1.1
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/gdal-grass.git
Vcs-Git: https://anonscm.debian.org/git/pkg-grass/gdal-grass.git -b ubuntu/trusty
Homepage: http://www.gdal.org/
Package: libgdal
20-2.1.0
-grass
Package: libgdal-grass
Architecture: any
Section: libs
Depends: grass7
2
0,
Depends: grass7
4
0,
${shlibs:Depends},
${misc:Depends}
Recommends: gdal-bin
...
...
@@ -32,17 +32,3 @@ Description: GRASS extension for the GDAL library
provides access to GRASS data via GDAL.
.
This package provides the GDAL GRASS plugin.
Package: libgdal-grass
Architecture: all
Section: metapackages
Depends: libgdal20-2.1.0-grass,
${misc:Depends}
Description: GRASS extension for the GDAL library - metapackage
GDAL is a translator library for raster geospatial data formats.
As a library, it presents a single abstract data model to the
calling application for all supported formats. This extension
provides access to GRASS data via GDAL.
.
This metapackage depends on the version specific library package.
debian/control.in
View file @
8cfef0c0
...
...
@@ -7,18 +7,18 @@ Priority: optional
Build-Depends: debhelper (>= 9),
dh-autoreconf,
d-shlibs,
grass (>= 7.
2
.0),
grass-dev (>= 7.
2
.0),
libgdal-dev (>= 2.
1.0
),
grass (>= 7.
4
.0),
grass-dev (>= 7.
4
.0),
libgdal-dev (>= 2.
2.2
),
libproj-dev,
libpq-dev,
pkg-config
Standards-Version:
3.9.8
Standards-Version:
4.1.1
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/gdal-grass.git
Vcs-Git: https://anonscm.debian.org/git/pkg-grass/gdal-grass.git -b ubuntu/trusty
Homepage: http://www.gdal.org/
Package: libgdal
20-2.1.0
-grass
Package: libgdal-grass
Architecture: any
Section: libs
Depends: @GRASS_ABI@,
...
...
@@ -32,17 +32,3 @@ Description: GRASS extension for the GDAL library
provides access to GRASS data via GDAL.
.
This package provides the GDAL GRASS plugin.
Package: libgdal-grass
Architecture: all
Section: metapackages
Depends: libgdal20-2.1.0-grass,
${misc:Depends}
Description: GRASS extension for the GDAL library - metapackage
GDAL is a translator library for raster geospatial data formats.
As a library, it presents a single abstract data model to the
calling application for all supported formats. This extension
provides access to GRASS data via GDAL.
.
This metapackage depends on the version specific library package.
debian/libgdal20-2.1.0-grass.lintian-overrides
deleted
100644 → 0
View file @
f6a3ee3c
# The run path has been added to get GRASS internal library
libgdal20-2.1.0-grass: binary-or-shlib-defines-rpath usr/lib/gdalplugins/*/gdal_GRASS.so /usr/lib/grass*/lib
libgdal20-2.1.0-grass: binary-or-shlib-defines-rpath usr/lib/gdalplugins/*/ogr_GRASS.so /usr/lib/grass*/lib
debian/lintian-overrides
View file @
8cfef0c0
# The run path has been added to get GRASS internal library
libgdal20-2.1.0-grass: binary-or-shlib-defines-rpath usr/lib/gdalplugins/*/gdal_GRASS.so /usr/lib/grass*/lib
libgdal20-2.1.0-grass: binary-or-shlib-defines-rpath usr/lib/gdalplugins/*/ogr_GRASS.so /usr/lib/grass*/lib
libgdal-grass: binary-or-shlib-defines-rpath usr/lib/gdalplugins/*/gdal_GRASS.so /usr/lib/grass*/lib
libgdal-grass: binary-or-shlib-defines-rpath usr/lib/gdalplugins/*/ogr_GRASS.so /usr/lib/grass*/lib
debian/patches/grass72.patch
deleted
100644 → 0
View file @
f6a3ee3c
Description: Add libraries for GRASS 7.2.
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: https://trac.osgeo.org/gdal/ticket/6785
--- a/configure.in
+++ b/configure.in
@@ -123,13 +123,20 @@
fi
if test "$with_grass" != "yes" ; then
- AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ AC_CHECK_LIB(grass_gis,G_read_compressed,GRASS_SETTING=grass72+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
if test "$GRASS_SETTING" = "no" ; then
- AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ if test "$GRASS_SETTING" = "no" ; then
+ AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ fi
fi
if test "$GRASS_SETTING" != "no" ; then
- if test "$GRASS_SETTING" = "grass70+" ; then
+ if test "$GRASS_SETTING" = "grass72+" ; then
+ G_RASTLIBS="-lgrass_raster -lgrass_imagery"
+ G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
+ LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_btree2 -lgrass_ccmath $LIBS"
+ elif test "$GRASS_SETTING" = "grass70+" ; then
G_RASTLIBS="-lgrass_raster -lgrass_imagery"
G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime $LIBS"
debian/patches/rpath
View file @
8cfef0c0
...
...
@@ -4,7 +4,7 @@ Forwarded: not-needed
--- a/Makefile.in
+++ b/Makefile.in
@@ -4
7
,10 +4
7
,10 @@
distclean: clean
@@ -
3
4,10 +
3
4,10 @@
distclean: clean
$(GLIBNAME): grass57dataset.o
...
...
debian/patches/series
View file @
8cfef0c0
rpath
grass72.patch
debian/rules
View file @
8cfef0c0
...
...
@@ -5,7 +5,7 @@
#export DH_VERBOSE=1
# Enable hardening build flags
export
DEB_BUILD_MAINT_OPTIONS
=
hardening
=
+all
,-pie
export
DEB_BUILD_MAINT_OPTIONS
=
hardening
=
+all
PKGNAME
=
$(
shell
grep
Package: debian/control.in |
head
-1
|
cut
-d
' '
-f2
)
GRASS
=
grass
$(
subst .,,
$(
shell pkg-config
--modversion
grass |
cut
-d
.
-f1
,2
))
...
...
debian/tests/control
0 → 100644
View file @
8cfef0c0
# Test installability
Depends: @
Test-Command: /bin/true
grass57dataset.cpp
View file @
8cfef0c0
/******************************************************************************
* $Id: grass57dataset.cpp 33893 2016-04-04 14:08:28Z rouault $
*
* Project: GRASS Driver
* Purpose: Implement GRASS raster read/write support
...
...
@@ -64,10 +63,12 @@ char *GPJ_grass_to_wkt(struct Key_Value *,
#define GRASS_MAX_COLORS 100000 // what is the right value
CPL_CVSID
(
"$Id: grass57dataset.cpp 3
3893
201
6
-04-
04
1
4
:0
8:28
Z rouault $"
);
CPL_CVSID
(
"$Id: grass57dataset.cpp 3
7964
201
7
-04-
11
1
8
:0
4:50
Z rouault $"
);
#if GRASS_VERSION_MAJOR >= 7
#define G_get_cellhd Rast_get_cellhd
#define G_get_window Rast_get_window
#define G_set_window Rast_set_window
#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
...
...
@@ -96,7 +97,7 @@ CPL_CVSID("$Id: grass57dataset.cpp 33893 2016-04-04 14:08:28Z rouault $");
/* Grass2CPLErrorHook() */
/************************************************************************/
int
Grass2CPLErrorHook
(
char
*
pszMessage
,
int
bFatal
)
static
int
Grass2CPLErrorHook
(
char
*
pszMessage
,
int
bFatal
)
{
if
(
!
bFatal
)
...
...
@@ -134,8 +135,8 @@ class GRASSDataset : public GDALDataset
GRASSDataset
();
~
GRASSDataset
();
virtual
const
char
*
GetProjectionRef
(
void
);
virtual
CPLErr
GetGeoTransform
(
double
*
);
virtual
const
char
*
GetProjectionRef
(
void
)
override
;
virtual
CPLErr
GetGeoTransform
(
double
*
)
override
;
static
GDALDataset
*
Open
(
GDALOpenInfo
*
);
...
...
@@ -178,42 +179,40 @@ class GRASSRasterBand : public GDALRasterBand
const
char
*
,
const
char
*
);
virtual
~
GRASSRasterBand
();
virtual
CPLErr
IReadBlock
(
int
,
int
,
void
*
);
virtual
CPLErr
IReadBlock
(
int
,
int
,
void
*
)
override
;
virtual
CPLErr
IRasterIO
(
GDALRWFlag
,
int
,
int
,
int
,
int
,
void
*
,
int
,
int
,
GDALDataType
,
GSpacing
nPixelSpace
,
GSpacing
nLineSpace
,
GDALRasterIOExtraArg
*
psExtraArg
);
virtual
GDALColorInterp
GetColorInterpretation
();
virtual
GDALColorTable
*
GetColorTable
();
virtual
double
GetMinimum
(
int
*
pbSuccess
=
NULL
);
virtual
double
GetMaximum
(
int
*
pbSuccess
=
NULL
);
virtual
double
GetNoDataValue
(
int
*
pbSuccess
=
NULL
);
GDALRasterIOExtraArg
*
psExtraArg
)
override
;
virtual
GDALColorInterp
GetColorInterpretation
()
override
;
virtual
GDALColorTable
*
GetColorTable
()
override
;
virtual
double
GetMinimum
(
int
*
pbSuccess
=
NULL
)
override
;
virtual
double
GetMaximum
(
int
*
pbSuccess
=
NULL
)
override
;
virtual
double
GetNoDataValue
(
int
*
pbSuccess
=
NULL
)
override
;
private:
CPLErr
ResetReading
(
struct
Cell_head
*
);
};
/************************************************************************/
/* GRASSRasterBand() */
/************************************************************************/
GRASSRasterBand
::
GRASSRasterBand
(
GRASSDataset
*
poDS
,
int
nBand
,
const
char
*
pszMapset
,
const
char
*
pszCellName
)
GRASSRasterBand
::
GRASSRasterBand
(
GRASSDataset
*
poDS
In
,
int
nBand
In
,
const
char
*
pszMapset
In
,
const
char
*
pszCellName
In
)
{
struct
Cell_head
sCellInfo
;
// Note: GISDBASE, LOCATION_NAME ans MAPSET was set in GRASSDataset::Open
this
->
poDS
=
poDS
;
this
->
nBand
=
nBand
;
this
->
poDS
=
poDS
In
;
this
->
nBand
=
nBand
In
;
this
->
valid
=
false
;
this
->
pszCellName
=
G_store
(
(
char
*
)
pszCellName
);
this
->
pszMapset
=
G_store
(
(
char
*
)
pszMapset
);
this
->
pszCellName
=
G_store
(
(
char
*
)
pszCellName
In
);
this
->
pszMapset
=
G_store
(
(
char
*
)
pszMapset
In
);
G_get_cellhd
(
(
char
*
)
pszCellName
,
(
char
*
)
pszMapset
,
&
sCellInfo
);
nGRSType
=
G_raster_map_type
(
(
char
*
)
pszCellName
,
(
char
*
)
pszMapset
);
...
...
@@ -295,15 +294,15 @@ GRASSRasterBand::GRASSRasterBand( GRASSDataset *poDS, int nBand,
nativeNulls
=
true
;
}
nBlockXSize
=
poDS
->
nRasterXSize
;
;
nBlockXSize
=
poDS
In
->
nRasterXSize
;
nBlockYSize
=
1
;
G_set_window
(
&
(
((
GRASSDataset
*
)
poDS
)
->
sCellInfo
)
);
G_set_window
(
&
(
poDS
In
->
sCellInfo
)
);
if
(
(
hCell
=
G_open_cell_old
((
char
*
)
pszCellName
,
(
char
*
)
pszMapset
))
<
0
)
{
CPLError
(
CE_Warning
,
CPLE_AppDefined
,
"GRASS: Cannot open raster '%s'"
,
pszCellName
);
return
;
}
G_copy
((
void
*
)
&
sOpenWindow
,
(
void
*
)
&
(
((
GRASSDataset
*
)
poDS
)
->
sCellInfo
),
sizeof
(
struct
Cell_head
));
G_copy
((
void
*
)
&
sOpenWindow
,
(
void
*
)
&
(
poDS
In
->
sCellInfo
),
sizeof
(
struct
Cell_head
));
/* -------------------------------------------------------------------- */
/* Do we have a color table? */
...
...
@@ -450,7 +449,6 @@ CPLErr GRASSRasterBand::ResetReading ( struct Cell_head *sNewWindow )
}
G_copy
((
void
*
)
&
sOpenWindow
,
(
void
*
)
sNewWindow
,
sizeof
(
struct
Cell_head
));
}
else
{
...
...
@@ -470,7 +468,6 @@ CPLErr GRASSRasterBand::ResetReading ( struct Cell_head *sNewWindow )
}
}
return
CE_None
;
}
...
...
@@ -479,7 +476,7 @@ CPLErr GRASSRasterBand::ResetReading ( struct Cell_head *sNewWindow )
/* */
/************************************************************************/
CPLErr
GRASSRasterBand
::
IReadBlock
(
int
nBlockXOff
,
int
nBlockYOff
,
CPLErr
GRASSRasterBand
::
IReadBlock
(
int
/*
nBlockXOff
*/
,
int
nBlockYOff
,
void
*
pImage
)
{
...
...
@@ -491,9 +488,7 @@ CPLErr GRASSRasterBand::IReadBlock( int nBlockXOff, int nBlockYOff,
}
if
(
eDataType
==
GDT_Byte
||
eDataType
==
GDT_UInt16
)
{
CELL
*
cbuf
;
cbuf
=
G_allocate_c_raster_buf
();
CELL
*
cbuf
=
G_allocate_c_raster_buf
();
G_get_c_raster_row
(
hCell
,
cbuf
,
nBlockYOff
);
/* Reset NULLs */
...
...
@@ -507,12 +502,17 @@ CPLErr GRASSRasterBand::IReadBlock( int nBlockXOff, int nBlockYOff,
nBlockXSize
);
G_free
(
cbuf
);
}
else
if
(
eDataType
==
GDT_Int32
)
{
}
else
if
(
eDataType
==
GDT_Int32
)
{
G_get_c_raster_row
(
hCell
,
(
CELL
*
)
pImage
,
nBlockYOff
);
}
else
if
(
eDataType
==
GDT_Float32
)
{
}
else
if
(
eDataType
==
GDT_Float32
)
{
G_get_f_raster_row
(
hCell
,
(
FCELL
*
)
pImage
,
nBlockYOff
);
}
else
if
(
eDataType
==
GDT_Float64
)
{
}
else
if
(
eDataType
==
GDT_Float64
)
{
G_get_d_raster_row
(
hCell
,
(
DCELL
*
)
pImage
,
nBlockYOff
);
}
...
...
@@ -530,7 +530,7 @@ CPLErr GRASSRasterBand::IRasterIO ( GDALRWFlag eRWFlag,
GDALDataType
eBufType
,
GSpacing
nPixelSpace
,
GSpacing
nLineSpace
,
GDALRasterIOExtraArg
*
psExtraArg
)
GDALRasterIOExtraArg
*
/*
psExtraArg
*/
)
{
/* GRASS library does that, we have only calculate and reset the region in map units
* and if the region has changed, reopen the raster */
...
...
@@ -539,6 +539,7 @@ CPLErr GRASSRasterBand::IRasterIO ( GDALRWFlag eRWFlag,
struct
Cell_head
sWindow
;
struct
Cell_head
*
psDsWindow
;
if
(
eRWFlag
!=
GF_Read
)
return
CE_Failure
;
if
(
!
this
->
valid
)
return
CE_Failure
;
psDsWindow
=
&
(((
GRASSDataset
*
)
poDS
)
->
sCellInfo
);
...
...
@@ -719,7 +720,6 @@ double GRASSRasterBand::GetNoDataValue( int *pbSuccess )
/* ==================================================================== */
/************************************************************************/
/************************************************************************/
/* GRASSDataset() */
/************************************************************************/
...
...
@@ -734,6 +734,9 @@ GRASSDataset::GRASSDataset()
adfGeoTransform
[
3
]
=
0.0
;
adfGeoTransform
[
4
]
=
0.0
;
adfGeoTransform
[
5
]
=
1.0
;
pszGisdbase
=
NULL
;
pszLocation
=
NULL
;
pszElement
=
NULL
;
}
/************************************************************************/
...
...
@@ -790,10 +793,16 @@ CPLErr GRASSDataset::GetGeoTransform( double * padfGeoTransform )
bool
GRASSDataset
::
SplitPath
(
char
*
path
,
char
**
gisdbase
,
char
**
location
,
char
**
mapset
,
char
**
element
,
char
**
name
)
{
char
*
p
,
*
ptr
[
5
],
*
tmp
;
char
*
p
;
char
*
ptr
[
5
];
char
*
tmp
;
int
i
=
0
;
*
gisdbase
=
*
location
=
*
mapset
=
*
element
=
*
name
=
NULL
;
*
gisdbase
=
NULL
;
*
location
=
NULL
;
*
mapset
=
NULL
;
*
element
=
NULL
;
*
name
=
NULL
;
if
(
!
path
||
strlen
(
path
)
==
0
)
return
false
;
...
...
@@ -862,7 +871,6 @@ GDALDataset *GRASSDataset::Open( GDALOpenInfo * poOpenInfo )
// Set error function
G_set_error_routine
(
(
GrassErrorHandler
)
Grass2CPLErrorHook
);
// GISBASE is path to the directory where GRASS is installed,
if
(
!
getenv
(
"GISBASE"
)
)
{
static
char
*
gisbaseEnv
=
NULL
;
...
...
@@ -946,9 +954,7 @@ GDALDataset *GRASSDataset::Open( GDALOpenInfo * poOpenInfo )
/* -------------------------------------------------------------------- */
/* Create a corresponding GDALDataset. */
/* -------------------------------------------------------------------- */
GRASSDataset
*
poDS
;
poDS
=
new
GRASSDataset
();
GRASSDataset
*
poDS
=
new
GRASSDataset
();
/* notdef: should only allow read access to an existing cell, right? */
poDS
->
eAccess
=
poOpenInfo
->
eAccess
;
...
...
ogrgrass.h
View file @
8cfef0c0
/******************************************************************************
* $Id: ogrgrass.h 3
3713
2016-
03-12 17:41:57Z goatbar
$
* $Id: ogrgrass.h 3
6501
2016-
11-25 14:09:24Z rouault
$
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Private definitions for OGR/GRASS driver.
...
...
@@ -51,34 +51,29 @@ class OGRGRASSLayer : public OGRLayer
{
public:
OGRGRASSLayer
(
int
layer
,
struct
Map_info
*
map
);
~
OGRGRASSLayer
();
virtual
~
OGRGRASSLayer
();
// Layer info
OGRFeatureDefn
*
GetLayerDefn
()
{
return
poFeatureDefn
;
}
GIntBig
GetFeatureCount
(
int
);
OGRErr
GetExtent
(
OGREnvelope
*
psExtent
,
int
bForce
);
virtual
OGRErr
GetExtent
(
int
iGeomField
,
OGREnvelope
*
psExtent
,
int
bForce
)
OGRFeatureDefn
*
GetLayerDefn
()
override
{
return
poFeatureDefn
;
}
GIntBig
GetFeatureCount
(
int
)
override
;
OGRErr
GetExtent
(
OGREnvelope
*
psExtent
,
int
bForce
)
override
;
virtual
OGRErr
GetExtent
(
int
iGeomField
,
OGREnvelope
*
psExtent
,
int
bForce
)
override
{
return
OGRLayer
::
GetExtent
(
iGeomField
,
psExtent
,
bForce
);
}
virtual
OGRSpatialReference
*
GetSpatialRef
();
int
TestCapability
(
const
char
*
);
virtual
OGRSpatialReference
*
GetSpatialRef
()
override
;
int
TestCapability
(
const
char
*
)
override
;
// Reading
void
ResetReading
();
virtual
OGRErr
SetNextByIndex
(
GIntBig
nIndex
);
OGRFeature
*
GetNextFeature
();
OGRFeature
*
GetFeature
(
GIntBig
nFeatureId
);
void
ResetReading
()
override
;
virtual
OGRErr
SetNextByIndex
(
GIntBig
nIndex
)
override
;
OGRFeature
*
GetNextFeature
()
override
;
OGRFeature
*
GetFeature
(
GIntBig
nFeatureId
)
override
;
// Filters
virtual
OGRErr
SetAttributeFilter
(
const
char
*
query
);
virtual
void
SetSpatialFilter
(
OGRGeometry
*
poGeomIn
);
virtual
void
SetSpatialFilter
(
int
iGeomField
,
OGRGeometry
*
poGeom
)
virtual
OGRErr
SetAttributeFilter
(
const
char
*
query
)
override
;
virtual
void
SetSpatialFilter
(
OGRGeometry
*
poGeomIn
)
override
;
virtual
void
SetSpatialFilter
(
int
iGeomField
,
OGRGeometry
*
poGeom
)
override
{
OGRLayer
::
SetSpatialFilter
(
iGeomField
,
poGeom
);
}
// Write access, not supported:
virtual
OGRErr
CreateField
(
OGRFieldDefn
*
poField
,
int
bApproxOK
=
TRUE
);
OGRErr
ISetFeature
(
OGRFeature
*
poFeature
);
OGRErr
ICreateFeature
(
OGRFeature
*
poFeature
);
private
:
char
*
pszName
;
OGRSpatialReference
*
poSRS
;
...
...
@@ -134,23 +129,16 @@ class OGRGRASSDataSource : public OGRDataSource
{
public:
OGRGRASSDataSource
();
~
OGRGRASSDataSource
();
virtual
~
OGRGRASSDataSource
();
int
Open
(
const
char
*
,
int
bUpdate
,
int
bTestOpen
,
int
bSingleNewFile
=
FALSE
);
const
char
*
GetName
()
{
return
pszName
;
}
int
GetLayerCount
()
{
return
nLayers
;
}
OGRLayer
*
GetLayer
(
int
);
int
TestCapability
(
const
char
*
);
// Not implemented (returns NULL):
virtual
OGRLayer
*
ICreateLayer
(
const
char
*
,
OGRSpatialReference
*
=
NULL
,
OGRwkbGeometryType
=
wkbUnknown
,
char
**
=
NULL
);
const
char
*
GetName
()
override
{
return
pszName
;
}
int
GetLayerCount
()
override
{
return
nLayers
;
}
OGRLayer
*
GetLayer
(
int
)
override
;
int
TestCapability
(
const
char
*
)
override
;
private
:
OGRGRASSLayer
**
papoLayers
;
...
...
@@ -174,17 +162,12 @@ class OGRGRASSDataSource : public OGRDataSource
class
OGRGRASSDriver
:
public
OGRSFDriver
{
public:
~
OGRGRASSDriver
();
const
char
*
GetName
();
OGRDataSource
*
Open
(
const
char
*
,
int
);
virtual
~
OGRGRASSDriver
();
int
TestCapability
(
const
char
*
);
const
char
*
GetName
()
override
;
OGRDataSource
*
Open
(
const
char
*
,
int
)
override
;
// Not implemented (return error/NULL):
virtual
OGRDataSource
*
CreateDataSource
(
const
char
*
pszName
,
char
**
=
NULL
);
OGRErr
DeleteDataSource
(
const
char
*
pszDataSource
);
int
TestCapability
(
const
char
*
)
override
;
};
#endif
/* ndef OGRGRASS_H_INCLUDED */
ogrgrassdatasource.cpp
View file @
8cfef0c0
/******************************************************************************
* $Id: ogrgrassdatasource.cpp 33713 2016-03-12 17:41:57Z goatbar $
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Implements OGRGRASSDataSource class.
...
...
@@ -32,7 +31,7 @@
#include
"cpl_conv.h"
#include
"cpl_string.h"
CPL_CVSID
(
"$Id: ogrgrassdatasource.cpp 3
3713
2016-
03-12 17:41:57Z goatbar
$"
);
CPL_CVSID
(
"$Id: ogrgrassdatasource.cpp 3
6368
2016-
11-21 01:47:49Z rouault
$"
);
#if GRASS_VERSION_MAJOR >= 7
#define G__setenv G_setenv_nogisrc
...
...
@@ -41,7 +40,7 @@ CPL_CVSID("$Id: ogrgrassdatasource.cpp 33713 2016-03-12 17:41:57Z goatbar $");
/************************************************************************/
/* Grass2CPLErrorHook() */
/************************************************************************/
int
Grass2OGRErrorHook
(
char
*
pszMessage
,
int
bFatal
)
static
int
Grass2OGRErrorHook
(
char
*
pszMessage
,
int
bFatal
)
{
if
(
!
bFatal
)
CPLError
(
CE_Warning
,
CPLE_AppDefined
,
"GRASS warning: %s"
,
pszMessage
);
...
...
@@ -95,8 +94,8 @@ typedef int (*GrassErrorHandler)(const char *, int);
typedef
int
(
*
GrassErrorHandler
)(
char
*
,
int
);
#endif
int
OGRGRASSDataSource
::
Open
(
const
char
*
pszNewName
,
int
bUpdate
,
int
bTestOpen
,
int
bSingleNewFileIn
)
int
OGRGRASSDataSource
::
Open
(
const
char
*
pszNewName
,
int
/*
bUpdate
*/
,
int
bTestOpen
,
int
/*
bSingleNewFileIn
*/
)
{
VSIStatBuf
stat
;
...
...
@@ -215,9 +214,7 @@ int OGRGRASSDataSource::Open( const char * pszNewName, int bUpdate,
for
(
int
i
=
0
;
i
<
ncidx
;
i
++
)
{
// Create the layer object
OGRGRASSLayer
*
poLayer
;
poLayer
=
new
OGRGRASSLayer
(
i
,
&
map
);
OGRGRASSLayer
*
poLayer
=
new
OGRGRASSLayer
(
i
,
&
map
);
// Add layer to data source layer list
papoLayers
=
(
OGRGRASSLayer
**
)
...
...
@@ -230,26 +227,10 @@ int OGRGRASSDataSource::Open( const char * pszNewName, int bUpdate,
return
TRUE
;
}
/************************************************************************/
/* ICreateLayer() */
/************************************************************************/
OGRLayer
*
OGRGRASSDataSource
::
ICreateLayer
(
const
char
*
pszLayerName
,
OGRSpatialReference
*
poSRS
,
OGRwkbGeometryType
eType
,
char
**
papszOptions
)
{
CPLError
(
CE_Failure
,
CPLE_NoWriteAccess
,
"CreateLayer is not supported by GRASS driver"
);
return
NULL
;
}
/************************************************************************/
/* TestCapability() */
/************************************************************************/
int
OGRGRASSDataSource
::
TestCapability
(
const
char
*
pszCap
)
int
OGRGRASSDataSource
::
TestCapability
(
const
char
*
/*
pszCap
*/
)
{
return
FALSE
;
}
...
...
ogrgrassdriver.cpp
View file @
8cfef0c0
/******************************************************************************
* $Id: ogrgrassdriver.cpp 32110 2015-12-10 17:19:40Z goatbar $
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Implements OGRGRASSDriver class.
...
...
@@ -31,7 +30,7 @@
#include
"cpl_conv.h"
#include
"cpl_string.h"
CPL_CVSID
(
"$Id: ogrgrassdriver.cpp 3
2110
201
5
-1
2-10 17:19
:4
0
Z
goatbar
$"
);
CPL_CVSID
(
"$Id: ogrgrassdriver.cpp 3
6368
201
6
-1
1-21 01:47
:4
9
Z
rouault
$"
);
/************************************************************************/
/* ~OGRGRASSDriver() */
...
...
@@ -54,9 +53,7 @@ const char *OGRGRASSDriver::GetName()
OGRDataSource
*
OGRGRASSDriver
::
Open
(
const
char
*
pszFilename
,
int
bUpdate
)
{
OGRGRASSDataSource
*
poDS
;
poDS
=
new
OGRGRASSDataSource
();
OGRGRASSDataSource
*
poDS
=
new
OGRGRASSDataSource
();
if
(
!
poDS
->
Open
(
pszFilename
,
bUpdate
,
TRUE
)
)
{
...
...
@@ -69,33 +66,10 @@ OGRDataSource *OGRGRASSDriver::Open( const char * pszFilename,
}
}
/************************************************************************/
/* CreateDataSource() */
/************************************************************************/
OGRDataSource
*
OGRGRASSDriver
::
CreateDataSource
(
const
char
*
pszName
,
char
**
papszOptions
)
{
CPLError
(
CE_Failure
,
CPLE_AppDefined
,
"CreateDataSource is not supported by GRASS driver.
\n
"
);
return
NULL
;
}
/************************************************************************/
/* DeleteDataSource() */
/************************************************************************/
OGRErr
OGRGRASSDriver
::
DeleteDataSource
(
const
char
*
pszDataSource
)
{
CPLError
(
CE_Failure
,
CPLE_AppDefined
,
"DeleteDataSource is not supported by GRASS driver"
);
return
OGRERR_FAILURE
;
}
/************************************************************************/
/* TestCapability() */
/************************************************************************/
int
OGRGRASSDriver
::
TestCapability
(
const
char
*
pszCap
)
int
OGRGRASSDriver
::
TestCapability
(
const
char
*
/*
pszCap
*/
)
{
return
FALSE
;
}
...
...
@@ -120,4 +94,3 @@ void RegisterOGRGRASS()
OGRSFDriverRegistrar
::
GetRegistrar
()
->
RegisterDriver
(
poDriver
);
}
Prev
1
2
Next