Zoom levels and tile size

939 views
Skip to first unread message

gingerbbm

unread,
Oct 23, 2009, 11:39:39 AM10/23/09
to MapTiler User Group
Dear all

Tried MapTiler out for the first time today on a TIFF/TAB file
combination and was very impressed with the ease at which I ended up
with an OpenLayers web page tiling my raster data. I'm now wondering
how I can:

1. change the size of the generated tiles to 300x300
2. generate tiles for particular zoom levels

I have an existing OpenLayers application into which I want to add
this raster data at a few zoom levels. Is this possible with MapTiler,
or do I need to use gdal2tiles at the command line?

Any and all information very much appreciated.

Thanks
Stuart

klo...@gmail.com

unread,
Oct 26, 2009, 10:40:57 PM10/26/09
to mapt...@googlegroups.com
Hi Stuart,

I am glad you like MapTiler. Why do you need to do the mentioned operations?

When you generate the tiles in "raster" profile - with custom
coordinates and map projection - an example OpenLayers presentation is
supplied. This is your base layer and you can combine it with other
data sources in OpenLayers (like KML, WFS, WMS, etc) with a bit of
coding in JavaScript.

> I have an existing OpenLayers application into which I want to add
> this raster data at a few zoom levels. Is this possible with MapTiler,
> or do I need to use gdal2tiles at the command line?

If you would like to add the tiles into an existing OpenLayers
application, then you have to think about the map resolutions (meters
per pixel), extents etc. You would need to pre-process the input
rasters in advance to be able to correctly tile the raster data.

If you are using Global Mercator (Google Maps-like tiles) or Global
Geodetic (unprojected WGS84) then things are much easier, because the
extents and resolution for zoom levels are already defined.

Ad your question:

> 1. change the size of the generated tiles to 300x300

There is a --tilesize parameter in the latest version of gdal2tiles -
we will soon commit it.

> 2. generate tiles for particular zoom levels

This functionality is in the MapTiler GUI as well as in the command
line under "-z" or "--zoom".

Best,

Klokan
--
http://blog.klokan.cz/
http://www.maptiler.org/
http://www.oldmapsonline.org/

gingerbbm

unread,
Oct 27, 2009, 1:46:25 PM10/27/09
to MapTiler User Group
Hi Klokan, thanks for your reply.

I work on an application that uses Ordnance Survey StreetView raster
data, along with other types, to provide mapping for the UK. The
projection is OS National Grid, or EPSG:2770.

This is the application (click "Map Roadworks" to see the map):
http://www.elgin.gov.uk

We use different types of mapping at different zoom levels. The
StreetView tiles are visible at 1:10000, 1:7500 and 1:5000 and were
generated by seeding a MapGuide map. The quality of the tiles is poor,
and they don't appear to tile very well, so I've been looking at ways
to reseed the tile cache - and that's how I discovered MapTiler.

So, in short, I'd like to create a set of tiles at those three zoom
levels from the original raster data.

Is this possible?

Thanks
Stuart

klo...@gmail.com

unread,
Nov 1, 2009, 1:18:50 AM11/1/09
to mapt...@googlegroups.com
Hello Stuart,

> I work on an application that uses Ordnance Survey StreetView raster
> data, along with other types, to provide mapping for the UK. The
> projection is OS National Grid, or EPSG:2770.
>

> We use different types of mapping at different zoom levels. The
> StreetView tiles are visible at 1:10000, 1:7500 and 1:5000 and were
> generated by seeding a MapGuide map. The quality of the tiles is poor,
> and they don't appear to tile very well, so I've been looking at ways
> to reseed the tile cache - and that's how I discovered MapTiler.
>
> So, in short, I'd like to create a set of tiles at those three zoom
> levels from the original raster data.
>
> Is this possible?

If you have no problem with changing your map projection and warp your
images into Spherical Mercator (which is defacto standard for map
tiles on the web) then it is possible right now - just choose the
"Google Maps like tiles".

If you would like to stay with OSGB coordinates (EPSG:27700) then it
is slightly more problematic to create tiles where you combine
different data-sources - you don't find this functionality in the
MapTiler GUI.
But MapTiler/GDAL2Tiles can support this kind of tile rendering once a
small modification is done in the source code by a programmer of if
you preprocess the data a bit.

Problem is that Ordnance Survey National Grid does not have any
predefined tile pyramid scheme, so there is no officially accepted
definition of the tiling for Ordnance Survey National Grid (beside the
best practice example in
http://openspace.ordnancesurvey.co.uk/openspace/).

I will be glad to assist in this kind of tiling once I return from
holiday (November 23rd). Please contact me directly on my personal
email if you are interested.

Best regards,

Klokan Petr Pridal

Reply all
Reply to author
Forward
0 new messages