Difference between revisions of "Banc d'essai comparatif"

From OSGeo
Jump to navigation Jump to search
(New page: == Banc d'essai comparatif pour MrSid, ECW, TIF, JPG2000 == Au Ministère de la sécurité publique du Québec, nous avons voulu tester la performance de Mapserver avec 4 formats d'images...)
 
m
Line 52: Line 52:
 
Les annexes qui suivent, montre les lignes de commandes, mapfile et logfile du banc d'essai.
 
Les annexes qui suivent, montre les lignes de commandes, mapfile et logfile du banc d'essai.
  
 +
==Annexe==
 
-----------------------------------------------------
 
-----------------------------------------------------
 
Annexe 1 - shp2img batchfile
 
Annexe 1 - shp2img batchfile
 
-----------------------------------------------------
 
-----------------------------------------------------
 +
<pre>
 
del C:\Travail\sid\*.jpg<br>
 
del C:\Travail\sid\*.jpg<br>
 
shp2img -m C:\Travail\sid\img2.map -l tif -i jpeg -o C:\Travail\sid\tif-fullview.jpg
 
shp2img -m C:\Travail\sid\img2.map -l tif -i jpeg -o C:\Travail\sid\tif-fullview.jpg
Line 64: Line 66:
 
shp2img -m C:\Travail\sid\img2.map -l sid -i jpeg -o C:\Travail\sid\sid-ext.jpg -e 219589 5347860 226045 5353101
 
shp2img -m C:\Travail\sid\img2.map -l sid -i jpeg -o C:\Travail\sid\sid-ext.jpg -e 219589 5347860 226045 5353101
 
shp2img -m C:\Travail\sid\img2.map -l jp2 -i jpeg -o C:\Travail\sid\jp2-ext.jpg -e 219589 5347860 226045 5353101
 
shp2img -m C:\Travail\sid\img2.map -l jp2 -i jpeg -o C:\Travail\sid\jp2-ext.jpg -e 219589 5347860 226045 5353101
 
+
</pre>
  
 
-----------------------------------------------------
 
-----------------------------------------------------
 
Annexe 2 - mapfile for shp2img
 
Annexe 2 - mapfile for shp2img
 
-----------------------------------------------------
 
-----------------------------------------------------
 +
<pre>
 
MAP
 
MAP
 
     NAME "img2"
 
     NAME "img2"
Line 78: Line 81:
 
     UNITS METERS
 
     UNITS METERS
 
     CONFIG  "MS_ERRORFILE" "C:\Travail\sid\log.txt"     
 
     CONFIG  "MS_ERRORFILE" "C:\Travail\sid\log.txt"     
 
 
     PROJECTION
 
     PROJECTION
 
         "init=epsg:32187"
 
         "init=epsg:32187"
Line 123: Line 125:
 
     END       
 
     END       
 
END
 
END
 
+
</pre>
 
-----------------------------------------------------
 
-----------------------------------------------------
 
Annexe 3 - mapserver logfile
 
Annexe 3 - mapserver logfile
 
-----------------------------------------------------
 
-----------------------------------------------------
[Fri Feb 15 16:05:14 2008].742000 msDrawRasterLayerLow(tif): entering.<br>
+
<pre>
 +
[Fri Feb 15 16:05:14 2008].742000 msDrawRasterLayerLow(tif): entering.
 
[Fri Feb 15 16:05:14 2008].762000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
 
