[Gdal-dev] Re: Resample map from C#

Tomas R monshi at home.se
Wed May 30 17:19:08 EDT 2007


Ari Jolma skrev:
> Tomas R kirjoitti:
>> I ran the code together with the image in the ticket and nothing 
>> happened to the picture.
>>
>> But I'm not sure if I am on the right track.
>>
>> What I would like to do is not reproject the map in anyway. What I am 
>> after is a possibility to down sample an image/a map using some good 
>> interpolations technique.
>
> Sounds like you simply need ReadRaster (in original size) and 
> WriteRaster (in a new size) and do the interpolation in between and 
> create/open/flush/close around.
>
> At least that's the simple man's approach...
>
> Ari
>
>
Well, since there seems to be nothing else in gdal to use... I hoped 
that I could call on some code that would to that for me..That is the 
simple man's approach :)

I guess it is not that hard to do it with my own code...not a big hard 
algorithm...the biggest problem is probably to decide how big piece of 
the map I am to resample at each step.

Totally OT -
Trying, command line, to translate a part of a  RIK-map to GeoTIFF. 
During the translation a lot of the geo-information is lost. For example 
what datum and what sphere the map projection use. ESPG data also is 
lost. No good, no good.
Should I create a ticket for this somewhere?
(the command I use is:
gdal_translate.exe -of gtiff  -projwin 1612005 6602275 1645680 6570945 
-CO COMPRESS=LZW ab.rik terr Stor_test.TIFF
)
Or to I have to set the projection by hand in the command line?

Yours
Tomas




More information about the Gdal-dev mailing list