Hey,
I have a point cloud and I would need the z-coordinate of each point as
attribute. Is there a possibility to extract the z-coordinate and write the
corresponding value into the attribute table of each point?
Thanks,
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6199821.html
Sent from the Grass - Users mailing list archive at Nabble.com.
If your map is a 3d vector, v.db.connect will do the job.
First create 3 new numeric fields in the table (x,y,z), run v.db.connect
with the coord option : it will feed these attributes.
Then you can drop x,y columns if you don't need them anymore.
Vincent
Le mercredi 23 mars 2011 à 06:29 -0700, TimNorwey a écrit :
Hey,
I have a point cloud and I would need the z-coordinate of each point as
attribute. Is there a possibility to extract the z-coordinate and write the
corresponding value into the attribute table of each point?
Thanks,
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6199821.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
Vincent Bain wrote:
If your map is a 3d vector, v.db.connect will do the job.
First create 3 new numeric fields in the table (x,y,z), run v.db.connect
with the coord option : it will feed these attributes.
Then you can drop x,y columns if you don't need them anymore.
Thank you for you quick answer.
I added the the columns, but I can´t find the coord option within
v.db.connect?
Thanks,
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200459.html
Sent from the Grass - Users mailing list archive at Nabble.com.
Tim,
sorry for the mistake, I meant v.to.db
(with option=coor and columns=x,y,z)
Vincent
Le mercredi 23 mars 2011 à 07:29 -0700, TimNorwey a écrit :
Vincent Bain wrote:
>
> If your map is a 3d vector, v.db.connect will do the job.
> First create 3 new numeric fields in the table (x,y,z), run v.db.connect
> with the coord option : it will feed these attributes.
> Then you can drop x,y columns if you don't need them anymore.
>
Thank you for you quick answer.
I added the the columns, but I can´t find the coord option within
v.db.connect?
Thanks,
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200459.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
I tried to do this, but an error occurred, but I don´t really understand what
it means (see below)
http://osgeo-org.1803224.n2.nabble.com/file/n6200570/error.png
In my attribute table I have the tables x,y,z and cat ... all include just
NULL-values.
Thanks,
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200570.html
Sent from the Grass - Users mailing list archive at Nabble.com.
On Wed, 23 Mar 2011, TimNorwey wrote:
In my attribute table I have the tables x,y,z and cat ... all include just
NULL-values.
Try db.info to see what is in the source table. I've found data from
agencies that do not have the attribute data they should.
Rich
Try db.info to see what is in the source table.
I can´t find db.info. Can you please give me the link to the manual or
something else where it is described?
Thanks,
tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200622.html
Sent from the Grass - Users mailing list archive at Nabble.com.
I would suggest there is something wong between your geometry and data
attached in your table. Did you try v.category in order to clean it up ?
http://grass.osgeo.org/grass64/manuals/html64_user/v.category.html
Le mercredi 23 mars 2011 à 07:59 -0700, TimNorwey a écrit :
I tried to do this, but an error occurred, but I don´t really understand what
it means (see below)
http://osgeo-org.1803224.n2.nabble.com/file/n6200570/error.png
In my attribute table I have the tables x,y,z and cat ... all include just
NULL-values.
Thanks,
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200570.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
On Wed, 23 Mar 2011, TimNorwey wrote:
I cant find db.info. Can you please give me the link to the manual or
something else where it is described?
tim,
After I sent the message I realized that you're working with a raster map,
not a vector map with a separate database table. I'm out of ideas on how to
move the x, y, and z values from the raster to a database table.
Rich
tim,
After I sent the message I realized that you're working with a raster
map,
not a vector map with a separate database table. I'm out of ideas on how
to
move the x, y, and z values from the raster to a database table.
Hey.
No, I´m working with vector data. I imported the data via v.in.ascii from a
.csv-file.
And now I´m really confused. Vincent you said that it could be that there is
something wring between the data and the table. So I deleted the point cloud
and imported it again. Now I have the problem that there is no corresponding
table in my directory (/Grass_Database/Location/Mapset/dbf).
thanks,
tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200793.html
Sent from the Grass - Users mailing list archive at Nabble.com.
Tim,
the relative dispersion of our answers might be due to a lack of
description of what your actually want to do.
If you're still stuck, try to re-expose your problem clearly.
Yours,
Vincent.
Tim,
the relative dispersion of our answers might be due to a lack of
description of what your actually want to do.
If you're still stuck, try to re-expose your problem clearly.
Sry for that. I will try it again.
A basis I have a .csv-file including LIDAR points. I imported that csv-file
via v.in.ascii into location A. Because I need this data in another
projection, I created a location B and used v.proj to reproject the point
cloud from location A to location B.
Now I would need the z-coordinate as attribute to it´s corresponding point.
As you recommended I tried to add the tables (v.db.addcol) and this worked.
Then I wanted to fill the columns using v.to.db. But this didn´t work.
Then I deleted all the files and imported the csv-file again using the same
workflow as before. Now I have the problem that there is no corresponding
table in the dbf-directory and so I cannot try to add columns as before.
I hope it´s all a little bit clearer.
Thanks,
tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6200870.html
Sent from the Grass - Users mailing list archive at Nabble.com.
Tim,
Let's consider your source file is a simple x,y,z file (comma separated
values).
First run :
v.in.ascii input=/path/to/your/lidar/source/file output=lidar fs=, x=1
y=2 z=3
Your point cloud was imported in 3d vector mode but not yet connected to
an attribute table. Do this this way :
v.db.addtable map=lidar columns='cat integer,x double precision,y double
precision, z double precision'
To that point a table is connected to your vector and necessary fields
were added to the table. So you can upload x,y,z values to the table :
v.to.db map=lidar type=point option=coor columns=x,y,z
then drop x and y cols :
v.db.dropcol map=lidar column=x
v.db.dropcol map=lidar column=y
And you're done (hope so).
Good luck,
Vincent.
Your point cloud was imported in 3d vector mode but not yet connected to
an attribute table. Do this this way :
v.db.addtable map=lidar columns='cat integer,x double precision,y double
precision, z double precision'
--> worked fine
To that point a table is connected to your vector and necessary fields
were added to the table. So you can upload x,y,z values to the table :
v.to.db map=lidar type=point option=coor columns=x,y,z
--> Unfortunately, this executed with an error. Only in the first row of the
attribute table the coordinates are added.
It is said that there are 43 categories that have "more elements" and so the
coordinates are not loaded (see below)
http://osgeo-org.1803224.n2.nabble.com/file/n6201431/errorNew.png
Thank you very much for your assistance!
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6201431.html
Sent from the Grass - Users mailing list archive at Nabble.com.
On 03/23/2011 08:35 PM, TimNorwey wrote:
Your point cloud was imported in 3d vector mode but not yet connected to
an attribute table. Do this this way :
v.db.addtable map=lidar columns='cat integer,x double precision,y double
precision, z double precision'
--> worked fine
To that point a table is connected to your vector and necessary fields
were added to the table. So you can upload x,y,z values to the table :
v.to.db map=lidar type=point option=coor columns=x,y,z
--> Unfortunately, this executed with an error. Only in the first row of the
attribute table the coordinates are added.
It is said that there are 43 categories that have "more elements" and so the
coordinates are not loaded (see below)
Could there be other extraneous values somewhere in the original ascii file? Maybe rows with an extra comma, or other characters? Can you make a bunch of rows available online somewhere so that we can have a look?
Another point you might want to take advantage of: v.in.ascii has an option (-z) to create a 3D vector. This means that each point's geometry consists of x,y, and z. So you then have the elevation available even if the values are not actually in the attribute table. For example, you can interpolate a dem from a 3D vector with no attribute table at all.
http://osgeo-org.1803224.n2.nabble.com/file/n6201431/errorNew.png
Thank you very much for your assistance!
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6201431.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
This mail was received via Mail-SeCure System.
--
Micha Silver
Arava Development Co. +972-52-3665918
http://www.surfaces.co.il
no idea of the problem, only suggestions :
* I would try to resample categories (v.category, option=del, then
v.category option=add) before processing v.to.db
* Could it be a db driver issue. In this case, you could try e.g. driver
sqlite.
* test on a subset of your lidar source file
*...
Hang in there !
Vincent.
Le mercredi 23 mars 2011 à 11:35 -0700, TimNorwey a écrit :
> Your point cloud was imported in 3d vector mode but not yet connected to
> an attribute table. Do this this way :
> v.db.addtable map=lidar columns='cat integer,x double precision,y double
> precision, z double precision'
>
--> worked fine
> To that point a table is connected to your vector and necessary fields
> were added to the table. So you can upload x,y,z values to the table :
> v.to.db map=lidar type=point option=coor columns=x,y,z
>
--> Unfortunately, this executed with an error. Only in the first row of the
attribute table the coordinates are added.
It is said that there are 43 categories that have "more elements" and so the
coordinates are not loaded (see below)
http://osgeo-org.1803224.n2.nabble.com/file/n6201431/errorNew.png
Thank you very much for your assistance!
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6201431.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
Could there be other extraneous values somewhere in the original ascii
file? Maybe rows with an extra comma, or other characters? Can you make
a bunch of rows available online somewhere so that we can have a look?
Returns v.in.ascii no error if I´m importing something that isn´t in the
right format?
Here a part of my csv file:
http://osgeo-org.1803224.n2.nabble.com/file/n6201677/testData.csv
testData.csv
Another point you might want to take advantage of: v.in.ascii has an
option (-z) to create a 3D vector. This means that each point's geometry
consists of x,y, and z. So you then have the elevation available even if
the values are not actually in the attribute table. For example, you can
interpolate a dem from a 3D vector with no attribute table at all.
Thank you for the hint, but I used the -z option. I need the elevation in
addition.
Thanks,
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6201677.html
Sent from the Grass - Users mailing list archive at Nabble.com.
Hey,
I really appreciate your help, but I didn´t find a solution to my problem in
that case.
I´m very busy at the moment and so I isn´t possible for me to spend more
time for finding a solution.
Thank you!
Tim
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-extract-z-coordiante-and-write-it-into-attribute-table-tp6199821p6203760.html
Sent from the Grass - Users mailing list archive at Nabble.com.
I really appreciate your help, but I didn´t find a solution to my problem in
that case.
Did you try v.category to clean the relation between geometry &
attribute as I suggested ?
VB