[Fri Feb 15 16:05:14 2008].762000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
<br>[Fri Feb 15 16:05:14 2008].762000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:05:14 2008].762000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:05:15 2008].2000 msDrawMap(): Layer 2 (tif), 0.260s
+
[Fri Feb 15 16:05:15 2008].2000 msDrawMap(): Layer 2 (tif), 0.260s
<br>[Fri Feb 15 16:05:15 2008].493000 msDrawRasterLayerLow(ecw): entering.
+
[Fri Feb 15 16:05:15 2008].493000 msDrawRasterLayerLow(ecw): entering.
<br>[Fri Feb 15 16:05:15 2008].493000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
+
[Fri Feb 15 16:05:15 2008].493000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
<br>[Fri Feb 15 16:05:15 2008].493000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:05:15 2008].493000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:05:15 2008].793000 msDrawMap(): Layer 0 (ecw), 0.300s
+
[Fri Feb 15 16:05:15 2008].793000 msDrawMap(): Layer 0 (ecw), 0.300s
<br>[Fri Feb 15 16:05:16 2008].264000 msDrawRasterLayerLow(sid): entering.
+
[Fri Feb 15 16:05:16 2008].264000 msDrawRasterLayerLow(sid): entering.
<br>[Fri Feb 15 16:05:16 2008].274000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
+
[Fri Feb 15 16:05:16 2008].274000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
<br>[Fri Feb 15 16:05:16 2008].274000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:05:16 2008].274000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:05:19 2008].639000 msDrawMap(): Layer 1 (sid), 3.375s
+
[Fri Feb 15 16:05:19 2008].639000 msDrawMap(): Layer 1 (sid), 3.375s
<br>[Fri Feb 15 16:05:20 2008].120000 msDrawRasterLayerLow(jp2): entering.
+
[Fri Feb 15 16:05:20 2008].120000 msDrawRasterLayerLow(jp2): entering.
<br>[Fri Feb 15 16:05:20 2008].130000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
+
[Fri Feb 15 16:05:20 2008].130000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
<br>[Fri Feb 15 16:05:20 2008].130000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:05:20 2008].130000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:05:34 2008].791000 msDrawMap(): Layer 3 (jp2), 14.671s
+
[Fri Feb 15 16:05:34 2008].791000 msDrawMap(): Layer 3 (jp2), 14.671s
<br>[Fri Feb 15 16:05:35 2008].251000 msDrawRasterLayerLow(tif): entering.
+
[Fri Feb 15 16:05:35 2008].251000 msDrawRasterLayerLow(tif): entering.
<br>[Fri Feb 15 16:05:35 2008].261000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
+
[Fri Feb 15 16:05:35 2008].261000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
<br>[Fri Feb 15 16:05:35 2008].261000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:05:35 2008].261000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:05:35 2008].552000 msDrawMap(): Layer 2 (tif), 0.301s
+
[Fri Feb 15 16:05:35 2008].552000 msDrawMap(): Layer 2 (tif), 0.301s
<br>[Fri Feb 15 16:05:36 2008].43000 msDrawRasterLayerLow(ecw): entering.
+
[Fri Feb 15 16:05:36 2008].43000 msDrawRasterLayerLow(ecw): entering.
<br>[Fri Feb 15 16:05:36 2008].53000 msDrawGDAL(): src=13583,12924,11541,9381, dst=0,0,935,760
+
[Fri Feb 15 16:05:36 2008].53000 msDrawGDAL(): src=13583,12924,11541,9381, dst=0,0,935,760
<br>[Fri Feb 15 16:05:36 2008].53000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:05:36 2008].53000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:05:36 2008].553000 msDrawMap(): Layer 0 (ecw), 0.510s
+
[Fri Feb 15 16:05:36 2008].553000 msDrawMap(): Layer 0 (ecw), 0.510s
<br>[Fri Feb 15 16:05:37 2008].44000 msDrawRasterLayerLow(sid): entering.
+
[Fri Feb 15 16:05:37 2008].44000 msDrawRasterLayerLow(sid): entering.
<br>[Fri Feb 15 16:05:37 2008].54000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
+
[Fri Feb 15 16:05:37 2008].54000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
<br>[Fri Feb 15 16:05:37 2008].54000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:05:37 2008].54000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:05:44 2008].84000 msDrawMap(): Layer 1 (sid), 7.040s
+
[Fri Feb 15 16:05:44 2008].84000 msDrawMap(): Layer 1 (sid), 7.040s
<br>[Fri Feb 15 16:05:44 2008].595000 msDrawRasterLayerLow(jp2): entering.
+
[Fri Feb 15 16:05:44 2008].595000 msDrawRasterLayerLow(jp2): entering.
<br>[Fri Feb 15 16:05:44 2008].605000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
+
[Fri Feb 15 16:05:44 2008].605000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
<br>[Fri Feb 15 16:05:44 2008].605000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:05:44 2008].605000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:05:58 2008].966000 msDrawMap(): Layer 3 (jp2), 14.371s
+
[Fri Feb 15 16:05:58 2008].966000 msDrawMap(): Layer 3 (jp2), 14.371s
<br>[Fri Feb 15 16:07:12 2008].91000 msDrawRasterLayerLow(tif): entering.
+
[Fri Feb 15 16:07:12 2008].91000 msDrawRasterLayerLow(tif): entering.
<br>[Fri Feb 15 16:07:12 2008].111000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
+
[Fri Feb 15 16:07:12 2008].111000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
<br>[Fri Feb 15 16:07:12 2008].111000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:07:12 2008].111000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:07:12 2008].341000 msDrawMap(): Layer 2 (tif), 0.250s
+
[Fri Feb 15 16:07:12 2008].341000 msDrawMap(): Layer 2 (tif), 0.250s
<br>[Fri Feb 15 16:07:12 2008].802000 msDrawRasterLayerLow(ecw): entering.
+
[Fri Feb 15 16:07:12 2008].802000 msDrawRasterLayerLow(ecw): entering.
<br>[Fri Feb 15 16:07:12 2008].812000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
+
[Fri Feb 15 16:07:12 2008].812000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
<br>[Fri Feb 15 16:07:12 2008].812000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:07:12 2008].812000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:07:13 2008].102000 msDrawMap(): Layer 0 (ecw), 0.300s
+
[Fri Feb 15 16:07:13 2008].102000 msDrawMap(): Layer 0 (ecw), 0.300s
<br>[Fri Feb 15 16:07:13 2008].573000 msDrawRasterLayerLow(sid): entering.
+
[Fri Feb 15 16:07:13 2008].573000 msDrawRasterLayerLow(sid): entering.
<br>[Fri Feb 15 16:07:13 2008].593000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
+
[Fri Feb 15 16:07:13 2008].593000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
<br>[Fri Feb 15 16:07:13 2008].593000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:07:13 2008].593000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:07:16 2008].948000 msDrawMap(): Layer 1 (sid), 3.375s
+
[Fri Feb 15 16:07:16 2008].948000 msDrawMap(): Layer 1 (sid), 3.375s
<br>[Fri Feb 15 16:07:17 2008].448000 msDrawRasterLayerLow(jp2): entering.
+
[Fri Feb 15 16:07:17 2008].448000 msDrawRasterLayerLow(jp2): entering.
<br>[Fri Feb 15 16:07:17 2008].458000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
+
[Fri Feb 15 16:07:17 2008].458000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
<br>[Fri Feb 15 16:07:17 2008].458000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:07:17 2008].458000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:07:32 2008].150000 msDrawMap(): Layer 3 (jp2), 14.702s
+
[Fri Feb 15 16:07:32 2008].150000 msDrawMap(): Layer 3 (jp2), 14.702s
<br>[Fri Feb 15 16:07:32 2008].610000 msDrawRasterLayerLow(tif): entering.
+
[Fri Feb 15 16:07:32 2008].610000 msDrawRasterLayerLow(tif): entering.
<br>[Fri Feb 15 16:07:32 2008].620000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
+
[Fri Feb 15 16:07:32 2008].620000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
<br>[Fri Feb 15 16:07:32 2008].620000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:07:32 2008].620000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:07:32 2008].921000 msDrawMap(): Layer 2 (tif), 0.311s
+
[Fri Feb 15 16:07:32 2008].921000 msDrawMap(): Layer 2 (tif), 0.311s
<br>[Fri Feb 15 16:07:33 2008].381000 msDrawRasterLayerLow(ecw): entering.
+
[Fri Feb 15 16:07:33 2008].381000 msDrawRasterLayerLow(ecw): entering.
<br>[Fri Feb 15 16:07:33 2008].391000 msDrawGDAL(): src=13583,12924,11541,9381, dst=0,0,935,760
+
[Fri Feb 15 16:07:33 2008].391000 msDrawGDAL(): src=13583,12924,11541,9381, dst=0,0,935,760
<br>[Fri Feb 15 16:07:33 2008].391000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:07:33 2008].391000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:07:33 2008].892000 msDrawMap(): Layer 0 (ecw), 0.511s
+
[Fri Feb 15 16:07:33 2008].892000 msDrawMap(): Layer 0 (ecw), 0.511s
<br>[Fri Feb 15 16:07:34 2008].383000 msDrawRasterLayerLow(sid): entering.
+
[Fri Feb 15 16:07:34 2008].383000 msDrawRasterLayerLow(sid): entering.
<br>[Fri Feb 15 16:07:34 2008].393000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
+
[Fri Feb 15 16:07:34 2008].393000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
<br>[Fri Feb 15 16:07:34 2008].393000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:07:34 2008].393000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:07:41 2008].443000 msDrawMap(): Layer 1 (sid), 7.060s
+
[Fri Feb 15 16:07:41 2008].443000 msDrawMap(): Layer 1 (sid), 7.060s
<br>[Fri Feb 15 16:07:41 2008].934000 msDrawRasterLayerLow(jp2): entering.
+
[Fri Feb 15 16:07:41 2008].934000 msDrawRasterLayerLow(jp2): entering.
<br>[Fri Feb 15 16:07:41 2008].944000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
+
[Fri Feb 15 16:07:41 2008].944000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
<br>[Fri Feb 15 16:07:41 2008].944000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
+
[Fri Feb 15 16:07:41 2008].944000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
<br>[Fri Feb 15 16:07:56 2008].384000 msDrawMap(): Layer 3 (jp2), 14.450s
+
[Fri Feb 15 16:07:56 2008].384000 msDrawMap(): Layer 3 (jp2), 14.450s
 +
