Hi, I added a section to the docs today about creating imagery for OAM:
http://docs.oam.osgeo.org/storage/creating.html Creating OAM imagery requires a recent GDAL -- though note that building GDAL is a very simple task on Mac + Linux, since it has almost all of the dependencies you would need built in. I've also spent most of the day working on understanding the state of the tools for dealing with OpenAerialMap imagery, with its internal mask bands. Here's some information there: 1. Any OAM image can be turned into a 'normal' alpha image by simply running 'gdal_translate -b 1 -b 2 -b 3 -b mask final.tif myimage.tif'; this will take the mask band and apply it as a normal alpha band. 2. In order to use OAM imagery with internal masks in MapServer, you must be running MapServer 6.0. Additionally, it seems like some output formats support these bands, while others do not; via a WMS request with no outputformat blocks included, image/jpeg does not work, but jpeg does. Still, if you have a stack of OAM images in a tileindex, you can use these in mapserver and the mask bands will be properly respected. 3. For building a mosaic of imagery, gdalwarp is able to take in a set of images and mosaic them, respecting the mask bands. This allows you to create 'normal' images out of mosaiced OAM images that you can then use with any existing tool. This isn't a particularly quick operation; for some reason, it seems much slower than the set of corresponding gdal_translate operations, which I'm not sure of the reason for -- but it works. Some things that don't work: 1. Smashing the bands into the images, then gdalbuildvrt, does not work; I *think* this is because the alpha bands from the VRT stack? I don't know really. This is what produced: http://tools.openaerialmap.dotcloud.com/static/nantucket_sm5.jpg http://tools.openaerialmap.dotcloud.com/static/nantucket_sm6.jpg 2. gdalbuildvrt on the OAM images followed by gdal_translate does not work; I think that it's not getting the mask bands at all. 3. Older versions of MapServer before 6.0 do not respect mask bands. 4. MapServer 6.0 with image format=image/jpeg doesn't seem to work; I assume this can be fixed with a correctly formatted outputformat, but I don't know what that outputformat is. 5. gdalbuildvrt without -resolution highest will take the average resolution of images, not the highest resolution, which is not what you want for your VRTs. 6. Whenever building indexes or VRTs or using gdalmerge, make sure you order your inputs from lowest resolution to highest; any other ordering will result in your low res images on top of your high res images, which is not what you want :) In any case, the end result of what I spent all day on is going from: http://tools.openaerialmap.dotcloud.com/static/nantucket_sm.jpg which looks good, but has lines, to: http://tools.openaerialmap.dotcloud.com/static/nantucket_island.jpg which does not. The way I generated that particular image was to use: $ oam-fetch -b -70.3456,41.2250,-69.9556,41.4255 -d out4 $ GDAL_CACHEMAX=1000 gdalwarp -co TILED=YES -wm 500 -te -70.3174 41.141 -69.9556 41.440 `ls *.tif|tac` out.tif $ gdal_translate out.tif -outsize 7% 7% -of JPEG ../current/static/nantucket_island.jpg Regards, -- Christopher Schmidt Web Developer _______________________________________________ talk mailing list [email protected] http://host134.hostmonster.com/mailman/listinfo/talk_openaerialmap.org
