[gdal-dev] [EXTERNAL] Re: I have a problem getting higher resolution in a VRT file

Ward, Marston S. (GSFC-610.2)[ADNET SYSTEMS INC] marston.s.ward at nasa.gov
Mon Aug 24 04:26:02 PDT 2020


I’ve used ESMF quite a lot during my post doc as part of NCL. It’s a very good regridding tool; simple to use with lots of functionality.
Generating the weights, if you need to use this method, take a little time to create and then you simply apply them like a cookie cutter.

Hope this helps.


From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> on behalf of Chang Liao <changliao.climate at gmail.com>
Date: Sunday, August 23, 2020 at 1:08 AM
To: Stephen Woodbridge <stephenwoodbridge37 at gmail.com>
Cc: "gdal-dev at lists.osgeo.org" <gdal-dev at lists.osgeo.org>, "Rahkonen Jukka (MML)" <jukka.rahkonen at maanmittauslaitos.fi>
Subject: [EXTERNAL] Re: [gdal-dev] I have a problem getting higher resolution in a VRT file

Has anyone looked into the so called regrid in Earth system model? How is it different from GIS resampling?

Grid Remapping

ESMF has the option to build a standalone application, called RegridWeightGen<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.earthsystemcog.org_projects_regridweightgen&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=EFiJgIB5umvn8U9J6NTmmwOCMqomMKWHVJ2SfD2Frzw&e=>, that can generate interpolation weights in parallel. It's fast and can handle a wide variety of grids and grid options. It's not necessary to use the rest of ESMF to use it ... just provide grid files in a standard (netCDF-based) format.
https://www.earthsystemcog.org/projects/esmf/<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.earthsystemcog.org_projects_esmf_&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=TV4fXf7pZBWLsEO2JXG9-NOHXJmBYltuaFB_ors565w&e=>


Thanks.



On Thu, Aug 20, 2020 at 8:40 AM Stephen Woodbridge <stephenwoodbridge37 at gmail.com<mailto:stephenwoodbridge37 at gmail.com>> wrote:
Jukka,



Thanks those are great threads and very educational.

I solved my problem. I was using upsample="bilinear" rather than

upsampling="bilinear" and fixing this gave the expected results. But if

not for my stupid typo, I would not have had a chance to read those

threads and google others regarding upsampling.



Thanks for the assist,

-Steve



On 8/20/2020 10:13 AM, Rahkonen Jukka (MML) wrote:

> Hi,

>

> Resampling is science that would be nice to understand. Unfortunately I don't but I think that this thread is worth reading osgeo-org.1560.x6.nabble.com/gdal-dev-downsampling-geotiff-with-a-low-pass-filter-td5385890.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__osgeo-2Dorg.1560.x6.nabble.com_gdal-2Ddev-2Ddownsampling-2Dgeotiff-2Dwith-2Da-2Dlow-2Dpass-2Dfilter-2Dtd5385890.html&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=TXal_lZrArPU-zbwrfexbsf2Qvb2PdRg2gftiuDHXA0&e=>. In this gis.SE question cubic spline was considered good https://gis.stackexchange.com/questions/30627/smoothing-reinterpolating-raster-with-gdal<https://urldefense.proofpoint.com/v2/url?u=https-3A__gis.stackexchange.com_questions_30627_smoothing-2Dreinterpolating-2Draster-2Dwith-2Dgdal&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=KVyQa0XWkQle90WMihPdsRUOo7rGYd0bcO4iavrq0H4&e=>.

>

> -Jukka-

>

> -----Alkuperäinen viesti-----

> Lähettäjä: Stephen Woodbridge <stephenwoodbridge37 at gmail.com<mailto:stephenwoodbridge37 at gmail.com>>

> Lähetetty: torstai 20. elokuuta 2020 16.58

> Vastaanottaja: Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>>

> Aihe: Re: [gdal-dev] I have a problem getting higher resolution in a VRT file

>

> Hi Jukka,

>

> Any thoughts on what would be a better way to upsample and image using GDAL?

>

> I assumed, maybe incorrectly, that if I’m up sampling between two pixels with values of say 1 and 2 that a new pixel 50% between them would get a value of 1.5 and at 25% would get a value 1.25 etc. using linear interpolation and bilinear would also account for rows above and below the current row.

>

> Even, I specified resampling=“bilinear” in the vrt file is this ignored?

>

> Thanks, Steve

>

> Sent from my iPhone

>

>> On Aug 20, 2020, at 8:23 AM, jratike80 <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>> wrote:

>>

>> Even Rouault-2 wrote

>>> ...

>>> By default, VRT uses nearest resampling. You must specify something else.

>>> Look for "A resampling attribute can be specified" in

>>> https://gdal.org/drivers/raster/vrt.html<https://urldefense.proofpoint.com/v2/url?u=https-3A__gdal.org_drivers_raster_vrt.html&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=DF6beu2jDviD7F7np_eKCTpVWKapdeyv6tP9vMiUgMI&e=>

>>> ...

>>>

>>> --

>> Actually in the provided .vrt file I can see <SimpleSource

>> resample="bilinear">

>>

>> But isn't bilinear unsuitable for upsampling and some more blurring

>> method might work better?

>>

>> -Jukka Rahkonen-

>>

>>

>>

>> --

>> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__osgeo-2Dorg.1560.x6.nabble.com_GDAL-2DDev-2Df3742093.html&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=d6jyxN2ZrEBQFC__T8Sj1oYs-UlIf_IsN4-GlqyWSMs&e=>

>> _______________________________________________

>> gdal-dev mailing list

>> gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

>> https://lists.osgeo.org/mailman/listinfo/gdal-dev<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.osgeo.org_mailman_listinfo_gdal-2Ddev&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=HYO2u9pVjsgZZdTsYzwmPnQjySGNLExwnPch7xzADEk&e=>



_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.osgeo.org_mailman_listinfo_gdal-2Ddev&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=HYO2u9pVjsgZZdTsYzwmPnQjySGNLExwnPch7xzADEk&e=>
--

Best Regards!

Chang Liao,PhD
Earth Scientist, Atmospheric Sciences & Global Change Division
Pacific Northwest National Laboratory, WA, USA.
Email: changliao.climate at gmail.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__gmail.com&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=Daly4H0zoTYR6l714C4-xmuxXmbBdgvgEB6Q2Q1APik&e=>  or  chang.liao at pnnl.gov<https://urldefense.proofpoint.com/v2/url?u=http-3A__pnnl.gov&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=hvD2SncYX8BOZU4_p_tfZbj7HT_EhtW0-L3gygXDwTo&e=>
Personal Website: http://www.changliao.us<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.changliao.us&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=i6nmco-w6hzW_6TrSwilbgHHHAK7C87GyXJgBKQ9yDs&e=>
Skype: changliao1025
Lab Website: www.pnnl.gov<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.pnnl.gov&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=d9-Whdnf-TOkbqVja3ETyUOqHlFR1HbcWZvN0tb4JWU&m=gJ67R1rqmEZ1CNR6ZzSSdq0oVg69YSk0jOF6JHJUWqE&s=wEUuOfig7XjI1-Uem_tPSB9ZeYcmwgkXjVEmyFqO2EI&e=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200824/6aebfb96/attachment-0001.html>


More information about the gdal-dev mailing list