[MAPSERVER-USERS] Serving jpeg tiles - is there a howto?

thomas bonfort thomas.bonfort at gmail.com
Sun Dec 14 05:28:08 EST 2008


hi,
the "easiest" way imho would be to create a custom batch script that
creates wld georeferencing files for each of your jpegs:

- use grep on the file name to extract the upper left coordinate (minx, maxy)
- calculate the size of a single pixel (either from the image size and
extent, or hardcoded if all your images have the same pixel size)
- write the georeferencing matrix to disk (check
http://duff.ess.washington.edu/data/raster/drg/tfw.html)
- check with gdalinfo that your georeferencing is taken into account

cheers,
thomas

On Sun, Dec 14, 2008 at 11:13, bibbob <tew24 at cam.ac.uk> wrote:
>
> Hello,
>
> Sorry if this question is a bit newbie-ish, but I've searched quite a bit
> for a guide on how to do this and haven't come up with anything yet.
>
> I have a pile of JPEG images which are tiles of a map.  I'd like to serve
> them as a layer in MapServer (to use them within OpenLayers, but that's
> another story).  Each image has its co-ordinates built into the filename,
> like so:
>
> ~/tiles $ ls
> tile-250000-253000-340000-343000.jpg  tile-256000-259000-340000-343000.jpg
> tile-262000-265000-340000-343000.jpg  tile-268000-271000-340000-343000.jpg
> tile-250000-253000-343000-346000.jpg  tile-256000-259000-343000-346000.jpg
>
> The list is truncated - the format is tile-minX-maxX-minY-maxY.jpg where the
> origin is in the bottom-left of the map.
>
> I've read that I can use gdaltindex to create the shapefile to index these
> tiles, but when I try it, it complains that they aren't georeferenced:
> "It appears no georeferencing is available for
> `tile-271000-274000-358000-361000.jpg', skipping."
>
> ...which is understandable, as they're just JPEGs.  Any idea how I tell it
> where each tile is?  How do I put this into Mapserver?  If there's a HOWTO
> or similar out there that I've missed, could someone please let me know
> where it is?
>
> Thank you.
>
> PS. Sorry about the newbieness - there's just so much to learn about mapping
> software and I'm a bit lost.
> --
> View this message in context: http://www.nabble.com/Serving-jpeg-tiles---is-there-a-howto--tp20998876p20998876.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list