this morning I got a problem with v.select, I don't understand if is a
bug or what... I repeated the procedure with north carolina dataset
g.region vect=zipcodes -ap
v.mkgrid map=zipcodes_grid box=10000,10000
v.category zipcodes_grid opt=report
Layer/table: 1/zipcodes_grid
type count min max
point 0 0 0
line 0 0 0
boundary 0 0 0
centroid 42 1 42
area 0 0 0
face 0 0 0
kernel 0 0 0
all 42 1 42
v.select ain=zipcodes_grid bin=zipcodes operator=touches
out=zipcodes_grid_final --o
WARNING: Vector map <zipcodes_grid_final> already exists and will be
overwritten
Processing features...
100%
Processing areas...
100%
Writing selected features...
100%
Writing attributes...
WARNING: Array of values to select from column <cat> is empty
WARNING: Unable to copy table for layer 1
DBMI-SQLite driver error:
Unable to create index:
create unique index if not exists zipcodes_grid_final_cat on
zipcodes_grid_final ( cat )
no such table: main.zipcodes_grid_final
DBMI-SQLite driver error:
Unable to create index:
create unique index if not exists zipcodes_grid_final_cat on
zipcodes_grid_final ( cat )
no such table: main.zipcodes_grid_final
WARNING: Unable to create index
WARNING: 97 features from <zipcodes_grid@user1> without category skipped
Building topology for vector map <zipcodes_grid_final@user1>...
Registering primitives...
0 primitives registered
0 vertices registered
Building areas...
100%
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 0
Number of primitives: 0
Number of points: 0
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
v.select complete. 0 features written to output.
is someone able to reproduce the error? if yes I will open a ticket (I
tested both grass70 and grass72, I didn't with trunk)
this morning I got a problem with v.select, I don't understand if is a
bug or what... I repeated the procedure with north carolina dataset
g.region vect=zipcodes -ap
v.mkgrid map=zipcodes_grid box=10000,10000
v.category zipcodes_grid opt=report
Layer/table: 1/zipcodes_grid
type count min max
point 0 0 0
line 0 0 0
boundary 0 0 0
centroid 42 1 42
area 0 0 0
face 0 0 0
kernel 0 0 0
all 42 1 42
v.select ain=zipcodes_grid bin=zipcodes operator=touches
out=zipcodes_grid_final --o
WARNING: Vector map
<zipcodes_grid_final>
already exists and will be
overwritten
Processing features...
100%
Processing areas...
100%
Writing selected features...
100%
Writing attributes...
WARNING: Array of values to select from column
<cat>
is empty
WARNING: Unable to copy table for layer 1
DBMI-SQLite driver error:
Unable to create index:
create unique index if not exists zipcodes_grid_final_cat on
zipcodes_grid_final ( cat )
no such table: main.zipcodes_grid_final
DBMI-SQLite driver error:
Unable to create index:
create unique index if not exists zipcodes_grid_final_cat on
zipcodes_grid_final ( cat )
no such table: main.zipcodes_grid_final
WARNING: Unable to create index
WARNING: 97 features from <zipcodes_grid@user1> without category
skipped
Building topology for vector map <zipcodes_grid_final@user1>...
Registering primitives...
0 primitives registered
0 vertices registered
Building areas...
100%
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 0
Number of primitives: 0
Number of points: 0
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
v.select complete. 0 features written to output.
is someone able to reproduce the error? if yes I will open a ticket (I
tested both grass70 and grass72, I didn't with trunk)
v.select ainput=zipcodes_grid@user1 binput=zipcodes_wake@PERMANENT
output=zipcodes_grid_final operator=touches
Processing features...
Processing areas...
Writing selected features...
Writing attributes...
WARNING: Array of values to select from column <cat> is empty
WARNING: Unable to copy table for layer 1
WARNING: Unable to create index
WARNING: 97 features from <zipcodes_grid@user1> without category skipped
Building topology for vector map <zipcodes_grid_final@user1>...
Registering primitives...
0 primitives registered
0 vertices registered
Building areas...
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 0
Number of primitives: 0
Number of points: 0
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
v.select complete. 0 features written to output.
this morning I got a problem with v.select, I don't understand if is a
bug or what... I repeated the procedure with north carolina dataset
g.region vect=zipcodes -ap
v.mkgrid map=zipcodes_grid box=10000,10000
v.category zipcodes_grid opt=report
Layer/table: 1/zipcodes_grid
type count min max
point 0 0 0
line 0 0 0
boundary 0 0 0
centroid 42 1 42
area 0 0 0
face 0 0 0
kernel 0 0 0
all 42 1 42
v.select ain=zipcodes_grid bin=zipcodes operator=touches
out=zipcodes_grid_final --o
WARNING: Vector map <zipcodes_grid_final> already exists and will be
overwritten
Processing features...
100%
Processing areas...
100%
Writing selected features...
100%
Writing attributes...
WARNING: Array of values to select from column <cat> is empty
i.e. no features found which is logical, as there are no zipcode areas that touch a grid area. 'touches' is normally defined as [1]
"a touches b: they have at least one boundary point in common, but no interior points."
Try with intersects, overlaps, etc.
I agree though that the error message is very unclear. After the "Array of values ... is empty" it should just stop. After a very rapid look at main.c of v.select it seems to me that it doesn't check the result of the selection and just goes on trying to write a new file...
this morning I got a problem with v.select, I don't understand if is a
bug or what... I repeated the procedure with north carolina dataset
g.region vect=zipcodes -ap
v.mkgrid map=zipcodes_grid box=10000,10000
v.category zipcodes_grid opt=report
Layer/table: 1/zipcodes_grid
type count min max
point 0 0 0
line 0 0 0
boundary 0 0 0
centroid 42 1 42
area 0 0 0
face 0 0 0
kernel 0 0 0
all 42 1 42
v.select ain=zipcodes_grid bin=zipcodes operator=touches
out=zipcodes_grid_final --o
WARNING: Vector map <zipcodes_grid_final> already exists and will be
overwritten
Processing features...
100%
Processing areas...
100%
Writing selected features...
100%
Writing attributes...
WARNING: Array of values to select from column <cat> is empty
i.e. no features found which is logical, as there are no zipcode areas
that touch a grid area. 'touches' is normally defined as [1]
"a touches b: they have at least one boundary point in common, but no
interior points."
Try with intersects, overlaps, etc.
I agree though that the error message is very unclear. After the "Array
of values ... is empty" it should just stop. After a very rapid look at
main.c of v.select it seems to me that it doesn't check the result of
the selection and just goes on trying to write a new file...
Try the attached patch. Not very elegant and not well tested, but seems to work for me.
On Tue, Dec 20, 2016 at 10:36 AM, Moritz Lennert <
mlennert@club.worldonline.be> wrote:
On 20/12/16 16:18, Luca Delucchi wrote:
On 20 December 2016 at 16:08, Moritz Lennert
<mlennert@club.worldonline.be> wrote:
You can go ahead and commit to trunk, unless someone objects. At least
this
way it gets some testing.
are you sure? you should submit it :-/
I had hoped to put the work on you...
But it's done: r70103.
But we should keep this in mind and observe whether this does not cause
any issues. Maybe open a ticket ?
Isn't an empty vector map an expected result in this case? What happens
when you do this in GUI (where output is added automatically to Map
Display)? Ticket might be appropriate.
On Tue, Dec 20, 2016 at 10:36 AM, Moritz Lennert
<mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:
On 20/12/16 16:18, Luca Delucchi wrote:
On 20 December 2016 at 16:08, Moritz Lennert
<mlennert@club.worldonline.be
<mailto:mlennert@club.worldonline.be>> wrote:
You can go ahead and commit to trunk, unless someone
objects. At least this
way it gets some testing.
are you sure? you should submit it :-/
I had hoped to put the work on you...
But it's done: r70103.
But we should keep this in mind and observe whether this does not
cause any issues. Maybe open a ticket ?
Isn't an empty vector map an expected result in this case? What happens
when you do this in GUI (where output is added automatically to Map
Display)? Ticket might be appropriate.