> Was wondering what the preferred method is to merge tile trees?
Right now gdal2tiles/maptiler can generate tiles from more input files
by reading a VRT file, which is text (XML) description of the merging
of another raster files.
VRT can be prepared during preprocessing step by one of the utilities:
gdal_vrtmerge or by preprocess.py from MapTiler SVN, or by
gdalbuildvrt from GDAL 1.7 (SVN).
You can also merge the files into one bigger GeoTIFF by gdalwarp or by
gdal_merge.py and then render tiles from that one.
I also implemented the true "merging of the tile trees" - the way that
you just select the existing directory with tile tree as the output
and gdal2tiles instead of overwriting tiles simply do the true alpha
channel composition in RGBA - then the old tiles are visible under the
newly rendered tiles in the overlay areas with transparency.
It is not yet committed but it running quite well. Remind me the
commit in the end of week - if you are interested ;-)
Klokan
--
http://blog.klokan.cz/
http://www.maptiler.org/
http://www.oldmapsonline.org/
From reading previous posts this was your recommendation in the past. Not a
developer but I can follow instructions really good..:)
My concern is that I want to do this with NOAA charts and not really sure if
this would work with files that are of a different scale but of the same
location. ie: 1:1000000, 1:50000, 1:20,000 all more or less of the same area.
Was wondering if you could confirm this so as to not go down the wrong road
and waste time.
Basically what I'm trying to copy or recreate but only for the Eastern
Seaboard as this is where I plan to sail is the following:
http://demo.geogarage.com/noaa/ and learning everything from scratch..:)
But have it run locally on my laptop as internet connections at sea are
limited. Hence the ability to toggle the basemap which already works fine
with maptiler is a requirement.
Its a great planning tool not intended to replace a proper ECS (electronic
charting system) rather supplement it.
> VRT can be prepared during preprocessing step by one of the utilities:
> gdal_vrtmerge or by preprocess.py from MapTiler SVN, or by
> gdalbuildvrt from GDAL 1.7 (SVN).
> You can also merge the files into one bigger GeoTIFF by gdalwarp or by
> gdal_merge.py and then render tiles from that one.
>
> I also implemented the true "merging of the tile trees" - the way that
> you just select the existing directory with tile tree as the output
> and gdal2tiles instead of overwriting tiles simply do the true alpha
> channel composition in RGBA - then the old tiles are visible under the
> newly rendered tiles in the overlay areas with transparency.
> It is not yet committed but it running quite well. Remind me the
> commit in the end of week - if you are interested ;-)
I've put a reminder into my calender..
Thanks for your response. Its really appreciated.
--
/ch
> My concern is that I want to do this with NOAA charts and not really sure if
> this would work with files that are of a different scale but of the same
> location. ie: 1:1000000, 1:50000, 1:20,000 all more or less of the same area.
> Was wondering if you could confirm this so as to not go down the wrong road
> and waste time.
It is possible to use gdal2tiles and GDAL library as a base for such
tile rendering and stitching... You can also use another open-source
projects like MapServer/TileCache or GeoServer or Mapnik...
But you need to make customization for particular tasks and chain the
tools correctly. That's exactly what I do for my customers, and in
case they allow me to publish the patches for gdal2tiles then new
features are appearing in the public gdal2tiles/maptiler utility...
BTW GDAL is also used in Google Earth or some ESRI products and is
behind a lot of software tools.
I am providing commercial consultancy and assistance for such tasks
(http://www.maptiler.com/) - including rendering of tiles in a cloud
(Amazon EC2 cluster, ..), correct merging and automatic clipping of
the collars from NOAA RNC and similar maps.
You are welcome to be one of my clients ;-)
> Basically what I'm trying to copy or recreate but only for the Eastern
> Seaboard as this is where I plan to sail is the following:
>
> http://demo.geogarage.com/noaa/ and learning everything from scratch..:)
People who needs tiles ONLY FOR PERSONAL USE in the laptop are very
often making a local copy from tile servers. I guess it would not be
hard to decode the JavaScript code which is doing the translation of
the x,y,z tile into the png tile and use it in a script for batch
downloading. Such scripts are very often source of the map data for
GPL navigation software and similar private projects like you are
describing.
Of course there are also ways how to protect tiles against such batch
download - if you look at it from the side of geodata provider.
To render your own maps would be definitively better but right now it
involves several steps and extra knowledge.
I plan to automate the process of raster merging in MapTiler the way
that it will allow completely user-friendly merging of datasets, but
this functionality is simply not yet available on the user level - I
have a set of script for particular sub tasks which needs to be used
properly in a chain to produce the correct results...
>> I also implemented the true "merging of the tile trees" - the way that
>> you just select the existing directory with tile tree as the output
>> and gdal2tiles instead of overwriting tiles simply do the true alpha
>> channel composition in RGBA - then the old tiles are visible under the
>> newly rendered tiles in the overlay areas with transparency.
>> It is not yet committed but it running quite well. Remind me the
>> commit in the end of week - if you are interested ;-)
>
> I've put a reminder into my calender..
OK ;-)
Best regards,
This is great news. Thank you. Since my truck broke down and Im off work for
the weekend will actually have time to play with it. Also owe you a response
from your previous post. That will also come over the weekend.
Again...thanks
--
/ch
several people had problem with installing PIL into the OSGeo4W to
test the merging with 'antialias' in GDAL2Tiles.
Here is a step by step guide how to do that after you have installed
OSGeo4W with GDAL1.6 as it is described at
http://help.maptiler.org/betatest/
1) Download attached "pythonregister.py" and save it directly to "C:"
2) Start OSGeo4W Shell (icon OSGeo4W on your Desktop).
3) type in "gdal16" to initialize gdal 1.6 libraries
4) type in "python C:\pythonregister.py"
5) you can close the OSGeo4W Shell and delete the pythonregister.py
file from your disk.
6) Download and run this installer:
http://effbot.org/downloads/PIL-1.1.6.win32-py2.5.exe, everything
should go well...
You are ready to use GDAL2Tiles with 'antialias' rendering, please
don't forget to upgrade to latest version of the gdal2tiles.py, so
download:
http://maptiler.googlecode.com/svn/trunk/maptiler/gdal2tiles.py and
save it to C:\OSGeo4W\apps\gdal-16\bin\
I will probably integrate PIL into the new version of MapTiler
installer to avoid this complicated setup and simplify the merging and
make it possible directly from the GUI. Just to find time to do that -
any sponsor ? ;-)
Best regards,
Klokan Petr Pridal