Mapinfo vector data to Google Maps Tiles using gdal2tiles

654 views
Skip to first unread message

eigentx

unread,
Dec 6, 2008, 4:07:20 AM12/6/08
to MapTiler User Group
Hello,

First of all, congratullations for this tool, I've been testing with
small PNG maps and it works very good. I'm looking forward for the GUI
to be released.

Now, after testing, I want to generate Google Maps tiles for huge
vector data (with geographic features in polygons) I have in mapinfo
file format (TAB, MIF). These data is using UTM coordinates.

I've been thinking in some approaches, but I would like some help in
order to focus the task with the best of the options.

The steps I think I need to cover:
- Re-project the data to Google Maps shperical mercator coordinates
within Mapinfo.
- Generate image (TIFF, PNG...) (Which is the best fot gdal2tiles?)
from the vector data either:
* Using mapinfo thematic maps features, and exporting to image format.
* Converting TAB to ESRI shapefile with Universal Translator Mapinfo
tool, then using geotools to generate an image from the specified
shapefile styling with SLD:
http://geotools.codehaus.org/How+to+render+a+shape+file,+style+with+SLD,+zoom,+pan+--+jdk+1.5+geotools+2.1.M4
* Other?
- Once I have the image file (TIFF/PNG), generate tiles using
gdal2tiles. Does gdal2tiles takes into account that the origin
coordinates of my data (top left corner coordiantes of my data) could
not be the same than the associated GMaps tile top left corner
coordinates, does the tool take care of the "displacement"?
- More ?

Which do you think could be the best approach? I would like it to be
as more programmatic as possible, since the idea is to process the
source data in batch processes automatically.

I'm quite newbie to GIS stuff, so forgive my misconceptions if any.

Any help would be highly appreciated.

Thanks in advance,

eigenTx.





Klokan Petr Přidal

unread,
Dec 7, 2008, 12:36:55 PM12/7/08
to mapt...@googlegroups.com
Hi eigenTx,

> The steps I think I need to cover:
> - Re-project the data to Google Maps shperical mercator coordinates
> within Mapinfo.

MapTiler/GDAL2Tiles can do the reprojection for you internally. You
can work with your data in the original coordinate system (UTM you
wrote) and just export it into raster for GDAL2Tiles...

> - Generate image (TIFF, PNG...) (Which is the best fot gdal2tiles?)

GeoTIFF is the format with best support in GDAL.

> from the vector data either:
> * Using mapinfo thematic maps features, and exporting to image format.

That would be good way... but keep in mind that MapTiler/GDAL2Tiles is
primary targeted to processing raster images.

In general it would be probably better for you to render tiles
directly from your shapes by using one of the projects like Mapnik, or
CASA GMapCreator (links are down at http://www.maptiler.org/). There
are also several commercial tools like Arc2Earth or GlobalMapper and
other doing that.

You can still use MapTiler/GDAL2Tiles for your tasks... it depends on
type of data you have, on your existing workflow and on the quality of
rendering needs and other factors...

> * Converting TAB to ESRI shapefile with Universal Translator Mapinfo
> tool, then using geotools to generate an image from the specified
> shapefile styling with SLD:
> http://geotools.codehaus.org/How+to+render+a+shape+file,+style+with+SLD,+zoom,+pan+--+jdk+1.5+geotools+2.1.M4

When you will use anyway GeoTools or MapServer to render tiles then
you can also setup GeoWebCache or TileCache.org to cache the tiles...
and then you don't need MapTiler/GDAL2Tiles at all.

> * Other?

> - Once I have the image file (TIFF/PNG), generate tiles using
> gdal2tiles. Does gdal2tiles takes into account that the origin
> coordinates of my data (top left corner coordiantes of my data) could
> not be the same than the associated GMaps tile top left corner
> coordinates, does the tool take care of the "displacement"?

As soon as your raster has correct reference system (you know EPSG
code for example) and has geographic location (World File for
example), then everything else is done automatically. You don't have
to care about the tile corners or other things you just need to
prepare correct input raster... for example in GeoTiff format.

> - More ?
>
> Which do you think could be the best approach? I would like it to be
> as more programmatic as possible, since the idea is to process the
> source data in batch processes automatically.

It depends on the kind of data you have, on the update frequency and
other things... I am providing commercial consultancy for such
workflows... contact me directly if you would like.

In case you need to process a lot of raster data in a batch I have a
parallel version of GDAL2Tiles and I can give you advices how to setup
your systems for best performance. GDAL2Tiles is usable even on a
cluster of computers and was successfully used on huge rasters already
(hundreds of gigabytes).

Maybe I will once add support for shape rendering by utilizing mapnik
and cascading style sheets, but it does not have high priority yet, as
there is more things on the MapTiler TODO list already:
http://help.maptiler.org/todo/.

MapTiler/GDAL2Tiles is primary targeted to raster processing (scanned
maps for example)... keep that in mind...

Best regards

Klokan

Reply all
Reply to author
Forward
0 new messages