</pre>

Revision as of 17:39, 24 June 2008

Banc d'essai comparatif pour MrSid, ECW, TIF, JPG2000

Au Ministère de la sécurité publique du Québec, nous avons voulu tester la performance de Mapserver avec 4 formats d'images matritiels. L'objectif principal était de vérifier ce qui ce dit sur les forums par rapport au format MrSid vs ECW sous Mapserver. Étant donné que presque tout les Ministères au Québec utilisent le format MrSid, nous avions pensé faire de même, mais ce banc d'essai nous a montré qu'il fallait se questionner davantage.

Méthode

Nous avons utilisé l'outil 'shp2img' livré avec le package FWTools(http://fwtools.maptools.org/). Cet outil permet de simuler le comportement de Mapserver et d'éliminer les imprévues relié au réseaux. De plus, nous n'avons pas reprojeté l'image de sorti. Nous avons également fait un test avec une enveloppe de petite dimension pour tester la décompression par MapServer.

Images

Notre image de départ était une image MrSid que nous avons convertit en format HDR à l'aide de GDAL. Ce format n'a aucune limite de taille de fichier et pouvait être convertit par ERMapper en format ECW.

gdal_translate -of EHdr -not_strict -a_nodata 0 C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.sid  C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.bil

Cette image a été transformée en GeoTiff, en JPG2000 avec GDAL. Notons que l'image GeoTiff est tuilée et multi-résolution, ce qui a grandement grossit sa taille(800 000K). De plus l'image ECW à été compressé a 25:1 l'aide de ERMapper.

