[gdal-dev] EXT: Re: Rotated lat lon projection

Michael Sumner mdsumner at gmail.com
Mon Sep 5 01:35:08 PDT 2022


Ok, thanks for the file. Here's a gist just to show you it works, I use R
so I've got some checks I do around the core gdalwarp call which can be as
minimal as

gdalwarp  20220902T00Z_MSC_HRDPS_HGT_SFC_RLatLon0.0225_P001.grib2 out.tif
-t_srs "OGC:CRS84"

You should consider the specification of the target grid yourself, with a
combination of some of -tr, -ts, -te, and -t_srs arguments. Also the -r
resampling argument, default is nearest neighbour.

https://gist.github.com/mdsumner/d73748c44aef4a0923760401d3dc605d

Cheers, Mike


On Mon, Sep 5, 2022 at 5:21 PM De Juan De España, Javier <
jajuan_ext at acciona.com> wrote:

> Hi Mike!
>
>
>
> Thank you very much for your response.
>
>
>
> Attached you can find a grib2. Trying to test this on QGIS (Uses GDAL
> behind), it automatically opens it with  right projection so I guess GDAL
> Will do the same.
>
>
>
> In this file, first grid point should be something like:
>
>
>
> Thank you very much!!
>
>
>
>
>
> *De:* Michael Sumner <mdsumner at gmail.com>
> *Enviado el:* sábado, 3 de septiembre de 2022 8:59
> *Para:* De Juan De España, Javier <jajuan_ext at acciona.com>
> *CC:* gdal-dev <gdal-dev at lists.osgeo.org>
> *Asunto:* EXT: Re: [gdal-dev] Rotated lat lon projection
>
>
>
> First step is try shoving it through the warper:
>
>
>
> gdalwarp in.nc
> <https://clicktime.symantec.com/15t5ZrhtFMk6q5dh8yXpr?h=f3NsNfYLCjuppp90Nv9-oEa-gZU0oRBfBuHIbBwMVFs=&u=http://in.nc>
> out.tif
>
>
>
> set lonlat extent with -te and resolution with -ts or -tr
>
>
>
> GDAL knows about projections and internal coordinate arrays and often this
> is enough, the smart things come down to what output grid you define and
> what resampling algorithm is used and whether it's appropriate (beware of
> vector quantities for example).
>
>
>
> Use a VRT intermediate to first select out one band to test with
> (gdal_translate in.nc
> <https://clicktime.symantec.com/15t5ZrhtFMk6q5dh8yXpr?h=f3NsNfYLCjuppp90Nv9-oEa-gZU0oRBfBuHIbBwMVFs=&u=http://in.nc>
> in1.vrt -b 1). If you have a test file I'm happy to explore.
>
>
>
> Even if the auto stuff doesn't work you can engineer a lot with just
> command line args and VRT even for complex grids.
>
>
>
> Cheers, Mike
>
>
>
> On Thu, 1 Sept 2022, 23:57 De Juan De España, Javier, <
> jajuan_ext at acciona.com> wrote:
>
> Hi!
>
>
>
> We are developping a meteorology project in the Canadian domain where we
> use gdal to manage grib files.
>
> These *files are “rotated lat-lon” and we would like to switch to
> “regular lat-lon”* easily. I’m concerned that lastest versions of gdal
> can do this, but i would really appreciate some indications or information
> about how to do this.
>
>
>
> Thank very much!
>
>
>
> Javier de Juan
>
>
>
>
>
> [image: logo-bau]
>
>
>
>
>
>
>
> *Javier de Juan de España*
>
> Project Manager
>
> Smart Society Skill Center
>
> Digital Hub
>
> Avda Europa, 18
>
> 28108 Alcobendas (Madrid) – Spain
>
> +34 687 53 86 53
>
> [image: flecha]
>
> WWW.ACCIONA.COM
> <https://clicktime.symantec.com/15t5pMHjdCnt4v7TmejGi?h=bsqBMl9kpV7pNEC9p7lA_BzAvITG8lgP7QbVur0i_lg=&u=https://www.acciona.com/es/>
>
> [image: twitter]
> <https://clicktime.symantec.com/15t5jX6TAb7HeyHYE6L86?h=-cIW40zXsiDGS34xBnF2qp0NFHQYcOLzae3_uhhM6P0=&u=https://twitter.com/ACCIONA>
>
> [image: facebook]
> <https://clicktime.symantec.com/15t5uBV25pUUUrwPKD8RL?h=54T_VUKmdZlQ25O0tl3wf8KTqvyNg3vKMSd6fc0UwDU=&u=https://www.facebook.com/acciona>
>
> [image: link]
> <https://clicktime.symantec.com/15t64qsb13qfJkbEQKvia?h=qP3wZRbx16RE2f9KqOZAFBfB0BsCiaiJdhQ6uIgX_GY=&u=https://www.linkedin.com/company/acciona>
>
> [image: you]
> <https://clicktime.symantec.com/15t69g4sTfXFihR9wtKsC?h=smitgw2XvRmwLj9vHPFdbXjFyts7YW6yT7TAiJN1aOo=&u=https://www.youtube.com/user/interacciona1?sub_confirmation%3D1>
>
> [image: insta]
> <https://clicktime.symantec.com/15t5z1gJYSA4tomJrmXZx?h=lsjgYLW3UgtJbbPBFBcqNBMP-9OUhZJgVLPeWqFyTaE=&u=https://www.instagram.com/acciona/>
>
>
>
>
>
>
>
>
>
>
>
> Este mensaje se dirige exclusivamente a su destinatario, y puede contener
> información confidencial sometida a secreto profesional, o cuya divulgación
> esté legalmente prohibida. Cualquier opinión en él contenida es exclusiva
> de su autor y no representa necesariamente la opinión de la empresa. Si ha
> recibido este mensaje por error, le rogamos nos lo comunique de forma
> inmediata por esta misma vía y proceda a su eliminación, así como a la de
> cualquier documento adjunto al mismo. El correo electrónico vía Internet no
> es seguro y no se puede garantizar que no haya errores ya que puede ser
> interceptado, modificado, perdido o destruido, o contener virus. Cualquier
> persona que se ponga en contacto con nosotros por correo electrónico se
> considerará que asume estos riesgos.
>
>
>
> This e-mail is addressed exclusively to the recipient and may contain
> privileged information under a professional confidential agreement or it
> may be against the law to disclose its contents. Any opinion contained in
> it belongs exclusively to his/her author and does not necessarily reflect
> the company’s view. If you receive this e-mail in error, please let us know
> immediately (by return e-mail) and proceed to its destruction, as well as
> any document attached to it. The sending of e-mails through the Internet is
> not safe and, therefore, error-free communications cannot be guaranteed, as
> they can be intercepted, changed, misled or destroyed or they might contain
> a virus. Any user contacting us through e-mails shall be understood to be
> assuming these risks.
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
> <https://clicktime.symantec.com/15t5eguAhyRhF2TcgXvyU?h=Jd9BayZPGNA7ZxhvY-_xqfQhPjPrNZePw5xra7kazGY=&u=https://lists.osgeo.org/mailman/listinfo/gdal-dev>
>
>
>
>
>
>
>
> Este mensaje se dirige exclusivamente a su destinatario, y puede contener
> información confidencial sometida a secreto profesional, o cuya divulgación
> esté legalmente prohibida. Cualquier opinión en él contenida es exclusiva
> de su autor y no representa necesariamente la opinión de la empresa. Si ha
> recibido este mensaje por error, le rogamos nos lo comunique de forma
> inmediata por esta misma vía y proceda a su eliminación, así como a la de
> cualquier documento adjunto al mismo. El correo electrónico vía Internet no
> es seguro y no se puede garantizar que no haya errores ya que puede ser
> interceptado, modificado, perdido o destruido, o contener virus. Cualquier
> persona que se ponga en contacto con nosotros por correo electrónico se
> considerará que asume estos riesgos.
>
>
>
> This e-mail is addressed exclusively to the recipient and may contain
> privileged information under a professional confidential agreement or it
> may be against the law to disclose its contents. Any opinion contained in
> it belongs exclusively to his/her author and does not necessarily reflect
> the company’s view. If you receive this e-mail in error, please let us know
> immediately (by return e-mail) and proceed to its destruction, as well as
> any document attached to it. The sending of e-mails through the Internet is
> not safe and, therefore, error-free communications cannot be guaranteed, as
> they can be intercepted, changed, misled or destroyed or they might contain
> a virus. Any user contacting us through e-mails shall be understood to be
> assuming these risks.
>


-- 
Michael Sumner
Software and Database Engineer
Australian Antarctic Division
Hobart, Australia
e-mail: mdsumner at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220905/4a4cace0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 2327 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220905/4a4cace0/attachment-0001.png>


More information about the gdal-dev mailing list