[GRASS-user] upload long lat coordinates to attribute table

Dear all,
I have a vector map into a mapset of projected CRS (epsg 3004). I have
some issue to upload long/lat coordinates into attribute table of the
vector map.
What is the best/easy way to to that?
v.to.db upload coordinate but without reprojecting it's values.
Thanks
Pierluigi
--

________________________________________________________________________
Ing. Pierluigi De Rosa (PhD)
Studio Associato GFOSSERVICES
                
Via Tilli 58 - 06127 Perugia (PG)
tel: 075 7825101 / fax: 075 7823038
cel: 3497558268
web: www.gfosservices.it
skype: pierluigi.derosa

Hi Pierluigi,
you'll first have to reproject your vector map into the lonlat, i.e. a geographic projection. Then you can upload the long lat values to your vector table. You'll first have to add two fields to your table (v.db.addcol). You can then reproject it back to your original location/projection or just swap the database file over if you are using dbf.
Hope that helps,
Michel

On 08/06/2013 09:17 AM, Ing. Pierluigi De Rosa wrote:

Dear all,
I have a vector map into a mapset of projected CRS (epsg 3004). I have
some issue to upload long/lat coordinates into attribute table of the
vector map.
What is the best/easy way to to that?
v.to.db upload coordinate but without reprojecting it's values.
Thanks
Pierluigi

Hi Pierluigi,

I often find myself trying to accomplish a similar task. I find it suits my needs to export the data as a csv, add the extra columns in a spreadsheet program, then import the updated csv.

Best,
Nick

On Tue, Aug 6, 2013 at 3:17 PM, Ing. Pierluigi De Rosa <pierluigi.derosa@gfosservices.it> wrote:

Dear all,
I have a vector map into a mapset of projected CRS (epsg 3004). I have
some issue to upload long/lat coordinates into attribute table of the
vector map.
What is the best/easy way to to that?
v.to.db upload coordinate but without reprojecting it’s values.
Thanks
Pierluigi


Ing. Pierluigi De Rosa (PhD)
Studio Associato GFOSSERVICES

Via Tilli 58 - 06127 Perugia (PG)
tel: 075 7825101 / fax: 075 7823038
cel: 3497558268
web: www.gfosservices.it
skype: pierluigi.derosa


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Pierluigi De Rosa wrote:

I have a vector map into a mapset of projected CRS (epsg 3004). I have
some issue to upload long/lat coordinates into attribute table of the
vector map.
What is the best/easy way to to that?
v.to.db upload coordinate but without reprojecting it's values.

perhaps use v.db.select to print out the epsg:3004 coords and pipe
those through 'm.proj -o' to get long/lat, then either write that to
a formatted SQL file for db.execute or into a `while read` loop for
v.db.update (slower).

is it a points map?

Hamish