gdal_translate -of gtiff -not_strict -co 'ALPHA=YES' -co "TILED=YES" -a_nodata 0 C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.bil C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.tif
gdaladdo -r average C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.tif 2 4 8 16 32 64 128 256
gdal_translate -of JP2KAK -co 'Clayers=20' -co 'Clevels=8' -co 'Corder=RPCL' -co 'Cprecincts={256,256},{256,256},{128,128}' -co 'ORGgen_plt=yes' -co 'ORGtparts=R' -co 'Cblk={32,32}' -co 'Creversible=no' -co 'quality=10' C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.bil C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.jp2

Enfin, le manque de temps nous imposant de faire un peu de spéculation, nous croyons que l'image MrSid a été compressée a avec un ratio de 20:1 et sauvegardé avec multi-résolution(Nousn'avons pas demandé au MRNF). Nous avons remarqué que même en demandant un ratio de 20:1 a ERMapper, le moteur de compression a tout même compressé a 25:1 sans en affecter la qualité visuelle. Nous avons donc tout de même utilisé cette image et il faut comprendre que limage MrSid pourrait être de plus petite taille. Par contre nous ne croyons pas que cela affecte les résultats de notre teste.


Résultats

Aucune surprise pour le format le plus performent, comme souvent dit par plusieurs utilisateurs, le meilleur format d'image pour diffuser un service Web avec Mapserver est le format TIF décompressé tuilé. Il est par contre couteux pour les grandes organisations. Il en résulte qu'en combinant l'espace de stockage et le temps de traitement, le format ECW dépasse de loin les autres formats d'image. Même si il demande l'achat d'une licence d'utilisation ERMapper Image Compressor(qui n'est pas très dispendieu...), il apporte plus que le coût lié au stockage des images TIF décompressées.

Pour le format MrSid, même si le ratio de compression est moins important que le format ECW, l'image MrSid est tout simplement déclassé... pour ne pas dire pitoyable avec MapServer. Quand au format JPG2000 ... on doit oublier ce type de fichier pour les services Web...

