On 21/09/2010 10:00, Glynn Clements wrote:
Luigi Ponti wrote:

Any ideas? A change introduced in 6.4.0-1 has rendered WinGRASS unusable to me [...]
[...] is there a way to compile the code in the state it was before the issue arose?

You can prevent the error with:

--- vector/v.in.ascii/in.c~     2010-09-04 16:31:59.000000000 +0100
+++ vector/v.in.ascii/in.c      2010-09-21 08:57:12.000000000 +0100
@@ -519,8 +519,7 @@
        if (driver) {
            G_message(_("Populating table..."));
            db_commit_transaction(driver);
-           if(db_close_database_shutdown_driver(driver) == DB_FAILED)
-               G_fatal_error(_("Could not close attribute table. The DBMI driver 
did not accept all attributes"));
+           db_close_database_shutdown_driver(driver);
        }
        fclose(tmpascii);
     }

db_close_database_shutdown_driver() is incorrectly reporting errors on
Windows. v.in.ascii is the only module which checks the return status,
so it's the only module which is affected.


Implemented your patch to changeset 4359 releasebranch_6_4, compiled following instructions at <http://trac.osgeo.org/grass/wiki/CompileOnWindows>, and it works for the following simple test (see <http://trac.osgeo.org/grass/ticket/1159#comment:13>):

   GRASS 6.4> echo "10|10|abcd" | v.in.ascii out=test
   Scanning input for column types...
   Maximum input row length: 11
   Maximum number of columns: 3
   Minimum number of columns: 3
   Column: 1 type: double
   Column: 2 type: double
   Column: 3 type: string length: 4
   Importando punti ...
    100%
   Populating table...
   Building topology for vector map <test>...
   Registering primitives...
   1 primitives registered
   1 vertices registered
   Building areas...
    100%
   0 areas built
   0 isles built
   Attaching islands...
   Attaching centroids...
    100%
   Number of nodes: 1
   Number of primitives: 1
   Number of points: 1
   Number of lines: 0
   Number of boundaries: 0
   Number of centroids: 0
   Number of areas: 0
   Number of isles: 0
   v.in.ascii completo.


The point can be displayed, and the dbf table seems ok. Also works using a longer sample text file I previously linked
https://docs.google.com/leaf?id=0B0EpsfMZ-IZYNGZlNWZkMWEtNzhiNS00OGRiLTgyNzctYzk4ODUxODk1NzI1&sort=name&layout=list&num=50

   GRASS 6.4> v.in.ascii --overwrite input=Bloomday_Olive_11set10_Avg
   output=test_US_import fs=tab
   ATTENZIONE: Vector map <test_US_import> already exists and will be
               overwritten
   Scanning input for column types...
   Maximum input row length: 31
   Maximum number of columns: 3
   Minimum number of columns: 3
   Column: 1 type: double
   Column: 2 type: double
   Column: 3 type: double
   Importando punti ...
    100%
   Populating table...
   Building topology for vector map <test_US_import>...
   Registering primitives...
   1157 primitives registered
   1157 vertices registered
   Building areas...
    100%
   0 areas built
   0 isles built
   Attaching islands...
   Attaching centroids...
    100%
   Number of nodes: 1154
   Number of primitives: 1157
   Number of points: 1157
   Number of lines: 0
   Number of boundaries: 0
   Number of centroids: 0
   Number of areas: 0
   Number of isles: 0
   v.in.ascii completo.


I am not sure as to whether this should be reported on <http://trac.osgeo.org/grass/ticket/1159>.

Related ticket 1158 <http://trac.osgeo.org/grass/ticket/1158> seems to persist:

   GRASS 6.4> v.in.ascii --overwrite
   input=C:/cygwin/home/andy/models_temp/Bloomd
   ay_Olive_11set10_Avg output=test_US_import fs=tab
   ATTENZIONE: Vector map <test_US_import> already exists and will be
               overwritten
   ATTENZIONE: Unable to delete file
'C:\cygwin\home\andy/latlong/luigi/vector/test_US_import/hist'
   ERRORE: Unable to delete vector map <test_US_import>


Still not entirely clear to me which variable I am supposed to set in order to get full English messages.

Thanks and regards,

Luigi



_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to