[GRASS-user] Importing vector points

Hi GRASS list,

I'm trying to import some vectors and use them to look up values on a raster using v.what.rast. I'm using GRASS 7.0.3. I'm getting the error,

No features of type (point) found in vector map <wells>

Which is un-googleable, but implies that my vector db doesn't have points. I'm creating the vector like this:

v.in.ascii --o format=point input=lon_lat_x_y_depth_id.csv output=wells separator=, x=3 y=4 z=0 cat=6 skip=1 columns="lon double precision, lat double precision, x double precision, y double precision, z double precision, id"

db.select table=wells | head

lon|lat|x|y|z|id|L1
-80.648|25.21|1754704.77|-1225843.51|12.77|251241080385301|
-80.566|25.321|1760685.92|-1211916.08|59|251922080340701|
-80.566|25.338|1760275.96|-1210078.02|38|252007080335701|

v.db.addcolumn map=wells column="L1 double precision"
v.what.rast map=wells raster=L130 column=L1

It seems like wells should be imported as point from v.in.ascii. I've tried "forcing" it with "format=point". I've tried converting after import with v.to.point. Nothing has worked yet.

Thanks,

  -k.

On Wed, Jun 1, 2016 at 5:49 PM, Ken Mankoff <mankoff@gmail.com> wrote:

Hi GRASS list,

I'm trying to import some vectors and use them to look up values on a raster using v.what.rast. I'm using GRASS 7.0.3. I'm getting the error,

No features of type (point) found in vector map <wells>

Which is un-googleable, but implies that my vector db doesn't have points. I'm creating the vector like this:

v.in.ascii --o format=point input=lon_lat_x_y_depth_id.csv output=wells separator=, x=3 y=4 z=0 cat=6 skip=1 columns="lon double precision, lat double precision, x double precision, y double precision, z double precision, id"

db.select table=wells | head

lon|lat|x|y|z|id|L1
-80.648|25.21|1754704.77|-1225843.51|12.77|251241080385301|
-80.566|25.321|1760685.92|-1211916.08|59|251922080340701|
-80.566|25.338|1760275.96|-1210078.02|38|252007080335701|

v.db.addcolumn map=wells column="L1 double precision"
v.what.rast map=wells raster=L130 column=L1

It seems like wells should be imported as point from v.in.ascii. I've tried "forcing" it with "format=point". I've tried converting after import with v.to.point. Nothing has worked yet.

what does v.info say?

Anna

Thanks,

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

On 2016-06-01 at 17:51, Anna Petrášová <kratochanna@gmail.com> wrote:

what does v.info say?

+----------------------------------------------------------------------------+
| Name: wells |
| Mapset: WellsInL1 |
| Location: EQDC |
| Database: /projects/USGW_Model/grass |
| Title: |
| Map scale: 1:1 |
| Name of creator: mankoff |
| Organization: |
| Source date: Wed Jun 1 17:44:42 2016 |
| Timestamp (first layer): none |
|----------------------------------------------------------------------------|
| Map format: native |
|----------------------------------------------------------------------------|
| Type of map: vector (level: 2) |
| |
| Number of points: 15149 Number of centroids: 0 |
| Number of lines: 0 Number of boundaries: 0 |
| Number of areas: 0 Number of islands: 0 |
| |
| Map is 3D: No |
| Number of dblinks: 1 |
| |
| Projection: Equidistant Conic |
| |
| N: 1530707.64 S: -1225843.51 |
| E: 2277579.47 W: -2289702.87 |
| |
| Digitization threshold: 0 |
| Comment: |
| |
+----------------------------------------------------------------------------+

On Wed, Jun 1, 2016 at 5:57 PM, Ken Mankoff <mankoff@gmail.com> wrote:

On 2016-06-01 at 17:51, Anna Petrášová <kratochanna@gmail.com> wrote:

what does v.info say?

+----------------------------------------------------------------------------+
| Name: wells |
| Mapset: WellsInL1 |
| Location: EQDC |
| Database: /projects/USGW_Model/grass |
| Title: |
| Map scale: 1:1 |
| Name of creator: mankoff |
| Organization: |
| Source date: Wed Jun 1 17:44:42 2016 |
| Timestamp (first layer): none |
|----------------------------------------------------------------------------|
| Map format: native |
|----------------------------------------------------------------------------|
| Type of map: vector (level: 2) |
| |
| Number of points: 15149 Number of centroids: 0 |
| Number of lines: 0 Number of boundaries: 0 |
| Number of areas: 0 Number of islands: 0 |
| |
| Map is 3D: No |
| Number of dblinks: 1 |
| |
| Projection: Equidistant Conic |
| |
| N: 1530707.64 S: -1225843.51 |
| E: 2277579.47 W: -2289702.87 |
| |
| Digitization threshold: 0 |
| Comment: |
| |
+----------------------------------------------------------------------------+

Maybe the points are not in the current computational region?

On 2016-06-01 at 18:01, Anna Petrášová <kratochanna@gmail.com> wrote:

Maybe the points are not in the current computational region?

I considered that, but

d.mon start=wx0
d.rast L130
d.vect wells

And they all show up perfectly on top of each other.

  -k.

On 2016-06-01 at 18:01, Anna Petrášová <kratochanna@gmail.com> wrote:

