Olá a todos,<br><br>Estou com alguns problemas com o mapserver e preciso da ajuda da malta do Mapserver!<br>Neste momento estou apenas a tentar publicar um ficheiro raster (carta militar) mas não sei o que se passa que qdo chamo o url (<a href="http://localhost/cgi-bin/mapserv?map=/home/hfpm/Desktop/teste/teste2.map&mode=map">http://localhost/cgi-bin/mapserv?map=/home/hfpm/Desktop/teste/teste2.map&mode=map</a>) apenas me devolve uma imagem branca. Se publicar uma shapefile tudo funciona bem. Eis o meu mapfile com a shape e com o raster (a shape é mostrada mas não o raster):<br>
<br>MAP<br> CONFIG "MS_ERRORFILE" "/tmp/mapserver.log"<br> DEBUG 5<br> NAME "TESTE-MAPSERVER"<br> EXTENT -86861.223691 -301747.706447 72084.420840 -228246.008574<br> UNITS METERS<br> SIZE 800 600<br>
IMAGETYPE PNG<br> SHAPEPATH "/home/hfpm/Desktop/teste/final/warp"<br><br> OUTPUTFORMAT<br> NAME "aggpng24"<br> DRIVER AGG/PNG<br> MIMETYPE "image/png"<br> IMAGEMODE RGB<br> EXTENSION "png"<br>
END<br> <br> PROJECTION<br> "init=epsg:3763"<br> END<br><br> LEGEND<br> IMAGECOLOR 255 255 255<br> STATUS ON<br> KEYSIZE 18 12<br> LABEL<br> TYPE BITMAP<br> SIZE MEDIUM<br> COLOR 0 0 89<br> END<br> END<br>
<br> WEB<br> IMAGEPATH '/tmp/'<br> IMAGEURL '/tmp/'<br> METADATA<br> 'ows_title' 'TESTE-MAPSERVER'<br> 'ows_onlineresource' '<a href="http://localhost/cgi-bin/mapserv?map=/home/hfpm/Desktop/teste/teste.map">http://localhost/cgi-bin/mapserv?map=/home/hfpm/Desktop/teste/teste.map</a>'<br>
'ows_srs' 'EPSG:3763'<br> END<br> TEMPLATE 'fooOnlyForWMSGetFeatureInfo'<br> END<br><br> LAYER<br> NAME "cartograma"<br> DATA 'cartograma_rgb.shp'<br> STATUS DEFAULT<br>
TYPE POLYGON<br> CLASS<br> NAME "Concelhos"<br> STYLE<br> COLOR 220 220 220<br> OUTLINECOLOR 176 176 176<br> END<br> END <br> END<br><br> LAYER<br> NAME 'CM'<br> PROCESSING "DITHER=YES"<br>
PROCESSING "RESAMPLE=AVERAGE"<br> TYPE RASTER<br> DUMP FALSE<br> TEMPLATE fooOnlyForWMSGetFeatureInfo<br> EXTENT 32002.688 -239999.086 48005.188 -229996.586<br> DATA '/home/hfpm/Desktop/teste/final/warp/566.tif'<br>
METADATA<br> 'ows_title' '566'<br> END<br> STATUS ON<br> TRANSPARENCY 100<br> PROJECTION<br> "init=epsg:3763"<br> END<br> END<br>END<br><br>Inicialmente pensei que fosse algum problema com o extent mas fazendo um gdalinfo ao raster eis o que obtenho ( e de onde tirei o extent para configurar no layer raster):<br>
<br>Coordinate System is:<br>PROJCS["ETRS89 / Portugal TM06",<br> GEOGCS["ETRS89",<br> DATUM["European_Terrestrial_Reference_System_1989",<br> SPHEROID["GRS 1980",6378137,298.2572221010002,<br>
AUTHORITY["EPSG","7019"]],<br> AUTHORITY["EPSG","6258"]],<br> PRIMEM["Greenwich",0],<br> UNIT["degree",0.0174532925199433],<br>
AUTHORITY["EPSG","4258"]],<br> PROJECTION["Transverse_Mercator"],<br> PARAMETER["latitude_of_origin",39.66825833333333],<br> PARAMETER["central_meridian",-8.133108333333334],<br>
PARAMETER["scale_factor",1],<br> PARAMETER["false_easting",0],<br> PARAMETER["false_northing",0],<br> UNIT["metre",1,<br> AUTHORITY["EPSG","9001"]],<br>
AUTHORITY["EPSG","3763"]]<br>Origin = (32002.688000000001921,-229996.586000000010245)<br>Pixel Size = (2.500000000000004,-2.500000000000004)<br>Metadata:<br> AREA_OR_POINT=Area<br>Image Structure Metadata:<br>
INTERLEAVE=PIXEL<br>Corner Coordinates:<br>Upper Left ( 32002.688, -229996.586) ( 7d46'14.62"W, 37d35'44.95"N)<br>Lower Left ( 32002.688, -239999.086) ( 7d46'16.19"W, 37d30'20.52"N)<br>
Upper Right ( 48005.188, -229996.586) ( 7d35'22.31"W, 37d35'42.45"N)<br>Lower Right ( 48005.188, -239999.086) ( 7d35'24.67"W, 37d30'18.02"N)<br>Center ( 40003.938, -234997.836) ( 7d40'49.45"W, 37d33' 1.61"N)<br>
<br>No log do mapserver aparece o seguinte:<br><br>[Fri May 13 15:41:40 2011].243884 CGI Request 1 on process 7701<br>[Fri May 13 15:41:40 2011].244208 msDrawMap(): WMS/WFS set-up and query, 0.000s<br>[Fri May 13 15:41:40 2011].246110 msDrawMap(): Layer 0 (cartograma), 0.002s<br>
[Fri May 13 15:41:40 2011].246125 msDrawMap(): Drawing Label Cache, 0.000s<br>[Fri May 13 15:41:40 2011].246130 msDrawMap() total time: 0.002s<br>[Fri May 13 15:41:40 2011].249876 msSaveImage() total time: 0.004s<br>[Fri May 13 15:41:40 2011].249960 mapserv request processing time (loadmap not incl.): 0.006s<br>
[Fri May 13 15:41:40 2011].249966 msFreeMap(): freeing map at 0x2460230.<br><br>Todos os contributos são bem-vindos :)<br><br>Abc,<br>Hugo<br><br><br clear="all"><br>-- <br>Hugo Martins<br>LabNT - ISEGI UNL<br>Campus de Campolide<br>
1070-312 Lisboa<br>N 38°43'56.84", W 9°9'35.74"<br>