[gdal-dev] How to use gdal_vrtmerge.py ?
Myeong Hun Jeong
mhjeong74 at gmail.com
Tue Sep 2 03:04:57 EDT 2008
Dear lists.
I want Tiled Map Service with openlayers.
There are 30 GigaBytes datasets(136 tif files from aerial photos).
For the first time, I use gdal_merge.py in order to make a single merged
file.
Next, I use gdal2tiles.py to generate tiled map images with openlayers.
However, it doesn't seem reasonnable to generate a single merged file.
Thus, I started using gdal_vrtmerge.py.
In my case, I downloaded FWTools226.exe and installed it in window xp.
but, I can't find gdal_vrtmerge.py file. so I downloaded it from
the Internet.
when I run gdal_vrtmerge.py, I encounter an error.
The error message is that
Traceback (most recent call last):
File "gdal_vrtmerge.py", line 27, in ?
from osgeo import gdal
ImportError: No module named osgeo
So, I chaned gdal_vrtmerge.py :from osgeo import gdal => import gdal
After changing it, It runs well.
For example, python gdal_vrtmerge.py -o C:\raster\tmp.vrt -separate
--optfile C:\raster\tilelist.txt
Next, I run gdal2tiles.py with tmp.vrt.
For instance, python gdal2tiles.py -title "test" -publishurl
http://myserver/geo/osmap/ -nogooglemaps -nokml -v C:\raster\tmp.vrt
C:\tmp\raster2
After running gdal2tiles.py, I can get tiled images.
But the problem is that when I look the images, the color of images are
changed from color to black and white.
Why didn't tiled images preserve their orginal color?
How to use gdal_vrtmerge.py?
If I use gdal_vrtmerge.py without -separate parameter,
e.g. python gdal_vrtmerge.py -o C:\raster\tmp.vrt -separate --optfile
C:\raster\tilelist.txt
an error take place :
C:\GEOFOSS\FWTools2.2.6\bin>python gdal_vrtmerge.py -o
C:\raster\tmp.vrt --optfile C:\raster\tilelist.txt
Traceback (most recent call last):
File "gdal_vrtmerge.py", line 293, in ?
t_fh.write('\t\t<NoDataValue>%f</NoDataValue>\n' %
TypeError: float argument required
Best regards,
Jeong.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080902/49bc395c/attachment.html
More information about the gdal-dev
mailing list