Closed mortenwh closed 10 years ago
Morten can you please provide more details in your issues? What was the input file at least? Did it have GCPs or geotransform?
It was a radarsat-2 file. I don't understand why it should be specific to rs2 though, so therefore this should be tested also on other data...
On 26 September 2013 08:45, akorosov notifications@github.com wrote:
Morten can you please provide more details in your issues? What was the input file at least? Did it have GCPs or geotransform?
— Reply to this email directly or view it on GitHubhttps://github.com/nansencenter/nansat/issues/33#issuecomment-25146771 .
Nansat.resize() with eResampleAlg > 1 was supposed to be used for getting smoothly resized matrices only. It was not supposed for keeping the Nansat object with correct geolocation information. Although it is not in documentation. Solving this issue is possible but is rather complicated. And it is an improvement than a bug-fix. I would rather postpone it until 0.6.
Then this should at least be clearly written in the documentation.... But I definitely think we should solve this for nansat - for me this is quite urgent unless we come up with another temporary solution. The functionality like it is now is not good because it gives the impression that nansat behaves similarly regardless of which algorithm is used in resizing.
On 27 September 2013 09:56, akorosov notifications@github.com wrote:
Nansat.resize() with eResampleAlg > 1 was supposed to be used for getting smoothly resized matrices only. It was not supposed for keeping the Nansat object with correct geolocation information. Although it is not in documentation. Solving this issue is possible but is rather complicated. And it is an improvement than a bug-fix. I would rather postpone it until 0.6.
— Reply to this email directly or view it on GitHubhttps://github.com/nansencenter/nansat/issues/33#issuecomment-25228680 .
... - so for v0.6 we'll return two one function which consistently resizes the nansat object for all values of eResampleAlg
Is it ok to use reproject()? Then, the shapes of images are changed.
No - the resulting arrays should be like the originals
On 18 October 2013 11:40, Asuka Yamakawa notifications@github.com wrote:
Is it ok to use reproject()? Then, the shapes of images are changed.
— Reply to this email directly or view it on GitHubhttps://github.com/nansencenter/nansat/issues/33#issuecomment-26583267 .
How do you think about move line 570-670 in nansat.resize() to VRT?
My plan is:
Problem: thumbnail() has 4 filters as NEAREST, BILINEAR, BICUBIC, or ANTIALIAS. CubicSpline and Lancoz are not included.
Any suggestions?
We cannot keep resized images in memory. That's the whole point of Nansat - lazy operations.
This ticket is closed, by the way.
What if (at least as a temporary workaround) we follow the method proposed by Asuka and write the resized data to temporary files like it is done in the VRT class with option 'nomem'=True? See lines 318-320 in vrt.py...
Can you please test fbb199b, Morten? I have solved #41 and committed together.
Seems to be fixed buy implementing #38
n0: Some nansat object
In [37]: n0.resize(0.5,eResampleAlg=1) In [38]: n0
ProjectionError: Empty projection in input dataset!
Same happens for eResampleAlg=2,3,4