[GRASS-dev] Addons: r.horizon single point mode segfault
Glynn Clements
glynn at gclements.plus.com
Thu Sep 25 21:50:58 EDT 2008
Markus Neteler wrote:
> I tried to use r.horizon in single point mode but it segfaults:
> (gdb) r elevation.dem step=30 direction=15 bufferzone=200
Spearfish?
> coord=-103.75026822,44.43602767
Hmm.
> 1101 z_orig = zp = z[yindex][xindex];
> xindex = -19662
> yindex = -163781
>
> What could be the problem here?
> xcoord = -103.75026822
> ycoord = 44.436027670000001
This:
194 stepx = cellhd.ew_res;
195 stepy = cellhd.ns_res;
215 xmin = cellhd.west;
216 ymin = cellhd.south;
461 xmin = new_cellhd.west;
462 ymin = new_cellhd.south;
1073 xindex = (int)((xcoord - xmin) / stepx);
1074 yindex = (int)((ycoord - ymin) / stepy);
suggests that coord= is supposed to be cartographic coordinates, but
coord=-103,44 is way outside of the Spearfish region (~600000,4920000).
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list