Are you using pygrass? On May 2, 2013 5:10 PM, "Allar Haav" <[email protected]> wrote:
> Hi, > > What would be the most efficient way of getting the coordinates for each > input raster cell? I'm using this in a Python script that creates a > separate cost surface (using r.cost) for each cell (yes, that is > computationally intensive thing indeed, but that's not a problem itself). > I've been using a simple function I made that creates a list of coordinates > via iteration starting from the region corner and using cellsize as a step. > But this does not check for null-values in the raster (which I would like > to exclude) and I'm also not very sure how it would play out with some > coordinate systems. One way to solve the null-value issue would be to > impose an r.what check, but this does not seem to be very elegant way to do > it. > Any suggestions? I'm more or less comfortable with using ctypes, so that > route would perhaps be the best in terms of performance. > > Regards, > Allar > ______________________________**_________________ > grass-user mailing list > [email protected] > http://lists.osgeo.org/**mailman/listinfo/grass-user<http://lists.osgeo.org/mailman/listinfo/grass-user> >
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
