[R-sig-Geo] Reading National Snow and Ice Data Center binary files

Thomas.Adams at noaa.gov Thomas.Adams at noaa.gov
Wed Oct 19 22:19:04 CEST 2011


Tony,

I certainly don't want to belabor the point, but GRASS GIS with R is fully scriptable (shell, Perl, whatever); I have done this with many projects. GRASS shell scripts are far easier to write in my experience than ArcGIS. Several of my scripts are completely automated and run off of cron on Linux systems.

Tom

----- Original Message -----
From: Anthony Fischbach <afischbach at usgs.gov>
Date: Wednesday, October 19, 2011 2:04 pm
Subject: Re: [R-sig-Geo] Reading National Snow and Ice Data Center binary	files
To: r-sig-geo at r-project.org


> Thank you for the GRASS suggestion.
> It would also be straight forward in ArgGIS, but I seek to run this 
> all in a
> scripting environment with the full flexibility of R such that I may
> automate the whole process.
> 
> Following on the projectRaster idea, I have tried using the from and to
> options, first creating a from raster corresponding to the geographic 
> extent
> and resolution of the desired output raster.
> 
> > ll_lt <- 30.98
> > ll_ln <- 168.35
> > ur_lt <- 33.92
> > ur_ln <- 279.26
> > rGeo <- raster(nrows=448, ncols=304, xmn=ll_ln, xmx=ur_ln, ymn=ll_lt,
> > ymx=ur_lt, crs="+proj=longlat +datum=WGS84")
> > ## look at the raster before projecting
> > rr
> class       : RasterLayer 
> dimensions  : 448, 304, 136192  (nrow, ncol, ncell)
> resolution  : 25000, 25000  (x, y)
> extent      : -3837500, 3762500, -5362500, 5837500  (xmin, xmax, ymin, 
> ymax)
> coord. ref. : +proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 
> +y_0=0
> +a=6378273 +b=6356889.449 +units=m +no_defs 
> values      : ...\SeaIce\NSIDC\NearRealTime\nt_20111011.tif 
> min value   : 0 
> max value   : 1 
> > ## Project
> > rgeo <- projectRaster(from=rr, to=rGeo, method= 'bilinear')
> > rgeo
> class       : RasterLayer 
> dimensions  : 448, 304, 136192  (nrow, ncol, ncell)
> resolution  : 0.3648355, 0.0065625  (x, y)
> extent      : 168.35, 279.26, 30.98, 33.92  (xmin, xmax, ymin, ymax)
> coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
> values      : in memory
> min value   : 0 
> max value   : 0 
> 
> It fails to populate with the data.
> 
> -----
> Tony Fischbach, Wildlife Biologist
> Walrus Research Program
> Alaska Science Center
> U.S. Geological Survey
> 4210 University Drive
> Anchorage, AK 99508-4650
> 
> AFischbach at usgs.gov
> 
> --
> View this message in context: 
> Sent from the R-sig-geo mailing list archive at Nabble.com.
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
>



More information about the R-sig-Geo mailing list