[GRASS-user] v.in.ascii data error

Anna Petrášová kratochanna at gmail.com
Tue May 23 07:14:19 PDT 2023


How the data is formatted is wrong, see the example. With standard format,
you need to specify coordinates separated by space. Attributes can't be
used.
B 5
  45.654023 -122.980241 393
 ....

See also https://grass.osgeo.org/grass82/manuals/vectorascii.html

On Tue, May 23, 2023 at 10:05 AM Rich Shepard <rshepard at appl-ecosys.com>
wrote:

> On Tue, 23 May 2023, Anna Petrášová wrote:
>
> > Then yes, just include the boundary and run v.centroids. It was unclear
> > from your first question what it is you actually need.
>
> Anna,
>
> That's what I had done; here are the data file, v.in.ascii command, and
> grass' output:
>
> B 5
>   45.654023|-122.980241|393|Shop
>   45.653931|-122.980315|393|Shop
>   45.653960|-122.979910|393|Shop
>   45.653856|-122.979831|393|Shop
>   45.654023|-122.980241|393|Shop
>
> v.in.ascii -z in=$HOME/projects/oregon/northside-rock/data/shop.txt
> out=maintenance_bldg format=standard sep=pipe cat=0 x=1 y=2 z=3 columns='x
> double precision, y double precision, z integer, label char(4)' --o
>
> > v.in.ascii -z in=$HOME/projects/oregon/northside-rock/data/shop.txt
> out=maintenance_bldg format=standard sep=pipe cat=0 x=1 y=2 z=3 columns='x
> double precision, y double precision, z integer, label char(4)' --o
> WARNING: Unexpected data in vector header:
>           [B 5]
> ERROR: Import failed
>
> ====================================================
>
> Looking at the v.in.ascii example 1b I added a 'no header' option to the
> command:
>
> v.in.ascii -zn in=$HOME/projects/oregon/northside-rock/data/shop.txt
> out=maintenance_bldg format=standard sep=pipe cat=0 x=1 y=2 z=3 columns='x
> double precision, y double precision, z integer, label char(4)' --o
>
> > v.in.ascii -zn in=$HOME/projects/oregon/northside-rock/data/shop.txt
> out=maintenance_bldg format=standard sep=pipe cat=0 x=1 y=2 z=3 columns='x
> double precision, y double precision, z integer, label char(4)' --o
> WARNING: Error reading ASCII file: (bad point) [
>           45.654023|-122.980241|393|Shop]
>
> Please tell me what I've done incorrectly.
>
> TIA,
>
> Rich
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>


-- 
Anna Petrasova
Getting benefits from GRASS GIS? Check new ways to contribute back:
https://opencollective.com/grass/contribute
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20230523/b0b2ee24/attachment-0001.htm>


More information about the grass-user mailing list