I have a question. I was examining some point vectors for archaeological sites that I am planning to do some research on and I noticed that a site was missing. I know it exists because I've been their. I got the information from shape files put out by Ireland's office of public works.
I have most of the important information on the site and I was wondering if there is an easy way to add it. I am using sqlite and have my grass data base set for sqlite. I considered simply adding the record to the appropriate table, but didn't want to make a mess of things by experimenting. I checked the third addition of Markus Neteler and Helena Mitasova's book, but didn't find what I was looking for.
Any ideas. Thanks for any information you can give.
It won’t be enough to add the data to your sqlite table, That;s just the attributes, not the geography. The easiest way to add one point (assuming you know it’s coordinates) would be with v.edit:
v.edit arch_sites tool=add coord=,
Regards,
Micha
On Fri, 2011-09-23 at 13:22 -0400, Kurt Springs wrote:
Hi folks,
I have a question. I was examining some point vectors for
archaeological sites that I am planning to do some research on and I
noticed that a site was missing. I know it exists because I've been
their. I got the information from shape files put out by Ireland's
office of public works.
I have most of the important information on the site and I was
wondering if there is an easy way to add it. I am using sqlite and
have my grass data base set for sqlite. I considered simply adding
the record to the appropriate table, but didn't want to make a mess of
things by experimenting. I checked the third addition of Markus
Neteler and Helena Mitasova's book, but didn't find what I was looking
for.
Any ideas. Thanks for any information you can give.
Kurt _______________________________________________ grass-user mailing
[list](mailto:listgrass-user@lists.osgeo.org) [grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)
This mail was received via Mail-SeCure System.
I would like to have said that I’ve tried it, but it’s still going. Any idea how long I should let it run before I decide there’s a problem?
Also, with attribute data, for that would I just fill in the blanks in sqlite?
Kurt
On Sep 23, 2011, at 1:48 PM, Micha Silver wrote:
It won’t be enough to add the data to your sqlite table, That;s just the attributes, not the geography. The easiest way to add one point (assuming you know it’s coordinates) would be with v.edit:
v.edit arch_sites tool=add coord=,
Regards,
Micha
On Fri, 2011-09-23 at 13:22 -0400, Kurt Springs wrote:
Hi folks,
I have a question. I was examining some point vectors for
archaeological sites that I am planning to do some research on and I
noticed that a site was missing. I know it exists because I've been
their. I got the information from shape files put out by Ireland's
office of public works.
I have most of the important information on the site and I was
wondering if there is an easy way to add it. I am using sqlite and
have my grass data base set for sqlite. I considered simply adding
the record to the appropriate table, but didn't want to make a mess of
things by experimenting. I checked the third addition of Markus
Neteler and Helena Mitasova's book, but didn't find what I was looking
for.
Any ideas. Thanks for any information you can give.
Kurt _______________________________________________ grass-user mailing
[list](mailto:listgrass-user@lists.osgeo.org) [grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)
This mail was received via Mail-SeCure System.
v.edit --verbose map=wedge_tomb@PERMANENT type=point tool=add
coords=170402,374124
I would like to have said that I've tried it, but it's still going. Any
it will not work, `tool=add` requires input in GRASS ASCII format [1].
In this case if you don't define option `input` it reads stdin. It can
be confusing for the user. The correct usage is
v.edit -n map=<map> tool=add << EOF
P 1 1
170402 374124
1 1
EOF
or
v.edit -n map=<map> tool=add input=<file>
In this case add new point with category 1 (layer 1) is added.
I used the command line in terminal. It immediately said "100%" but it has yet to return the command prompt, indicating it has more to do. How long should I wait? Did I miss something?
Kurt
On Sep 23, 2011, at 3:32 PM, Martin Landa wrote:
Hi,
2011/9/23 Martin Landa <landa.martin@gmail.com>:
In this case if you don't define option `input` it reads stdin. It can
be confusing for the user. The correct usage is
in r48434 <input> is required for `tool=add`, ie.
v.edit -n map=x tool=add
ERROR: Required parameter <input> not set
* `coords`, `layer` and `type` do nothing in this case
* `input=-` means that it will read data from standard input, so the
command waits for that (it will wait for eternity if you do not
provide any input;-)
Okay, I got the point to appear in the right spot. However it doesn't appear in the sqlite data base. I also wanted to add it's attributes. I take it that it isn't as easy as simply filling them in with Sqlite browser.
Kurt
On Sep 23, 2011, at 4:11 PM, Martin Landa wrote:
* `coords`, `layer` and `type` do nothing in this case
* `input=-` means that it will read data from standard input, so the
command waits for that (it will wait for eternity if you do not
provide any input;-)
Okay, I got the point to appear in the right spot. However it doesn't appear in the sqlite data base. I also wanted to add it's attributes. I take it that it isn't as easy as simply filling them in with Sqlite browser.
`v.edit` doesn't modify attribute table, you can add new record using
wxGUI Attribute Manager [1].
Okay, I got the point to appear in the right spot. However it doesn't appear in the sqlite data base. I also wanted to add it's attributes. I take it that it isn't as easy as simply filling them in with Sqlite browser.
`v.edit` doesn't modify attribute table, you can add new record using
wxGUI Attribute Manager [1].
What I am doing wrong, or is this the problem of v.vect.stats?
I have an area vector "area_vector" of three rectangular areas and a vector "point_vector" with numerous points inside these areas.
The output of the command
The areas in the area_vector have categories 1, 2, 3.
The column uav8 is present in the table point_vector and I can see the values of attributes making query in display window.
GRASS is using Postgres, driver pg. Attribute values are real.
v.rast.stats is working and updates attribute table.
Can the problem be that the point_vector has no column 'cat'? The key column for linking the vector layer to its attribute table has a different name.
On Tue, Oct 18, 2011 at 9:45 AM, Andres Kuusk <andres@aai.ee> wrote:
Hi!
What I am doing wrong, or is this the problem of v.vect.stats?
I have an area vector "area_vector" of three rectangular areas and a vector
"point_vector" with numerous points inside these areas.
The output of the command
The areas in the area_vector have categories 1, 2, 3.
The column uav8 is present in the table point_vector and I can see the
values of attributes making query in display window.
GRASS is using Postgres, driver pg. Attribute values are real.
v.rast.stats is working and updates attribute table.
Can the problem be that the point_vector has no column 'cat'? The key column
for linking the vector layer to its attribute table has a different name.
No, v.vect.stats uses the key column recorded in the db link info. If
there would be a problem with the points vector, v.vect.stats should
print something like
area_cat|count|average
1|0|null
2|0|null
3|0|null
I am using GRASS-7, r47868.
Maybe rebuilding topology helps? Also output of v.info on the area
vector and v.vect.stats after g.gisenv set="DEBUG=2".
.. v.vect.stats uses the key column recorded in the db link info. If
there would be a problem with the points vector, v.vect.stats should
print something like
area_cat|count|average
1|0|null
2|0|null
3|0|null
Maybe rebuilding topology helps?
I created a new vector of points (tmp4) using v.select, operator=within
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Topology was built
Number of nodes: 577
Number of primitives: 577
Number of points: 577
All these points are inside the areas 1, 2, and 3 of the area vector "rami".
Also output of v.info on the area vector
Area vector is "rami":
Type of map: vector (level: 2)
Number of points: 0 Number of centroids: 3
Number of lines: 0 Number of boundaries: 3
Number of areas: 3 Number of islands: 3
Map is 3D: No
Number of dblinks: 1
and v.vect.stats after g.gisenv set="DEBUG=2".
(Tue Oct 18 12:36:48 2011)
g.gisenv set=DEBUG=2
(Tue Oct 18 12:36:48 2011) Command finished (0 sec)
(Tue Oct 18 12:36:58 2011)
v.vect.stats -p points=tmp4 areas=rami type=point method=average pcolumn=uav8 ccolumn=nuav scolumn=uav8min --verbose
(Tue Oct 18 12:36:58 2011) Command finished (0 sec)
(Tue Oct 18 12:36:48 2011)
g.gisenv set=DEBUG=2
(Tue Oct 18 12:36:48 2011) Command finished (0 sec)
(Tue Oct 18 12:36:58 2011)
v.vect.stats -p points=tmp4 areas=rami type=point method=average
pcolumn=uav8 ccolumn=nuav scolumn=uav8min --verbose
(Tue Oct 18 12:36:58 2011) Command finished (0 sec)
Weird. With DEBUG=2, all sorts of debug messages should be printed.
Looks like the module exits immediately and can not even open the
vectors. Can you run it again through CLI, not the GUI (also not the
GUI-CLI)?
BTW, works fine for me with the North Carolina dataset.
I am sorry, the module v.vect.stats was missing in my set-up. I tried to start it through GUI-CLI, that was the output.
Now I upgraded GRASS-7 to r48840 or r48841 (I guess, sorry, I cannot check, the Internet connection of office is down), and v.vect.stats works fine. Thanks for your support.
However, the current version has again problems with using selection options for a vector - the display window is empty if I turn on a selection option. Vector(s) is(are) visible again if I turn the selection option off. I will give more details when I can access Internet in my office.
Andres
----------------
Tue, 18 Oct 2011, Markus Metz:
Weird. With DEBUG=2, all sorts of debug messages should be printed.
Looks like the module exits immediately and can not even open the
vectors. Can you run it again through CLI, not the GUI (also not the
GUI-CLI)?
GRASS is r48844 on an openSUSE-11.4 and everything works fine.
Great work!
However, the current version has again problems with using selection options for a vector - the display window is empty if I turn on a selection option.