[R-sig-Geo] RES: Import Part of a GeoTiff using readGDAL{rgdal}
BHorn
bxhorn at gmail.com
Thu Jul 5 23:54:22 CEST 2012
The readpartGDAL function by Michael Sumner is simple and helpful for pruning
larger raster/DEM maps.
Please bear in mind the function code is consistent with a simple and
important assumption behind readGDAL that the data origin from which offset
row and column counting begins to define new dim regions is "usually the
upper left corner." Care is advised since some data sources (e.g. GOTOPO30)
do not conform to the usual assumption.
The function code needs a simple check to confirm the origin location and
adjust as needed. When the origin is the lower left, for example, a rev()
statement is needed before the Yaxis sequence named "ys". The section
commented "brain dead and easy" will easily cause the function to die absent
a control check.
Many thanks to Michael for his original post.
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Import-Part-of-a-GeoTiff-using-readGDAL-rgdal-tp5325799p7580393.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list