Twitter Updates

    follow me on Twitter

    15.1.10

    OziExplorer OZF format specification + open-source decoder!


    Yesterday I was testing the OZEX project, which intends to be an open-source replacement for the popular OziExplorer software. The most interesting on OZEX is that it is able to decode and display the Ozf2 and Ozfx3 binary files on Linux and other platforms and that the decoder is completely open-source!
    I know about other nice and open-source projects targeted to OziExplorer users with an advanced GUI and interesting features, look at the QLandKarte GT screenshots for example.

    This is for the first time I see open-source implementation of the OZF2 and OZFx3 binary format!
    It would be excellent to create a decoder also in the GDAL library (as a driver) because it would bring the OZF reading/decoding functionality into several open-source projects.

    I have submitted to the gdal svn a documentation of the format derived from the source codes, some sample files as well as links to the OZEX GPL code. More sample files can be generated with the img2ozf utility (runs well under Wine).
    Unfortunately I am now busy on another projects but I hope that some of the GDAL developers finds a bit of time to do the coding of the OZF driver...

    GDAL already has a preliminary support for the OziExplorer's .map files (textual metadata, think of advanced ESRI World File with included info about the map projection), but support for the binary formats from the OZF family (version 2 and version 3) would move the compatibility to a different level.

    OziExplorer is a very popular in the GPS and GeoCaching community. Support of the maps generated or georeferenced with this software in the OSGEO open-source tools would be great! I hope to see it in the near future in MapTiler, GRASS, QGis, MapServer, GeoServer and all the other FOSS GIS tools! Anybody interested in the coding for GDAL?

    13.1.10

    IIPImage JPEG2000: Free Software for Zoomable High Resolution Online Images

    As a technical manager of the OldMapsOnline.org project I am very pleased to post to this blog a note about our results:

    Moravian Library and the OldMapsOnline.org project are proud to announce the release of a new version of the open-source IIPImage server software (http://help.oldmapsonline.org/jpeg2000/).

    The freely available IIPImage software can be used for stunning online presentations of scanned documents, paintings, maps, books, newspapers, photographs or other high-resolution images on the web directly from JPEG2000 or TIFF files.

    The new version allows direct publishing from JPEG2000 images to a wide variety of different client technologies based on AJAX, Adobe Flash or Silverlight. These include popular pan&zoom viewers based on Zoomify or Seadragon technology (including the Seadragon AJAX viewer and the Seadragon iPhone application) as well as it's own AJAX enabled IIPMooViewer. The documents provided by IIPImage can be displayed in any web browser and on a number of platforms - Windows, Mac, Linux or iPhone.

    The software is primarily targeted at institutions who operate their own server connected to the Internet and who want to publish large collections of digital images directly from JPEG2000 or
    TIFF files.

    Institutions who does not have the necessary infrastructure can follow our alternative tutorial at http://help.oldmapsonline.org/publish/ on how to achieve the same using standard web hosting and free software.

    IIPImage is a light-weight client-server system for fast and efficient online viewing and zooming of ultra high-resolution images. It is designed to be bandwidth and memory efficient and usable over a slow Internet connection even on gigapixel sized images.
    It is available for free, under an open source license (GNU GPL). We recommend installing
    the software on a Linux (or other UNIX) server. We have prepared an easy to install binary package for Debian and Ubuntu with step-by-step instructions for installation.

    JPEG2000 support has been implemented using the Kakadu library, which provides one of the fastest implementations of the JPEG2000 ISO standard and is redistributable for non-commercial use.

    The enhancement of IIPImage was developed by the Moravian Library and the OldMapsOnline.org project with the support of grants from the Ministry of Culture of the Czech Republic.

    The Moravian Library (http://www.mzk.cz/), based in Brno, Czech Republic, is a research institution and a legal deposit library. Project OldMapsOnline.org (http://www.oldmapsonline.org/) is a research project of the Moravian Library that aims to develop software to assist in the management, manipulation and visualisation of historical map collections on the web. The project team is designing online tools for publishing, collaborative georeferencing, annotation, 3D visualisation, accuracy analysis and geometadata specification for old maps.

    For more information and for the IIPImage JPEG2000 software, see http://help.oldmapsonline.org/jpeg2000/.

    24.10.09

    Raster map reprojection (warping) with JavaScript and HTML5 Canvas

    I wanted to create something nice during the FOSS4G Code Sprint, and I ended up programing a prototype of the client-side raster reprojection implemented with the HTML5 Canvas, JavaScript and Proj4js. It is kind of port of gdalwarp into the web-browser environment.

    To try it you need a web browser which supports HTML5, it means the latest version of one of the Firefox, Chrome, Safari or Opera.

    Have a look at the demo:



    Link: http://examples.maptiler.org/map-reprojection-html5-canvas/

    It is just a prove of concept in this moment, but I am sure you will come up with plenty of ideas for practical application... post a comment! ;-)

    10.10.09

    Garmin Custom Maps KMZ from GeoTIFF via MapTiler / GDAL2Tiles



    Garmin rolled out beta version of firmware for their latest generation handheld GPS receivers allowing you to display scanned paper maps and another raster data in their navigation devices. They have chosen to do that with a simplified variant of Google Earth's KMZ format, so you can prepare maps for your Garmin even in Google Earth.

    On the Internet you can find plenty of free maps in the standardized GIS formats, which can be now transfered into your GPS device. Look at USGS topographic maps, USFS maps, or NOAA Nautical Charts, etc.
    These geodata has already high quality georeference embedded, but they are using different coordinate systems and map projections then Google Earth and this complicates the conversion into the form supported by latest Garmin handhelds.











    I am the author of MapTiler - a graphical application for Windows, Linux and Mac OS X, which allows extremely easy and user-friendly transformation of raster geodata into the web presentation (mashups) and tile overlay for Google Maps, Bing, Yahoo Maps, OpenStreetMap or Google Earth. You can download and use this software for free. And it is open-source!

    The application now supports direct export into the Garmin Custom Maps KMZ. If you have one of the supported Garmin devices you can try an example map: the USGS map of Grand Canyon encoded for Garmin GPS KMZ (9 MB) or the alternative from USDA Forest Service. (10 MB)

    Because I don't have a Garmin device with support of the KMZ, I would like to kindly ask those who have it and are going to use the Garmin rendering functionality to donate a few dollars via PayPal, so I can buy one of these devices and also cover the time I spent on the development of this new feature and on the new release of MapTiler.

    PLEASE WHEN YOU WILL ANNOUNCE SOMEWHERE THIS NEW GARMIN FUNCTIONALITY OF MAPTILER PUT THERE A NOTE ABOUT THE DONATION AS WELL.

    You can also include the donation gadget into your own web / blog post. Just copy and paste the HTML code.


    Donation is as easy as a click on the "Give" button in the PayPal giving widget in this blog post - you can use either PayPal or your credit card.

    I am keen to see if it is possible to raise enough funds to cover the costs for development this way.

    Thank you, if you send a donation...

    Klokan Petr Pridal

    P.S.
    Steps for Garmin map rendering:

    Download and install latest version of MapTiler application. When you start it: In the first step choose the Google Earth tiles rendering, then open your geodata file and continue till the Tile Details page. Choose from the tile formats one of the Garmin Custom KMZ maps. Probably best option is the 512 version. By default it renders the maximal quality where the map has less then 100 tiles (limit of the Garmin devices). If you are fine with lower image quality just choose smaller number for the maximal zoom level. In most cases the default should be fine. Then continue in the GUI to the final rendering step.
    The result is the map.kmz file, which can be directly used in your Garmin GPS.

    If you would like to use the command line for rendering instead of the GUI then it is done by calling:
    python gdal2tiles.py -p garmin map.tif
    You need the latest development version of GDAL to do that - and the new version of gdal2tiles which I will commit to SVN during the FOSS4G Code Sprint on this Saturday here in Sydney.

    It would be cool to buy the Garmin Oregon 400t (1099 CHF ~ 1065 USD) to test and be able to really use this MapTiler functionality, once I am back in Switzerland. ;-)

    I welcome patches improving the user interface or the functionality.

    27.11.08

    Tiles à la Google Maps: Coordinates, Tile Bounds and Projection...

    Google Maps Coordinates, Tile Bounds and Projection

    I prepared an online tool I was missing when I started to study how the tiling using Spherical Mercator runs in Google Maps, Virtual Earth, Yahoo Maps, OpenStreeMap and others... This tool can help you to understand how are the tiles referenced and how they are stitched together in the browser.

    I think this mashup could be an excellent starting point for people who are interested in this subject, because it contains all the math what you need for overlaying your own geodata from external sources: it can be tiles pre-generated by Maptiler/GDAL2Tiles following the OSGeo TMS recommendations, it can be raster data from WMS servers probably cached by TileCache, or tiles from MSR MapCruncher etc.

    The tool is excellent for fast debugging of tiling for particular area, because you can use the search for display the tiles of a given place.

    A transparent tile with correct coordinates is displayed for every original map tile by calling Google Chart API service.
    Whereever you click the longitude/latitude boundaries of the underlaying tile are displayed in WGS84 datum. Boundaries are also displayed in projected Mercator coordinates (EPSG:900913, EPSG:3785) and in pixels for active zoom level. This information is all you need for generating custom map tiles.

    The site contains also a Python script doing the coordinates and bounds calculation offline.

    So enjoy this mashup:

    Tiles à la Google Maps: Coordinates, Tile Bounds and Projection

    BTW This demo is part of the documentation of MapTiler application.

    5.11.08

    PNG palette with variable alpha: small and great for webbrowser

    I am working on the MapTiler/GDAL2Tiles open-source project for user-friendly static tile publishing of maps in the style of Google Maps. This project started as my Google Summer of Code project for OSGEO and results are published in coming GDAL 1.6.

    Recently I was testing several optimization of PNG for minimizing the tile size with preserving reasonable image quality as this is crucial for my application. Such optimization speeds up the download and also saves a lot of space on the hard disk. There is plenty of tools available for optimizing the size of PNG: advpng, pngrewrite, pngcrush, pngquant, scolorq, pngnq... I wanted to choose one of them for postprocessing of tiles (or probably later on integrate such optimization directly into GDAL).

    The best optimization of the PNG filesize is always based on reduction of the amount of used colors: when you switch from RGB(A) model to palette. What I didn't know before is that PNG supports palette with variable alpha. It means that part of the definition of every color in the palette is also its transparency. It is possible to use functionality usually available only with separate alpha channels but with palette!

    After switching to PNG with palette you need just half or even less of the space for your image raster data. Of course conversion from RGBA to palette is lossy operation for images with a lot of colors... but with well chosen algorithm for quantization it can be almost not recognizable for humans. Especially for small tiles like in MapTiler case.

    The PNG with the alpha palette is correctly displayed in all latest web-browsers like Firefox 2+, Safari, Explorer 7+ and also in Google Earth.
    But wait that is not all! Internet Explorer 5.5 & 6 displays such PNG files with (limited) transparency without HTML hacking! That is just great because it allows you to easily display map overlays in the old browsers by viewers like OpenLayers or Google Maps and still be able to dynamically change opacity for map overlay containing transparent parts!

    Well, if it is so great, how to produce such file? There is very nice open-source application for converting standard RGBA PNGs into this PNG8 with alpha palette:

    PNGNQ: http://pngnq.sourceforge.net/ (by Stuart Coyle and Greg Roelofs)

    It is using The NeuQuant Neural-Net image quantization algorithm (by Anthony Dekker) which was documented in this PDF article. With slightly modified version of this algorithm it converts standard PNG24 with RGBA into PNG8 with alpha palette. It is quite fast.
    The result PNG file has usually half of the size of the original.
    If you are crazy about the produced png size you can try to compress the file with pngcruch postprocessing step. Sometimes it decrese the size of the result even a bit more.

    The documentation at the PNGNQ project page recommends to run:

    pngnq -n 256 image.png && pngcrush image-nq8.png smallimage.png


    This PNGNQ tool is excellent for post-processing of PNG tiles generated from MapTiler/GDAL2Tiles...

    And it seems that the source code of the utility itself as well as of dependencies like NeuQuant algorithm is compatible with BSD license so they have a chance to find a way into GDAL or other open-source tools which are processing maps...

    3.11.08

    Opacity Control for Google Maps in official demo gallery



    One of the results of the MapTiler/GDAL2Tiles is an extension of Google Maps API for new functionality related to tile overlays. In summer I created an Opacity slider control for Google Maps which lets the user drag a slider to change the transparency of a TileLayerOverlay on the map.

    Recently I was contacted by Pamela Fox from Google and now she add my control to the official Google Maps API Demo Gallery.

    I still should add similar control to OpenLayers, but till now there was no time for that unfortunately. The design of the control is finished (done in SVG in Inkscape, same as the Google one), so only the coding in JavaScript is missing. Christopher Schmidt from OpenLayers recommended to create a new OpenLayers Addin.