In iGIS v5, we have added the ability to load and view your own raster imagery on maps. Many of our users have asked for this functionality, and new features of iOS 4 have allowed us to do it. Working with raster imagery is CPU and memory intensive when done poorly, so we had to think of a process which avoids overloading the iPhone’s resources.
What we have chosen to do is pre-process imagery using an opensource tool, MapTiler. This tool converts many image formats into a series of tiles, similar to the Google map tiles. We then use these tiles in the app as an overlay on the map, allowing us to retain great map speed, since the app doesn’t have to re-project to re-process any imagery. We’re very happy with the results, and hope that you will be too.
Several steps are involved in getting your imagery onto the app, however once you have been through the process a first time, you should find these steps simple to replicate and well worth the effort.
- Install the MapTiler software on your PC or Mac – only needed the first time.
- Re-project and tile your maps using MapTiler.
- Zip up the resulting imagery directory.
- Copy the zip file to the iPhone using our importer or via USB (we’ve got USB importing in V5 too).
- Add the layer to the map.
To install MapTiler, please download from maptiler.org, and follow the instructions on the web site to install.
Once you have the software installed on your Mac or PC. Follow the wizard interface. I’ve provided the settings that I’ve used below.
Chose the Google Map compatible tiles – that’s what we’re using.
Choose the file that you wish to convert.
If your imagery is geo-referenced you should see projection information in this screen. Otherwise you may have to define the geo-referencing information yourself using the ‘Georeference’ button.
The Zoom Levels are automatically calculated, however you may have to zoom the may in or out to see the imagery. You can always reduce the minimum or increase the maximum zoom to see the imagery at more scales.
PNG produces the best results, but you may want to try JPEG if space is an issue, however you may end up with black borders around the imagery.
Choose a directory where the resulting files will be created.
Select Google Maps here. Others could be chosen too. This helps when testing.
Select the defaults here.
Press Render to start creating image tiles.
Once the rendering is complete, which may take a long time depending on the size of your imagery, it is a good idea to test the results. Click on the directory hyperlink to go the tile directory.
You will see that a directory has been created with several sub-directories. Have a look at the images in the directories to see what the tiler has done.
Don’t delete tilemapresource.xml, this is the file we use in iGIS.
Click on googlemaps.html to test out whether MapTiler did it’s job. You may need to zoom in or out to see the imagery on the map.
You need to zip or compress the directory that Map Tiler created. On a Mac use Compress on a PC you can use a free zip utility, like 7 Zip.
Start iTunes with your iPhone connected, and bring up the File Sharing section under the Apps tab on your device. See Help on Import for more information. Add the zip file you created and this will automatically sync to the iPhone.
Go into Import mode on your iPhone and the imagery will appear.
Select your image and press Import.
Now edit your Project settings and choose Add Layer. Select the Imagery layer type.
Add the image that you have just created.
Go to your project, pan and zoom to your imagery in the map. Hopefully you see the imagery perfectly aligned to your other data.
Note: The project extent button will not automatically zoom to image bounds. You will have to manually pan and zoom. We’ll fix this in an update.
I hope that you’ve been able to follow this tutorial. Please contact us if you have any queries and I hope that you enjoy using iGIS with your own imagery.