Tubaman
unread,Apr 20, 2011, 11:24:45 AM4/20/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to MapTiler User Group
Hi,
I've got an aerial photo with an SRS of OSGB36 / British National Grid
(EPSG:27700), from which I'd like to create TMS tiles using maptiler
or gdal2tiles. The problem I am seeing is that the image resolution
of the resulting tiles is lower than the original image, which I'm
hoping shouldn't be the case.
I get the exactly the same result whether I use maptiler or
gdal2tiles. The command line I use is simply:
gdal2tiles -s EPSG:27700 SP3796.jpg
The input file is .jpg, with a matching .jgw world file. The input
file resolution is 0.25 metres (+0.25 for X, -0.25 for Y). The
resulting tile reprojection works fine, with the tiles positions
lining up correctly with Google maps tiles for the same area. But if
I view the tiles at 100% scaling (1 screen pixel per image pixel, side
by side on the same screen with the original image), features on the
tile images are smaller (represented by less pixels) on the tile than
they are in the source image.
I thought maybe it was a problem with the underlying GeoTransform, so
for a test I tried:
gdalwarp -s_srs EPSG:27700 -t_srs EPSG:900913 SP3796.jpg SP3796.tif
Interestingly, looking at the metadata in the resulting geotiff image
the resolution is stated as 0.4110741398m (positive for X, negative
for Y as expected). But viewing this tif image at 100% scaling
correctly shows features at the same size as the source image (i.e. a
feature takes up the same number of pixels in both images). This
confuses me, as I don't see how the resolution (metres per pixel) can
be different between the two images but things be shown the same
size. However, as this is what I want (the original resolution/level
of detail maintained when viewing), I guess it's just the resolution
image tag definition which I don't understand.
Anyway, if anyone with a better understanding of these things than me
(I'm a geo-newbie) has a clue as to how I can get gdal2tiles to
maintain the resolution (and thus quality) of the source image I'd be
most interested to hear. I realise there's going to be some quality
loss due to the reprojection but if I can get the same result as the
above gdalwarp I'll be happy!
Thanks in advance for any help.