[GRASS-user] trouble with r.in.gdal to georeference a NetCDF file
Lee Eddington
lee.w.eddington at gmail.com
Thu Nov 14 01:02:19 PST 2013
Michael,
Thank you very much for the help. Yes that worked. I imported the data
and then specified the bounds with r.region. A couple of issues though:
1) the map projection of the original NetCDF data grid is a Mercator
projection, so now the raster is not georeferenced exactly right. Is there
a way to change the projection to Mercator and correct this? 2) the lat
lon values I put in for the bounds in r.region are for the center of the
cells, so do I need to add half a grid cell padding on each edge when I
specify the region?
The NetCDF file also includes grids of lat and lon values for each grid
cell. Is there anyway to properly georeference the raster in GRASS using
this data? I seemed to have run across people mentioning this as an
option, but it was never spelled out how to do it.
I still don't understand why r.in.gdal can't determine the georeferencing
directly from the NetCDF file as the information is included in the file
and other graphics viewer programs are able to do so. I've found a few
scattered references to this same problem in user lists, but haven't found
where anybody has gotten r.in.gdal to figure out the georeferencing
directly from the NetCDF file.
Thanks again,
Lee
On Wed, Nov 13, 2013 at 10:30 PM, Michael Barton <Michael.Barton at asu.edu>wrote:
> Lee,
>
> I just tested r.in.gdal on a NetCDF map I got from NCAR a year and a
> half ago. Here is the command:
>
> r.in.gdal -o -l input="NETCDF:"/Users/cmbarton/Dropbox/Research
> Projects/NCAR/other_netcdf/ppt_SRESA2_mid_annual_down_anomaly.nc":ppt"
> output=test_delete
>
> This works fine, imported into a latlon region. If you'd like to test it
> out, here is the link to the file:
>
>
> https://www.dropbox.com/s/dfgn2lvt9xmmtwa/ppt_SRESA2_mid_annual_down_anomaly.nc
>
> If this does NOT work for you, there is something off with your gdal
> installation. Try downloading and reinstalling gdal for the dev versions
> from my site. Let me know how it turns out
>
> Michael
>
> ____________________
> C. Michael Barton
> Director, Center for Social Dynamics & Complexity
> Professor of Anthropology, School of Human Evolution & Social Change
> Arizona State University
>
> voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
> fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>
>
>
>
>
>
>
>
>
>
>
>
> On Nov 13, 2013, at 10:37 PM, Lee Eddington <lee.w.eddington at gmail.com>
> wrote:
>
> Michael,
>
> That was my post. I still haven't gotten the problem resolved. I
> didn't think a question about what's in your GDAL binaries was appropriate
> for there, but I will post it if you feel it might be helpful.
>
> Thanks,
> Lee
>
> On Wed, Nov 13, 2013 at 6:18 PM, Michael Barton <Michael.Barton at asu.edu>wrote:
>
>> Lee,
>>
>> I've just seen a very similar issue come across the GRASS user list.
>> Could you post to that list so that more users and developers can help to
>> debug it?
>>
>> Michael
>> ____________________
>> C. Michael Barton
>> Director, Center for Social Dynamics & Complexity
>> Professor of Anthropology, School of Human Evolution & Social Change
>> Arizona State University
>>
>> voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
>> fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
>> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20131114/7d8b83c8/attachment.html>
More information about the grass-user
mailing list