On Wed, Jun 1, 2016 at 5:57 PM, Ken Mankoff <mankoff@gmail.com> wrote:
Maybe the points are not in the current computational region?

Another clue: When I try to convert to points with "v.to.points input=wells output=pts --o", I get the following errors (over and over and over again until I C-c):

WARNING: Unable to insert new record: 'insert into pts_2 values ( 25, 0 )'
aDBMI-SQLite driver error:
Error in sqlite3_prepare():
table pts_2 has 3 columns but 2 values were supplied

DBMI-SQLite driver error:
Error in sqlite3_prepare():
table C-c C-c
GRASS 7.0.3 (EQDC):~/projects/USGW_wells >

On Wed, Jun 1, 2016 at 5:49 PM, Ken Mankoff <mankoff@gmail.com> wrote:

Hi GRASS list,

I'm trying to import some vectors and use them to look up values on a raster using v.what.rast. I'm using GRASS 7.0.3. I'm getting the error,

No features of type (point) found in vector map <wells>

Which is un-googleable, but implies that my vector db doesn't have points. I'm creating the vector like this:

v.in.ascii --o format=point input=lon_lat_x_y_depth_id.csv output=wells separator=, x=3 y=4 z=0 cat=6 skip=1 columns="lon double precision, lat double precision, x double precision, y double precision, z double precision, id"

db.select table=wells | head

lon|lat|x|y|z|id|L1
-80.648|25.21|1754704.77|-1225843.51|12.77|251241080385301|
-80.566|25.321|1760685.92|-1211916.08|59|251922080340701|
-80.566|25.338|1760275.96|-1210078.02|38|252007080335701|

It might be missing category, because based on this:
https://trac.osgeo.org/grass/browser/grass/trunk/vector/v.what.rast/main.c#L207

points without category are skipped.

Best,
Anna

v.db.addcolumn map=wells column="L1 double precision"
v.what.rast map=wells raster=L130 column=L1

It seems like wells should be imported as point from v.in.ascii. I've tried "forcing" it with "format=point". I've tried converting after import with v.to.point. Nothing has worked yet.

Thanks,

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

Hi Anna,

On 2016-06-01 at 20:20, Anna Petrášová <kratochanna@gmail.com> wrote:

On Wed, Jun 1, 2016 at 5:49 PM, Ken Mankoff <mankoff@gmail.com> wrote:

Hi GRASS list,

I'm trying to import some vectors and use them to look up values on a
raster using v.what.rast. I'm using GRASS 7.0.3. I'm getting the
error,

No features of type (point) found in vector map <wells>

Which is un-googleable, but implies that my vector db doesn't have
points. I'm creating the vector like this:

v.in.ascii --o format=point input=lon_lat_x_y_depth_id.csv
output=wells separator=, x=3 y=4 z=0 cat=6 skip=1 columns="lon double
precision, lat double precision, x double precision, y double
precision, z double precision, id"

It might be missing category, because based on this:
https://trac.osgeo.org/grass/browser/grass/trunk/vector/v.what.rast/main.c#L207

points without category are skipped.

Yes. If I remove "cat=6" from the "v.in.ascii" command above, it works. I thought that I could assign a category column. No problem, it works for me this way too.

Thank you!

  -k.

On Thu, Jun 2, 2016 at 2:20 AM, Anna Petrášová <kratochanna@gmail.com> wrote:

On Wed, Jun 1, 2016 at 5:49 PM, Ken Mankoff <mankoff@gmail.com> wrote:

Hi GRASS list,

I'm trying to import some vectors and use them to look up values on a raster using v.what.rast. I'm using GRASS 7.0.3. I'm getting the error,

No features of type (point) found in vector map <wells>

Which is un-googleable, but implies that my vector db doesn't have points. I'm creating the vector like this:

v.in.ascii --o format=point input=lon_lat_x_y_depth_id.csv output=wells separator=, x=3 y=4 z=0 cat=6 skip=1 columns="lon double precision, lat double precision, x double precision, y double precision, z double precision, id"

db.select table=wells | head

lon|lat|x|y|z|id|L1
-80.648|25.21|1754704.77|-1225843.51|12.77|251241080385301|
-80.566|25.321|1760685.92|-1211916.08|59|251922080340701|
-80.566|25.338|1760275.96|-1210078.02|38|252007080335701|

It might be missing category, because based on this:
https://trac.osgeo.org/grass/browser/grass/trunk/vector/v.what.rast/main.c#L207

points without category are skipped.

The id values in the input are too large, e.g. 251241080385301, this
causes integer overflow, categories will be negative which is invalid,
thus points appear to have no category.

Markus M

Best,
Anna

v.db.addcolumn map=wells column="L1 double precision"
v.what.rast map=wells raster=L130 column=L1

It seems like wells should be imported as point from v.in.ascii. I've tried "forcing" it with "format=point". I've tried converting after import with v.to.point. Nothing has worked yet.

Thanks,

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

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

On Thu, Jun 2, 2016 at 8:55 AM, Markus Metz
<markus.metz.giswork@gmail.com> wrote:
...

The id values in the input are too large, e.g. 251241080385301, this
causes integer overflow, categories will be negative which is invalid,
thus points appear to have no category.

I darkly remember some discussion about the (non)possibility of
catching such issues but don't recall the output.
So: is there a way to inform the user about ID values in the input
being too large?

markusN