Send grass-windows mailing list submissions to grass-windows@lists.osgeo.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.osgeo.org/mailman/listinfo/grass-windows or, via email, send a message with subject or body 'help' to grass-windows-requ...@lists.osgeo.org You can reach the person managing the list at grass-windows-ow...@lists.osgeo.org When replying, please edit your Subject line so it is more specific than "Re: Contents of grass-windows digest..." Today's Topics: 1. Re: v.in.ascii fails with long text file in WinGRASS-6.4.0-1 (Luigi Ponti) 2. Re: [GRASS-user] Re: v.in.ascii fails with long text file in WinGRASS-6.4.0-1 (Markus Neteler) 3. Re: Re: [GRASS-user] Re: v.in.ascii fails with long text file in WinGRASS-6.4.0-1 (Glynn Clements) ---------------------------------------------------------------------- Message: 1 Date: Tue, 21 Sep 2010 22:30:07 +0200 From: Luigi Ponti <lpo...@inbox.com> Subject: [GRASS-windows] Re: v.in.ascii fails with long text file in WinGRASS-6.4.0-1 To: Glynn Clements <gl...@gclements.plus.com> Cc: grass-u...@lists.osgeo.org, grass-windows@lists.osgeo.org Message-ID: <4c9915cf.1030...@inbox.com> Content-Type: text/plain; charset="iso-8859-1" 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/grass-windows/attachments/20100921/62018d95/attachment-0001.html ------------------------------ Message: 2 Date: Wed, 22 Sep 2010 09:22:19 +0200 From: Markus Neteler <nete...@osgeo.org> Subject: [GRASS-windows] Re: [GRASS-user] Re: v.in.ascii fails with long text file in WinGRASS-6.4.0-1 To: Luigi Ponti <lpo...@inbox.com> Cc: grass-u...@lists.osgeo.org, grass-windows@lists.osgeo.org Message-ID: <aanlktinm2v97=ru6s=-tgjpbmn+9kxgv2z5-7o9ea...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 On Tue, Sep 21, 2010 at 10:30 PM, Luigi Ponti <lpo...@inbox.com> wrote: > Still not entirely clear to me which variable I am supposed to set in order > to get full English messages. In a shell, it would be export LANG=en_US export LANGUAGE=en_US export LC_MESSAGES=en_US Markus ------------------------------ Message: 3 Date: Wed, 22 Sep 2010 11:08:54 +0100 From: Glynn Clements <gl...@gclements.plus.com> Subject: Re: [GRASS-windows] Re: [GRASS-user] Re: v.in.ascii fails with long text file in WinGRASS-6.4.0-1 To: Markus Neteler <nete...@osgeo.org> Cc: grass-u...@lists.osgeo.org, Luigi Ponti <lpo...@inbox.com>, grass-windows@lists.osgeo.org Message-ID: <19609.54710.325245.494...@cerise.gclements.plus.com> Content-Type: text/plain; charset=us-ascii Markus Neteler wrote: > > Still not entirely clear to me which variable I am supposed to set in order > > to get full English messages. > > In a shell, it would be > > export LANG=en_US > export LANGUAGE=en_US > export LC_MESSAGES=en_US Replace "en_US" with "C". We don't provide message catalogues for (any dialect of) English; we just use the untranslated strings. The "C" locale doesn't use translations, while en_US would perform translations using an en or en_US catalogue (if one existed; if the catalogue doesn't exist, the untranslated strings are output). Ideally, you should use: export LC_ALL=C if you intend to post the output. This provides "unlocalised" behaviour for all categories (no message catalogues, ASCII encodings, case conversion rules, etc). GRASS itself only uses the LC_MESSAGES and LC_CTYPE categories, and forces LC_NUMERIC to "C" (so that floating-point values use a dot rather than a comma as the decimal separator). LC_CTYPE determines the encoding and case conversion rules. However, some libraries might use other categories (in particular, Python sets LC_CTYPE from the environment, which why we force it back to "C" in G_gisinit()). -- Glynn Clements <gl...@gclements.plus.com> ------------------------------ _______________________________________________ grass-windows mailing list grass-windows@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-windows End of grass-windows Digest, Vol 49, Issue 8 ********************************************