[GRASS5] ogr-grass-driver

Dear GRASS/GDAL-users,

I created a gdal/ogr-plugin (as .deb) for the ogr-grass-driver which
loads perfect into ogr:
ogrinfo --formats
Loaded OGR Format Drivers:
  -> "GRASS" (readonly)
  -> "ESRI Shapefile" (read/write)
  [...]
  -> "Interlis 1" (read/write)
  -> "Interlis 2" (read/write)
  -> "PostgreSQL" (read/write)

When I try to use ogrinfo on a GRASS-vectordataset (outside GRASS), I
have some variable-related warnings... Inside GRASS everything works
great.

When building gdal/ogr not as a module, I did not discover this
problem.
Perhaps anybody can give me a hint how to solve this issue?

<warnings>
ogrinfo /home/gdf/grassdata/spearfish57/PERMANENT/vector/soils/head
Warning 1: GRASS warning: GISBASE enviroment variable was not set,
using: ogrinfo -al
-summary /home/gdf/grassdata/spearfish57/PERMANENT/vector/soils/head
Warning 1: GRASS warning: GISBASE enviroment variable was not set,
using:

Warning 1: GRASS warning: unable to open datum table
file: /etc/datum.table /etc/ellipse.table: Datei oder Verzeichnis nicht
gefunden Warning 1: GRASS warning: unable to open ellipsoid table
file: /etc/ellipse.table Warning 1: GRASS fatal error: invalid
ellipsoid clark66 in file Unable to initialise PROJ.4 with the
following parameter list: +proj=utm +zone=13 +a=-1.995876312255859
+rf=-1.998111724853517 +no_defs +nadgrids=conus The error message was
'squared eccentricity < 0' Warning 1: GRASS warning: Can't parse GRASS
PROJ_INFO file Datei oder Verzeichnis nicht gefunden: /driver/db/
Warning 1: GRASS warning: Cannot open driver 'dbf'
ERROR 1: Cannot open database dbf by
driver /home/gdf/grassdata/spearfish57/PERMANENT/dbf/, check if GISBASE
enviroment variable is set, the driver isavailable and the database is
accessible. Warning 1: GRASS warning: unable to open datum table
file: /etc/datum.table /etc/ellipse.table: Datei oder Verzeichnis nicht
gefunden Warning 1: GRASS warning: unable to open ellipsoid table
file: /etc/ellipse.table Warning 1: GRASS fatal error: invalid
ellipsoid clark66 in file Unable to initialise PROJ.4 with the
following parameter list: +proj=utm +zone=13 +a=-1.995876312255859
+rf=-1.998111724853517 +no_defs +nadgrids=conus The error message was
'squared eccentricity < 0' Warning 1: GRASS warning: Can't parse GRASS
PROJ_INFO file INFO: Open of
`/home/gdf/grassdata/spearfish57/PERMANENT/vector/soils/head' using
driver `GRASS' successful.

Layer name: 0
Geometry: Line String
Feature Count: 2146
Extent: (589443.780000, 4913923.480000) - (609546.170000,
4928105.880000) Layer SRS WKT:
(unknown)

Layer name: 1
Geometry: Polygon
Feature Count: 737
Extent: (589443.780000, 4913923.480000) - (609546.170000,
4928105.880000) Layer SRS WKT:
(unknown)
cat: Integer (0.0)
gdf@bild-deb-sarge:~/software$
</warnings>

Best regards

  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

On Thu, 15 Sep 2005 08:14:58 +0200
Stephan Holl <holl@gdf-hannover.de> wrote:

I created a gdal/ogr-plugin (as .deb) for the ogr-grass-driver which
loads perfect into ogr:

have you tried the DebianGIS project's libgdal1-grass package?
(proposed debian package, available from the DebianGis Repository)

http://pkg-grass.alioth.debian.org/cgi-bin/wiki.pl

?
Hamish

Hello Hamish,

On Thu, 15 Sep 2005 19:54:04 +1200 Hamish <hamish_nospam@yahoo.com>
wrote:

On Thu, 15 Sep 2005 08:14:58 +0200
Stephan Holl <holl@gdf-hannover.de> wrote:

> I created a gdal/ogr-plugin (as .deb) for the ogr-grass-driver which
> loads perfect into ogr:

have you tried the DebianGIS project's libgdal1-grass package?
(proposed debian package, available from the DebianGis Repository)

http://pkg-grass.alioth.debian.org/cgi-bin/wiki.pl

Yes, I use it. AFAIK it does not (yet) include the GRASS-ogr-driver.
Because of that I use the own build...

Thanks for the hint.

Best
  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

On 9/15/05, Stephan Holl <holl@gdf-hannover.de> wrote:

Dear GRASS/GDAL-users,

I created a gdal/ogr-plugin (as .deb) for the ogr-grass-driver which
loads perfect into ogr:
ogrinfo --formats
Loaded OGR Format Drivers:
  -> "GRASS" (readonly)
  -> "ESRI Shapefile" (read/write)
  [...]
  -> "Interlis 1" (read/write)
  -> "Interlis 2" (read/write)
  -> "PostgreSQL" (read/write)

When I try to use ogrinfo on a GRASS-vectordataset (outside GRASS), I
have some variable-related warnings... Inside GRASS everything works
great.

When building gdal/ogr not as a module, I did not discover this
problem.
Perhaps anybody can give me a hint how to solve this issue?

OGRGRASSDataSource is using char *gisbase = GRASS_GISBASE;
which is set in makefile:
CPPFLAGS := -DGRASS_GISBASE=\"$(GRASS_GISBASE)\"

and that is probably missing in your makefile for the module.

Radim

Hello Radim,

On Thu, 15 Sep 2005 10:34:37 +0200 Radim Blazek
<radim.blazek@gmail.com> wrote:

On 9/15/05, Stephan Holl <holl@gdf-hannover.de> wrote:
> Dear GRASS/GDAL-users,
>
> I created a gdal/ogr-plugin (as .deb) for the ogr-grass-driver which
> loads perfect into ogr:
> ogrinfo --formats
> Loaded OGR Format Drivers:
> -> "GRASS" (readonly)
> -> "ESRI Shapefile" (read/write)
> [...]
> -> "Interlis 1" (read/write)
> -> "Interlis 2" (read/write)
> -> "PostgreSQL" (read/write)
>
> When I try to use ogrinfo on a GRASS-vectordataset (outside GRASS),
> I have some variable-related warnings... Inside GRASS everything
> works great.
>
> When building gdal/ogr not as a module, I did not discover this
> problem.
> Perhaps anybody can give me a hint how to solve this issue?

OGRGRASSDataSource is using char *gisbase = GRASS_GISBASE;
which is set in makefile:
CPPFLAGS := -DGRASS_GISBASE=\"$(GRASS_GISBASE)\"

and that is probably missing in your makefile for the module.

Well, it is set in the makefile, but I do not know if it is used when
using debian dpkg-buildpackage. I had some trouble about overriding
variables by the debian packagebuild-system.

I will dig deeper.

Thank you

  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508