2

I have private sonar data in KMZ format, and can easily produce more. I understand that OpenLayers cannot use KMZ files, so my question is if it can handle the uncompressed KML file with all the PNG images. Since all geographic information is in the KML file it should work, right? I've tried with GML and vector layers but just haven't managed to make it show up yet...

My solution so far has been to use MapTiler, create tiles and then use a xyz layer. But I would rather use my KMZ if possible.

1

If you render raster data into map tiles you have to choose whether you want to create a Google Earth tiles (in Plate Carree) for displaying in KML/KMZ or Google Maps tiles (Mercator) for displaying in the web viewers such as OpenLayers, Google Maps, Leaflet, etc.

These uses two different map projections. Cartographically correct solution is to render two different tile sets with MapTiler (http://www.maptiler.com/) and host these separately.

In the MapTiler in the first screen you can make this choice, either "Mercator tiles" or "Google Earth".

enter image description here

I would recommend to go for two different datasets.

Technically, a hack which would display the Mercator tiles in Google Earth could be done as well - this could run for the deep-zoomed viewes - but if your data covers large regions (countries,states,continents) the differences between the map projections would already be visible as a north-south shift while zooming. See my documentation and source code in python at http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/ if you are into this approach. Still this is a hack and proper solution is mentioned above - with two distinct tilesets.

  • Thanks for the informative answer! My only reason for wanting to use KMZ is that our sonar software can export to KMZ (and GeoTIFF etc). My existing web page uses OpenLayers so I need my data to work with that. Using one more software (MapTiles) for converting my data (from GeoTIFF) is annoying but not a big problem. And as software goes MapTiles seems to be a smooth program. Again, thanks! – Martin Liungman Oct 3 '14 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.