Images	 				Taile		Time Full	Time extent	Compression
-----------------------			------		-------		-----------	-------------
MOS_07_22D05-SE_F07_56CM.tif		3 325 779	0.255sec	0.306sec	1x 
MOS_07_22D05-SE_F07_56CM.jp2		496 781 	14.686sec	14.576sec	6.7x 
MOS_07_22D05-SE_F07_56CM.sid		191 945 	3.375sec	7.050sec	17.3x 
MOS_07_22D05-SE_F07_56CM.ecw		100 841 	0.300sec	0.511sec	33x 

Les annexes qui suivent, montre les lignes de commandes, mapfile et logfile du banc d'essai.

Annexe


Annexe 1 - shp2img batchfile


del C:\Travail\sid\*.jpg<br>
shp2img -m C:\Travail\sid\img2.map -l tif -i jpeg -o C:\Travail\sid\tif-fullview.jpg
shp2img -m C:\Travail\sid\img2.map -l ecw -i jpeg -o C:\Travail\sid\ecw-fullview.jpg
shp2img -m C:\Travail\sid\img2.map -l sid -i jpeg -o C:\Travail\sid\sid-fullview.jpg
shp2img -m C:\Travail\sid\img2.map -l jp2 -i jpeg -o C:\Travail\sid\jp2-fullview.jpg
shp2img -m C:\Travail\sid\img2.map -l tif -i jpeg -o C:\Travail\sid\tif-ext.jpg -e 219589 5347860 226045 5353101
shp2img -m C:\Travail\sid\img2.map -l ecw -i jpeg -o C:\Travail\sid\ecw-ext.jpg -e 219589 5347860 226045 5353101
shp2img -m C:\Travail\sid\img2.map -l sid -i jpeg -o C:\Travail\sid\sid-ext.jpg -e 219589 5347860 226045 5353101
shp2img -m C:\Travail\sid\img2.map -l jp2 -i jpeg -o C:\Travail\sid\jp2-ext.jpg -e 219589 5347860 226045 5353101

Annexe 2 - mapfile for shp2img


MAP
    NAME "img2"
    STATUS OFF
    EXTENT 211978 5346173 230725 5360345
    SIZE 935 760
    IMAGETYPE PNG
    IMAGECOLOR 255 255 255
    UNITS METERS
    CONFIG  "MS_ERRORFILE" "C:\Travail\sid\log.txt"    
    PROJECTION
        "init=epsg:32187"
    END
    LAYER
        NAME "ecw"
        DEBUG 5
        STATUS OFF
        DATA "C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.ecw"
        TYPE RASTER
        PROJECTION
          "init=epsg:32187" 
        END
    END  
    LAYER
        NAME "sid"
        DEBUG 5
        STATUS OFF
        DATA "C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.sid"
        TYPE RASTER
        PROJECTION
          "init=epsg:32187"  
        END
    END 
    LAYER
        NAME "tif"
        DEBUG 5
        STATUS OFF
        DATA "C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.tif"
        TYPE RASTER
        PROJECTION
          "init=epsg:32187" 
        END
    END  
    LAYER
        NAME "jp2"
        DEBUG 5
        STATUS OFF
        DATA "C:\Travail\sid\MOS_07_22D05-SE_F07_56CM.jp2"
        TYPE RASTER
        PROJECTION
          "init=epsg:32187" 
        END
    END      
END

Annexe 3 - mapserver logfile


