how to transfer preojection gridtype to lonlat gridtype
Hi!
I'm trying to select the region, however, the gridtype of my file is projection, the 'sellonlatbox' fialed. Is there any command can transfer preojection to lonlat gridtype? or select the region base on the projection gridtpye?
The following is the information of the file:
# # gridID 1 # gridtype = projection gridsize = 64800 xsize = 360 ysize = 180 xname = x xunits = "m" yname = y yunits = "m" xfirst = -179.5 xinc = 1 yfirst = 89.5 yinc = -1 grid_mapping = spatial_ref grid_mapping_name = latitude_longitude crs_wkt = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' semi_major_axis = 6378137. semi_minor_axis = 6356752.31424518 inverse_flattening = 298.257223563 reference_ellipsoid_name = "WGS 84" longitude_of_prime_meridian = 0. prime_meridian_name = "Greenwich" geographic_crs_name = "WGS 84" horizontal_datum_name = "World Geodetic System 1984" spatial_ref = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' GeoTransform = "-180.0 1.0 0.0 90.0 0.0 -1.0"
Replies (2)
RE: how to transfer preojection gridtype to lonlat gridtype - Added by Uwe Schulzweida 2 months ago
The units of the x/y coordinates are wrong. You need to change this from "m" to "degrees..." so that the coordinates can be processed correctly:
ncatted -a units,x,o,c,"degrees_east" -a units,y,o,c,"degrees_north" GRACE_twsa_2003_2023.nc
RE: how to transfer preojection gridtype to lonlat gridtype - Added by wu yy 2 months ago
that's work!! Thank u so much!