Opened 12 years ago
Closed 9 years ago
#1848 closed defect (fixed)
r.in.poly from stdin
| Reported by: | zarch | Owned by: | rashadkm |
|---|---|---|---|
| Priority: | minor | Milestone: | 7.0.0 |
| Component: | Raster | Version: | svn-trunk |
| Keywords: | r.in.poly, fseek, G_fseek | Cc: | |
| CPU: | x86-64 | Platform: | Linux |
Description
I'm trying to use r.in.poly with the bash pipe, below is reported the code for the North Carolina mapset.
echo """A
633599.00 225397.00
641147.00 223978.00
640818.00 219318.00
631750.00 222965.00
= 42 stadium""" | r.in.poly input=- output=rtest
but it return:
ERROR: Unable to seek
What is it not able to seek?
Attachments (1)
Change History (6)
comment:1 by , 12 years ago
| Keywords: | r.in.poly added |
|---|
by , 12 years ago
| Attachment: | r_in_poly.diff added |
|---|
comment:2 by , 12 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
G_fseek is issuing a fatal error instead of non-fatal replacing G_fseek with fseek will solve the problem Find the attached patch
comment:4 by , 9 years ago
| Keywords: | fseek G_fseek added |
|---|
Thanks for catching this. This was fixed in r38703 for GRASS 7:
- source:grass/trunk/raster/r.in.poly/get_item.c#L59
- source:grass/trunk/raster/r.in.poly/poly2rast.c#L57
- source:grass/trunk/raster/r.in.poly/getformat.c#L22
Closing as fixed.
comment:5 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Now I see that the path is the other way around. So, probably something similar to what was suggested in #1685 should be done. r.in.poly test suite should be extended for the case from this ticket.
It would be good to describe in the manual why fseek works while G_fseek() fails, or fix G_fseek().

G_fseek fix