<a href="http://www.gis.usu.edu/~chrisg/python/2009/lectures/ospy_slides4.pdf">http://www.gis.usu.edu/~chrisg/python/2009/lectures/ospy_slides4.pdf</a><br><br><div class="gmail_quote">2011/1/12 Sebastian E. Ovide <span dir="ltr"><<a href="mailto:sebastian.ovide@gmail.com">sebastian.ovide@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font face="arial, helvetica, sans-serif">thanks for that... </font><div><font face="arial, helvetica, sans-serif"><br>
</font></div><div><font face="arial, helvetica, sans-serif">What I'm looking for is something like <span style="white-space:pre-wrap">ReadRaster but using the coordinates system used by the raster... (it could be lat,long etc...)</span></font><div>
<font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">otherwise I would need to do something like</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">cs=read_raster_coordinate_system()</span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">(x,y)= cs.convert_from_cs_to_pixel_xy(x,y)</span></font></div><div><font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">pixel=ReadRaster </span></font></div>
<div><font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap"><br></span></font></div><div><font face="arial, helvetica, sans-serif"><span style="white-space:pre-wrap">is there any single line command to do that ?<br>
</span></font><br><div class="gmail_quote">2011/1/12 Jorge Arévalo <span dir="ltr"><<a href="mailto:jorge.arevalo@deimos-space.com" target="_blank">jorge.arevalo@deimos-space.com</a>></span><div><div></div><div class="h5">
<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div>On Wed, Jan 12, 2011 at 4:57 PM, Sebastian E. Ovide<br>
<<a href="mailto:sebastian.ovide@gmail.com" target="_blank">sebastian.ovide@gmail.com</a>> wrote:<br>
> Hi All,<br>
> what would be the simpler way to read a pixel value from a raster using<br>
> python ?<br>
> something like pixelvalue=read(x,y) where x,y and in the raster coordinate<br>
> system<br>
> thanks<br>
><br>
> --<br>
> Sebastian E. Ovide<br>
><br>
><br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
><br>
<br>
Hi Sebastian,<br>
<br>
This may help you:<br>
<a href="https://svn.osgeo.org/postgis/trunk/raster/scripts/python/pixval.py" target="_blank">https://svn.osgeo.org/postgis/trunk/raster/scripts/python/pixval.py</a><br>
<br>
Best regards,<br>
<font color="#888888"><br>
--<br>
Jorge Arévalo<br>
Internet & Mobilty Division, DEIMOS<br>
<a href="mailto:jorge.arevalo@deimos-space.com" target="_blank">jorge.arevalo@deimos-space.com</a><br>
<a href="http://mobility.grupodeimos.com/" target="_blank">http://mobility.grupodeimos.com/</a><br>
<a href="http://gis4free.wordpress.com" target="_blank">http://gis4free.wordpress.com</a><br>
<a href="http://geohash.org/ezjqgrgzz0g" target="_blank">http://geohash.org/ezjqgrgzz0g</a><br>
</font></blockquote></div></div></div><br><br clear="all"><br>-- <br>Sebastian E. Ovide<br><br><br><br><br>
</div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Sebastian E. Ovide<br><br><br><br><br>