[GRASS-user] db.? to change column names
Rich Shepard
rshepard at appl-ecosys.com
Fri Aug 31 07:43:04 PDT 2018
On Fri, 31 Aug 2018, Moritz Lennert wrote:
> Markus gave you the name of a module, but just to make sure: the column
> content in your attribute table does not change because you reproject, so
> your columns lat and lon should still contain lat and lon values.
Moritz,
Yes, this is correct: they do.
However, v.out.ascii produced the projected coordinates, not the
geographic lon/lat; e.g.,
10332|2324618.93021014|214826.06781179
10335|2330789.44861867|202224.65265656
While in the GUI attribute table manager this is seen:
10332|-122.7475|45.977544
10335|-122.644139|45.466111
and there are no easting/northing columns.
Here's the script (line breaks set by MUA; entered on one command line):
Using lon_lat location:
v.in.ascii in=wrb-stations.dat out=stations text=doublequote skip=1
columns='site_nbr varchar(5), site_name varchar(64), lon double precision,
lat double precision' x=3 y=4 z=0
Exit grass, restart and create new location/mapset, then:
v.proj loc=lon_lat map=PERMANENT in=stations
v.out.ascii -c in=stations out=stations.dat type=point columns='*' format=point --o
v.to.db map=stations opt=coor columns='easting,northing'
Closed that map in the GUI and re-loaded it; still no easting/northing
columns only lon/lat.
Your thoughts on this are always welcome.
Regards,
Rich
More information about the grass-user
mailing list