[Fri Feb 15 16:05:14 2008].742000 msDrawRasterLayerLow(tif): entering.
[Fri Feb 15 16:05:14 2008].762000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
[Fri Feb 15 16:05:14 2008].762000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:05:15 2008].2000 msDrawMap(): Layer 2 (tif), 0.260s
[Fri Feb 15 16:05:15 2008].493000 msDrawRasterLayerLow(ecw): entering.
[Fri Feb 15 16:05:15 2008].493000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
[Fri Feb 15 16:05:15 2008].493000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:05:15 2008].793000 msDrawMap(): Layer 0 (ecw), 0.300s
[Fri Feb 15 16:05:16 2008].264000 msDrawRasterLayerLow(sid): entering.
[Fri Feb 15 16:05:16 2008].274000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
[Fri Feb 15 16:05:16 2008].274000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:05:19 2008].639000 msDrawMap(): Layer 1 (sid), 3.375s
[Fri Feb 15 16:05:20 2008].120000 msDrawRasterLayerLow(jp2): entering.
[Fri Feb 15 16:05:20 2008].130000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
[Fri Feb 15 16:05:20 2008].130000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:05:34 2008].791000 msDrawMap(): Layer 3 (jp2), 14.671s
[Fri Feb 15 16:05:35 2008].251000 msDrawRasterLayerLow(tif): entering.
[Fri Feb 15 16:05:35 2008].261000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
[Fri Feb 15 16:05:35 2008].261000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:05:35 2008].552000 msDrawMap(): Layer 2 (tif), 0.301s
[Fri Feb 15 16:05:36 2008].43000 msDrawRasterLayerLow(ecw): entering.
[Fri Feb 15 16:05:36 2008].53000 msDrawGDAL(): src=13583,12924,11541,9381, dst=0,0,935,760
[Fri Feb 15 16:05:36 2008].53000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:05:36 2008].553000 msDrawMap(): Layer 0 (ecw), 0.510s
[Fri Feb 15 16:05:37 2008].44000 msDrawRasterLayerLow(sid): entering.
[Fri Feb 15 16:05:37 2008].54000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
[Fri Feb 15 16:05:37 2008].54000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:05:44 2008].84000 msDrawMap(): Layer 1 (sid), 7.040s
[Fri Feb 15 16:05:44 2008].595000 msDrawRasterLayerLow(jp2): entering.
[Fri Feb 15 16:05:44 2008].605000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
[Fri Feb 15 16:05:44 2008].605000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:05:58 2008].966000 msDrawMap(): Layer 3 (jp2), 14.371s
[Fri Feb 15 16:07:12 2008].91000 msDrawRasterLayerLow(tif): entering.
[Fri Feb 15 16:07:12 2008].111000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
[Fri Feb 15 16:07:12 2008].111000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:07:12 2008].341000 msDrawMap(): Layer 2 (tif), 0.250s
[Fri Feb 15 16:07:12 2008].802000 msDrawRasterLayerLow(ecw): entering.
[Fri Feb 15 16:07:12 2008].812000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
[Fri Feb 15 16:07:12 2008].812000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:07:13 2008].102000 msDrawMap(): Layer 0 (ecw), 0.300s
[Fri Feb 15 16:07:13 2008].573000 msDrawRasterLayerLow(sid): entering.
[Fri Feb 15 16:07:13 2008].593000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
[Fri Feb 15 16:07:13 2008].593000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:07:16 2008].948000 msDrawMap(): Layer 1 (sid), 3.375s
[Fri Feb 15 16:07:17 2008].448000 msDrawRasterLayerLow(jp2): entering.
[Fri Feb 15 16:07:17 2008].458000 msDrawGDAL(): src=0,0,33477,25307, dst=0,26,935,707
[Fri Feb 15 16:07:17 2008].458000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:07:32 2008].150000 msDrawMap(): Layer 3 (jp2), 14.702s
[Fri Feb 15 16:07:32 2008].610000 msDrawRasterLayerLow(tif): entering.
[Fri Feb 15 16:07:32 2008].620000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
[Fri Feb 15 16:07:32 2008].620000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:07:32 2008].921000 msDrawMap(): Layer 2 (tif), 0.311s
[Fri Feb 15 16:07:33 2008].381000 msDrawRasterLayerLow(ecw): entering.
[Fri Feb 15 16:07:33 2008].391000 msDrawGDAL(): src=13583,12924,11541,9381, dst=0,0,935,760
[Fri Feb 15 16:07:33 2008].391000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:07:33 2008].892000 msDrawMap(): Layer 0 (ecw), 0.511s
[Fri Feb 15 16:07:34 2008].383000 msDrawRasterLayerLow(sid): entering.
[Fri Feb 15 16:07:34 2008].393000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
[Fri Feb 15 16:07:34 2008].393000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:07:41 2008].443000 msDrawMap(): Layer 1 (sid), 7.060s
[Fri Feb 15 16:07:41 2008].934000 msDrawRasterLayerLow(jp2): entering.
[Fri Feb 15 16:07:41 2008].944000 msDrawGDAL(): src=13584,12925,11541,9381, dst=0,0,935,760
[Fri Feb 15 16:07:41 2008].944000 msDrawGDAL(): red,green,blue,alpha bands = 1,2,3,0
[Fri Feb 15 16:07:56 2008].384000 msDrawMap(): Layer 3 (jp2), 14.450s