[mapserver-users] Re: JPG Tile index in mapserver v5.6.3

Mark Korver mwkorver at gmail.com
Thu Apr 28 10:02:56 EDT 2011


Great answer from Jukka, just adding abit.

With jpg you have to have a world file.  One work-around to that is to
use tiff or more specifically Gtif/geotif which internally contains
the world file/projection info so doesn't need a external world file.

As Jukka explains the gtif way is better than the jpg way of doing
things for performance reasons anyway.

use gdal_translate to go from source ECW to tif ( geotif )
using the following params
-of GTIFF
-co TILED=YES
-co COMPRESS=JPEG
-co PHOTOMETRIC=YCBCR

On Thu, Apr 28, 2011 at 7:21 AM, Rahkonen Jukka
<Jukka.Rahkonen at mmmtike.fi> wrote:
> Hi,
>
> Jpeg file format is not good for a typical geospatial use when a little arbitrary piece of a big image should be opened and showed.
>
> I forgot one tiff creation option, use -co TILED=YES
>
> That way you can create a tiff image file which is internally organised as tiles which are fast to fetch without a need to read the whole big image file. The image data inside tiff can be compressed with jpeg algorithm which will give the same level of compression than using plain jpeg files.
>
> When it comes to your original ecw files and the jpeg files you have now in your hands, forward systematically.
> - check the original ecw with gdalinfo
> gdalinfo original.ecw
> - compare with the gdalinfo or the jpeg file
> gdalinfo jpeg.jpg
> - you should want to check the tileindex shapefile with some GIS program like OpenJUMP or QGis; check if the image footprint rectangles are there nice and if the LOCATION attribute has some reasonable value; consider running gdaltindex with -write_absolute_path if you are not sure about where the relative paths will lead
> - check the projections in your mapfile, both at MAP and LAYER level
> - add DEBUG 5 into your layer and read what you will get into MS_ERRORFILE
> - I trust that you will get your images shown and that you will easily find lots of interesting reading about the topic from the web.
>
> -Jukka Rahkonen-
>
>
>
>
>
>> -----Alkuperäinen viesti-----
>> Lähettäjä: mapserver-users-bounces at lists.osgeo.org
>> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta
>> marten.martinsson
>> Lähetetty: 28. huhtikuuta 2011 15:04
>> Vastaanottaja: mapserver-users at lists.osgeo.org
>> Aihe: [mapserver-users] Re: JPG Tile index in mapserver v5.6.3
>>
>> Hi Jukka!
>>
>> I already tried to change the file ending on the world file
>> but it didn´t
>> help.
>>
>> Not really with you on yor 2nd tip there.
>>
>> You want me to convert the jpg to tiff-files instead?
>> I am pretty new to GDAL so could you explain what the
>> functions actually
>> does?
>>
>> /M
>>
>>
>>
>> --
>> View this message in context:
>> http://osgeo-org.1803224.n2.nabble.com/JPG-Tile-index-in-mapse
> rver-v5-6-3-tp6312908p6312963.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
>>
> _______________________________________________
> 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