[GRASS-dev] GRASS 7: v.in.ogr and v.out.ogr issues to be resolved

Hi,

I came across two issues which I thought to bring up here before
modifying code myself:

GRASS 7.0.svn (utm32n):/tmp > v.in.ogr 47_part.shp out=47_part snap=1e-08 --o -o
Over-riding projection check
Counting polygons for 55 features (OGR layer <47_part>)...
100%
WARNING: Illegal vector map name <47_part>. Must start with a letter.
WARNING: Unable to create vector map <47_part>: name is not SQL compliant

---> since we cannot go on, shouldn't it be a fatal error?

WARNING: Illegal vector map name <47_part_tmp>. Must start with a letter.
WARNING: Unable to create vector map <47_part_tmp>: name is not SQL
         compliant
WARNING: Unable to add attribute link, vector map is not opened in WRITE
         mode
DBMI-SQLite driver error:
Unable to open database: (null)/(null)/(null)/sqlite/sqlite.db
unable to open database file

DBMI-SQLite driver error:
Unable to open database: (null)/(null)/(null)/sqlite/sqlite.db
unable to open database file

WARNING: Unable to open database <(null)/(null)/(null)/sqlite/sqlite.db> by
         driver <sqlite>
ERROR: Unable open database <(null)/(null)/(null)/sqlite/sqlite.db> by
       driver <sqlite>

--> .. and the rest of the cascaded errors looks scary :slight_smile:
So I would suggest to bail out in the very beginning. Is there a reason to
not do so?

--------------------

GRASS 7.0.svn (utm32n):/tmp > v.out.ogr a47_part dsn=47_part_cleaned.shp -c
WARNING: The map contains islands. With the -c flag, islands will appear as
         filled areas, not holes in the output map.
Exporting 77 areas (may take some time)...
100%
v.out.ogr complete. 94 features written to <a47_part> (ESRI_Shapefile).

^^^^^^^^^^^^^^^^^

... advertising the wrong map (should be "47_part_cleaned.shp"). Maybe
related to the DSN complications since it is not the plain output command?

Markus

Hi,

2013/5/5 Markus Neteler <neteler@osgeo.org>:

Hi,

I came across two issues which I thought to bring up here before
modifying code myself:

GRASS 7.0.svn (utm32n):/tmp > v.in.ogr 47_part.shp out=47_part snap=1e-08 --o -o
Over-riding projection check
Counting polygons for 55 features (OGR layer <47_part>)...
100%
WARNING: Illegal vector map name <47_part>. Must start with a letter.
WARNING: Unable to create vector map <47_part>: name is not SQL compliant

---> since we cannot go on, shouldn't it be a fatal error?

right, since the most of modules do not check Vect_open_new() return
code, I changed that on library level (r56132). It's partly related to
[1]. The main reason to introduce G__error() was different handling
errors in the modules and the GUI components which use ctypes.

Martin

[1] http://osgeo-org.1560.x6.nabble.com/libgis-G-FATAL-EXIT-PRINT-RETURN-td5044994.html