[GRASS-dev] Pygrass - Getting pixel infos from a raster map
Lucas lefevre
lucas.lefevre at hotmail.com
Tue Mar 14 12:18:29 PDT 2017
Hi,
I'm new to Grass and Grass development.
I'm writing a script using pygrass that should interact with areas in a raster map (output of i.segment). The final goal would be to highlight some of them to the user.
But I can't even figure out how get infos from the different segments or even the raw pixels.
When instantiating a RasterSegment object (https://grass.osgeo.org/grass70/manuals/libpython/pygrass.raster.html#pygrass.raster.RasterSegment) and using the method .get(row, col) it gives me -2147483648 for .get(0,0) and other values for 'row' and 'col' give 0.
This doesn't make any sense to me, am I missing something ?
(Note that both .exist() and .is_open() give True on the RasterSegment object)
Any help would be appreciated !
Lucas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20170314/62e3c69b/attachment.html>
More information about the grass-dev
mailing list