projectRaster() to Goode Homolosine
Thanks for the fast answer!
This is the extent as given by the USGS -- it's a global map.
Actually, what is given is:
Projection Type: Interrupted Goode Homolosine
Units of measure: meters
Pixel Size: 1000 meters
Radius of sphere: 6370997 m.
XY corner coordinates (center of pixel) in projection units (meters):
Lower left: (-20015000, -8673000)
Upper left: (-20015000, 8673000)
Upper right: (20015000, 8673000)
Lower right: (20015000, -8673000)
The "interrupted areas" (where there is no real map/world) are filled
with dummy values in the binary file.
Note the difference in sign for xmn/xmx and ymn/ymx. The resulting
plot looks fine.
All the best,
Birgit
Zitat von Forrest Stevens <forrest at ufl.edu>:
Hi Birgit, there's something wrong with your call to raster() as the xmin/xmax and ymin/ymax values should not be identical. Could you confirm what the proper extent should be for the raster you're creating? Forrest On Tue, Jun 4, 2013 at 12:27 PM, Birgit Mannig <birgit.mannig at uni-wuerzburg.de> wrote:
Dear all, I tried to project a Raster file (orignal projection: UTM) to a file in the Goode projection. The re-projection with proj4 was obviosly not correct, neither was a re-projection from a geographical lon/lat file. Does anyone know if this is a general problem with R/proj4? Otherwise, I might have produced a faulty raster file. I used the USGS Global Ecosystem Data (http://edc2.usgs.gov/glcc/globdoc2_0.php), provided as raw binary, and had to create the Raster myself: ny <- 17347 nx <- 40031 goge <- raster(xmn=-20015500,xmx=20015500,ymn=-8673500,ymx=8673500,nrows=ny,ncols=nx,crs="+proj=goode +a=6370997") values(goge) <- binfromFTP Although the created Raster File looked good to me naturally the error could still occur in this step. Afterwards I just used: projectRaster(infile,goge, method="ngb") Any hints are very much appreciated! Kind regards, Birgit
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
-- Forrest R. Stevens Ph.D. Candidate, QSE3 IGERT Fellow Department of Geography Land Use and Environmental Change Institute University of Florida www.clas.ufl.edu/users/forrest
Dipl.-Geogr. Birgit Mannig Universit?t W?rzburg Institut f?r Geographie und Geologie -Physische Geographie- Zi. 120 Am Hubland 97074 W?rzburg Tel. +49-931-31-81319 Fax. +49-931-31-85544 birgit.mannig at uni-wuerzburg.de