Re: [GRASS-user] Correct import of a global grid (0E to 360E) to GRASS (-180W to 180E).
Michael wrote: Which way does it get flipped? Most NetCDF files will import via r.in.gdal correctly, but they are displayed as (from L-R) as 0-180E/180W-0. This is the way that most climate model files are created and then stored. It's not a climate model, but that's exactly the way it gets flipped. Hamish wrote: note I've had some data in the past which either had bad meta- data embedded in it or GDAL was reading wrong. GRASS itself should deal with 0-360 longitudes just fine for raster maps. But if the import goes wrong for whatever reason it is easy to fix by resetting the bounds with r.region. Thanks a lot, that solved it. Believe it or not I never used r.region, so it didn't come into my mind: Simply doing: r.region map=mymap e=180 w=-180 did the trick. Thanks again. Best regards, Marcello. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Correct import of a global grid (0E to 360E) to GRASS (-180W to 180E).
Hi Marcello, It sounds like you're trying to import your map into the wrong coordinate system. If you have the correct coordinate system of the NetCDF, you should be able to define a location with that CRS using either the correct EPSG code or a WKT string. If need be, you can always create a WKT string as well, although I don't know how to do that. Best, Daniel -- B.Sc. Daniel Lee Geschäftsführung für Forschung und Entwicklung ISIS - International Solar Information Solutions GbR Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder Softwarecenter 3 35037 Marburg Festnetz: +49 6421 379 6256 Mobil: +49 176 6127 7269 E-Mail: l...@isi-solutions.org Web: http://www.isi-solutions.org 2012/6/30 Marcello Gorini gor...@gmail.com Dear all, I am pretty sure this must be easy, but I just can't find the correct answer. My grid is a netcdf geographic grid that spans from 0E to 360E and from 90N to -90S. I use r.in.gdal to import it, but it gets flipped since GRASS region spans from -180W to 180E. How to do it right? Thanks in advance. Best regards, Marcello. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Correct import of a global grid (0E to 360E) to GRASS (-180W to 180E).
Thanks for he fast response Daniel: you should be able to define a location with that CRS using either the correct EPSG code or a WKT string. I don't have the EPSG code. Only know that it isin lat long and that long is 0-360. If need be, you can always create a WKT string as well, although I don't know how to do that. Me neither. I will keep trying. Thanks again. Best, Marcello. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Correct import of a global grid (0E to 360E) to GRASS (-180W to 180E).
Which way does it get flipped? Most NetCDF files will import via r.in.gdal correctly, but they are displayed as (from L-R) as 0-180E/180W-0. This is the way that most climate model files are created and then stored. This presents some problems in displaying vector overlays (I've reported this to the bug tracker). There has been a problem in NetCDF files importing upside down. This fixed in the current version of GDAL AFAICT. Michael On Jun 30, 2012, at 1:00 PM, grass-user-requ...@lists.osgeo.org wrote: From: Marcello Gorini gor...@gmail.com Subject: [GRASS-user] Correct import of a global grid (0E to 360E) to GRASS (-180W to 180E). Date: June 30, 2012 4:36:19 AM MDT To: grass-user@lists.osgeo.org Dear all, I am pretty sure this must be easy, but I just can't find the correct answer. My grid is a netcdf geographic grid that spans from 0E to 360E and from 90N to -90S. I use r.in.gdal to import it, but it gets flipped since GRASS region spans from -180W to 180E. How to do it right? Thanks in advance. Best regards, Marcello. From: Daniel Lee l...@isi-solutions.org Subject: Re: [GRASS-user] Correct import of a global grid (0E to 360E) to GRASS (-180W to 180E). Date: June 30, 2012 5:05:45 AM MDT To: Marcello Gorini gor...@gmail.com Cc: grass-user@lists.osgeo.org Hi Marcello, It sounds like you're trying to import your map into the wrong coordinate system. If you have the correct coordinate system of the NetCDF, you should be able to define a location with that CRS using either the correct EPSG code or a WKT string. If need be, you can always create a WKT string as well, although I don't know how to do that. Best, Daniel -- B.Sc. Daniel Lee Geschäftsführung für Forschung und Entwicklung ISIS - International Solar Information Solutions GbR Vertreten durch: Daniel Lee, Nepomuk Reinhard und Nils Räder Softwarecenter 3 35037 Marburg Festnetz: +49 6421 379 6256 Mobil: +49 176 6127 7269 E-Mail: l...@isi-solutions.org Web: http://www.isi-solutions.org _ C. Michael Barton Visiting Scientist, Integrated Science Program National Center for Atmospheric Research University Consortium for Atmospheric Research 303-497-2889 (voice) Director, Center for Social Dynamics Complexity Professor of Anthropology, School of Human Evolution Social Change Arizona State University www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Correct import of a global grid (0E to 360E) to GRASS (-180W to 180E).
Michael wrote: Which way does it get flipped? Most NetCDF files will import via r.in.gdal correctly, but they are displayed as (from L-R) as 0-180E/180W-0. This is the way that most climate model files are created and then stored. note I've had some data in the past which either had bad meta- data embedded in it or GDAL was reading wrong. GRASS itself should deal with 0-360 longitudes just fine for raster maps. But if the import goes wrong for whatever reason it is easy to fix by resetting the bounds with r.region. This presents some problems in displaying vector overlays (I've reported this to the bug tracker). note the vector lib and modules not nearly as robust wrt 180 longitude as the raster lib modules are. mostly a function of age I guess. There has been a problem in NetCDF files importing upside down. This fixed in the current version of GDAL AFAICT. Right, you can work around that one with the r.flip addon module. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user