[GRASS-user] flip raster
José María Michia
jose.maria.michia at gmail.com
Tue Oct 7 03:29:43 EDT 2008
2008/10/6 Hamish <hamish_b en yahoo.com>:
> José María Michia wrote:
>> > I've imported a NetCDF file (ETOPO1 model). The resulted raster appears
>> > flipped vertically. How can I fix this?
>
> hmmm, this problem sounds vaguely familiar.
>
> Is this the dataset from:
> http://www.ngdc.noaa.gov/mgg/global/global.html
>
> ?
>
> if so, which version? the cell/grid registration thing is a slight pain.
Yes: grid-registered version, netCDF format.
The same problem (vertical inversion) occurs with QGIS. Same in GMT,
with an strange (to me) situation: one GMT program produce normal
maps.
The same problem (vertical inversion) is produced with QGIS.
And so does GMT, but one of GMT programs produce the expected result:
This, produce vertical inverted map:
$ grdraster 1 -R-80/-50/-50/-20 -Gargentina.nc
$ grdimage argentina.nc -JM6i -P -B2 -Ctopo.cpt -V -K > topo.ps
grdraster extract a subset of netCDF grid. Definition for grdraster id 1 is:
1 "ETOPO1 global topography" "m" -R-180/180/-90/90 -I1m
GG i 1 0 none
/mnt/hdb1/geodata/etopo/ETOPO1_Bed_g.grd B
And this produces the expected map:
$ grdcontour -R-80/-50/-50/-20
/mnt/hdb1/geodata/etopo/ETOPO1_Bed_g.grd -JM6i -P -B2 -C250 -A1000 >
topo2.ps
But, this map is a contour map, not raster map. So, is not adequate
for GRASS import.
I'm downloading the cell-registered version, I will try again with this version.
With the alternative suggested by Hamish (see below), no need to
import this file.
Alexander: Thanks for your suggestion. I will take into account the
CDO program in the future.
Another idea for those interested: an alternative might be to use the
GDAL program to convert the file into another format NetCDF middle, a
format for which it is possible to import into GRASS. This
intermediate format can be ASCII, to be able to easily modify it as
needed.
> for importing 1' global elevation from:
> http://topex.ucsd.edu/marine_topo/mar_topo.html
> here are some hints, including ETOPO2:
> http://grass.osgeo.org/wiki/Marine_Science#Bathymetric_data
Thanks for the suggestions. I've found the desired data in
http://topex.ucsd.edu/cgi-bin/get_data.cgi
>
> Hamish
Saludos
José María
More information about the grass-user
mailing list