[R-sig-Geo] Warning on projection (.getCRSfromGridMap4) from netcdf to brick

Andy Bunn Andy.Bunn at wwu.edu
Thu Aug 27 20:28:36 CEST 2015


Hello. I'm using data out of a netcdf object from here:
http://cida.usgs.gov/thredds/ncss/CA-BCM-2014/historical/dataset.html

The metadata has the projection info as:
#  <coordTransform name="albers_conical_equal_area"
transformType="Projection">
#  <parameter name="grid_mapping_name" value="albers_conical_equal_area"/>
#  <parameter name="latitude_of_projection_origin" value="0.0 "/>
#  <parameter name="longitude_of_central_meridian" value="-120.0 "/>
#  <parameter name="standard_parallel" value="34.0 40.5 "/>
#  <parameter name="false_easting" value="0.0 "/>
#  <parameter name="false_northing" value="-4000.0 "/>
#  <parameter name="units" value="km"/>
#  <parameter name="semi_major_axis" value="6378137.0 "/>
#  <parameter name="inverse_flattening" value="298.257222101 "/>
#  </coordTransform>

I can load the data fine using raster::brick but I'm having a warning
about the projection info that I don't understand:

R> fname <- "csl_cwd_pet_test.nc"
R> petBrick <- brick(fname,varname="HST_Monthly_pet")
Warning message:
In .getCRSfromGridMap4(atts) : cannot process these parts of the CRS:
spatial_ref=PROJCS["unnamed",GEOGCS["NAD83",DATUM["North_American_Datum_198
3",SPHEROID["GRS
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0
],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG"
,"4269"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_paralle
l_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_cente
r",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PA
RAMETER["false_northing",-4000000],UNIT["Meter",1]];
GeoTransform=-374495.83635354 270 0 592636.6658113 0 -270 ;
_CoordinateTransformType=Projection; _CoordinateAxisTypes=GeoX GeoY
R> proj4string(petBrick)
[1] "+proj=aea +x_0=0 +y_0=-4000 +lat_0=0 +lon_0=-120 +a=6378137
+rf=298.257222101 +lat_1=34 +lat_2=40.5"
R>




It looks to me like the projection parameters are FUBAR'd. Should I set
the CRS by hand?

Advice appreciated.

-Andy



More information about the R-sig-Geo mailing list