[mapserver-users] Problems getting a JP2 or TIFF raster layer drawen

2009-05-27 Thread Michael Da Silva Pereira
Hi,

I am having a problem displaying a JP2 / TIFF image in mapserver, it
draws my shape files. However I can not get it to draw my RASTER layer
:(

Any Suggestions?




MAP
SIZE 1300 600
DEBUG 5

EXTENT 23.5 -34 23.6 -25
IMAGECOLOR 180 180 250
UNITS DD
SCALEBAR
STATUS EMBED
UNITS KILOMETERS
INTERVALS 3
TRANSPARENT TRUE
OUTLINECOLOR 0 0 0
END
LEGEND
STATUS EMBED
POSITION LR
TRANSPARENT TRUE
END
WEB
TEMPLATE global.html
IMAGEPATH /var/www/ms-tmp/
IMAGEURL /ms-tmp/
END
LAYER
NAME vereenigingroads
STATUS ON
DATA vereenigingroads/vereenigingroads.shp
TYPE LINE
CLASS
NAME 'the world'
COLOR 0 0 0
END
END
LAYER
NAME '2627D'
TYPE RASTER
STATUS ON
DATA /var/www/ms-tmp/2627D.JP2
END
END

r...@michael-laptop:/var/www/ms-tmp# /usr/lib/cgi-bin/mapserv -v
MapServer version 5.4.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE

[Wed May 27 08:47:04 2009].804606 msLoadMap(): 0.009s
[Wed May 27 08:47:04 2009].845677 msDrawMap(): Layer 0
(vereenigingroads), 0.039s
[Wed May 27 08:47:04 2009].845729 msDrawRasterLayerLow(2627D): entering.
[Wed May 27 08:47:06 2009].130721 msDrawMap(): Layer 1 (2627D), 1.285s
[Wed May 27 08:47:06 2009].131031 msDrawMap(): Drawing Label Cache, 0.000s
[Wed May 27 08:47:06 2009].131063 msDrawMap() total time: 1.326s
[Wed May 27 08:47:06 2009].163796 msSaveImage() total time: 0.033s
[Wed May 27 08:47:06 2009].163926 msFreeMap(): freeing map at 0x91168b8.
[Wed May 27 08:47:06 2009].163974 freeLayer(): freeing layer at 0x911d508.
[Wed May 27 08:47:06 2009].163995 freeLayer(): freeing layer at 0x911e1d0.
[Wed May 27 08:47:06 2009].164011 freeLayer(): freeing layer at 0x9246188.
[Wed May 27 08:47:06 2009].164025 freeLayer(): freeing layer at 0x92fea48.
[Wed May 27 08:47:06 2009].164045 shp2img total time: 1.369s


r...@michael-laptop:/var/www/ms-tmp# du -hs 2627D.JP2
129M2627D.JP2


-- 

Regards,
Michael da Silva Pereira
Mobile: +27 84 245 2376
Office: +27 11 251 2036
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Problems getting a JP2 or TIFF raster layer drawen

2009-05-27 Thread David Martinez Morata
Hello.
Try to change the palcement of your layers and configure your shape  with
TRANSPARENT TRUE varible..
Something like

LAYER
   NAME '2627D'
   TYPE RASTER
   STATUS ON
   DATA /var/www/ms-tmp/2627D.JP2
END
LAYER
   NAME vereenigingroads
   STATUS ON
   DATA vereenigingroads/vereenigingroads.shp
   TYPE LINE
TRANSPARENT TRUE
   CLASS
   NAME 'the world'
   COLOR 0 0 0
   END
END


2009/5/27 Michael Da Silva Pereira michael.dasilvapere...@iburstafrica.com

 Hi,

 I am having a problem displaying a JP2 / TIFF image in mapserver, it
 draws my shape files. However I can not get it to draw my RASTER layer
 :(

 Any Suggestions?




 MAP
SIZE 1300 600
DEBUG 5

EXTENT 23.5 -34 23.6 -25
IMAGECOLOR 180 180 250
UNITS DD
SCALEBAR
STATUS EMBED
UNITS KILOMETERS
INTERVALS 3
TRANSPARENT TRUE
OUTLINECOLOR 0 0 0
END
 LEGEND
STATUS EMBED
POSITION LR
TRANSPARENT TRUE
 END
 WEB
TEMPLATE global.html
IMAGEPATH /var/www/ms-tmp/
IMAGEURL /ms-tmp/
 END
 LAYER
NAME vereenigingroads
STATUS ON
DATA vereenigingroads/vereenigingroads.shp
TYPE LINE
CLASS
NAME 'the world'
COLOR 0 0 0
END
 END
 LAYER
NAME '2627D'
TYPE RASTER
STATUS ON
DATA /var/www/ms-tmp/2627D.JP2
 END
 END

 r...@michael-laptop:/var/www/ms-tmp# /usr/lib/cgi-bin/mapserv -v
 MapServer version 5.4.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
 OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV
 SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE

 [Wed May 27 08:47:04 2009].804606 msLoadMap(): 0.009s
 [Wed May 27 08:47:04 2009].845677 msDrawMap(): Layer 0
 (vereenigingroads), 0.039s
 [Wed May 27 08:47:04 2009].845729 msDrawRasterLayerLow(2627D): entering.
 [Wed May 27 08:47:06 2009].130721 msDrawMap(): Layer 1 (2627D), 1.285s
 [Wed May 27 08:47:06 2009].131031 msDrawMap(): Drawing Label Cache, 0.000s
 [Wed May 27 08:47:06 2009].131063 msDrawMap() total time: 1.326s
 [Wed May 27 08:47:06 2009].163796 msSaveImage() total time: 0.033s
 [Wed May 27 08:47:06 2009].163926 msFreeMap(): freeing map at 0x91168b8.
 [Wed May 27 08:47:06 2009].163974 freeLayer(): freeing layer at 0x911d508.
 [Wed May 27 08:47:06 2009].163995 freeLayer(): freeing layer at 0x911e1d0.
 [Wed May 27 08:47:06 2009].164011 freeLayer(): freeing layer at 0x9246188.
 [Wed May 27 08:47:06 2009].164025 freeLayer(): freeing layer at 0x92fea48.
 [Wed May 27 08:47:06 2009].164045 shp2img total time: 1.369s


 r...@michael-laptop:/var/www/ms-tmp# du -hs 2627D.JP2
 129M2627D.JP2


 --

 Regards,
 Michael da Silva Pereira
 Mobile: +27 84 245 2376
 Office: +27 11 251 2036
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users




-- 
Martinez Morata David
Thinking GIS
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Problems getting a JP2 or TIFF raster layer drawen

2009-05-27 Thread Frank Warmerdam

Michael Da Silva Pereira wrote:

I am trying to display from browser using browse mode,
and using shp2img to test drawing to a straight .png
/home/michael/mapserver-5.4.0/shp2img -m global.map -o test.png -all_debug 1000


Michael,

And what output do you see?  You might also try setting the CPL_DEBUG
environment variable to ON.

eg.

export CPL_DEBUG=ON
/home/michael/mapserver-5.4.0/shp2img -m global.map -o test.png -all_debug 1000

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Problems getting a JP2 or TIFF raster layer drawen

2009-05-27 Thread Michael Da Silva Pereira
It displays everything normally, except the raster, which is just not drawn

GDAL: Auto register /usr/lib/gdal15plugins/gdal_GRASS.so using
GDALRegister_GRASS.
[Wed May 27 18:04:41 2009].197691 msLoadMap(): 0.570s
[Wed May 27 18:04:41 2009].414187 msDrawMap(): Layer 0 (vereenigingroads),
0.194s
[Wed May 27 18:04:41 2009].414307 msDrawRasterLayerLow(2627D): entering.
JPEG2000: IHDR box found. Dump: width=20018, height=22269, numcmpts=3, bpp=8
JPEG2000: Component 0: bpp=8, signedness=0
JPEG2000: Component 1: bpp=8, signedness=0
JPEG2000: Component 2: bpp=8, signedness=0
GDALJP2Metadata: Got projection from GeoJP2 (geotiff) box: PROJCS[WGS 84 /
UTM zone 35S,GEOGCS[WGS 84,DATUM[WGS_1984,SPHEROID[WGS
84,6378137,298.2572235629972,AUTHORITY[EPSG,7030]],AUTHORITY[EPSG,6326]],PRIMEM[Greenwich,0],UNIT[degree,0.0174532925199433],AUTHORITY[EPSG,4326]],PROJECTION[Transverse_Mercator],PARAMETER[latitude_of_origin,0],PARAMETER[central_meridian,27],PARAMETER[scale_factor,0.9996],PARAMETER[false_easting,50],PARAMETER[false_northing,1000],UNIT[metre,1,AUTHORITY[EPSG,9001]],AUTHORITY[EPSG,32735]]
GDAL: GDALOpen(/var/www/ms-tmp/./2627D.JP2) succeeds as JPEG2000.
GDAL: GDALClose(/var/www/ms-tmp/./2627D.JP2)
[Wed May 27 18:04:46 2009].785278 msDrawMap(): Layer 1 (2627D), 5.371s
[Wed May 27 18:04:46 2009].786307 msDrawMap(): Drawing Label Cache, 0.000s
[Wed May 27 18:04:46 2009].786388 msDrawMap() total time: 5.588s
[Wed May 27 18:04:46 2009].829842 msSaveImage() total time: 0.043s
[Wed May 27 18:04:46 2009].830048 msFreeMap(): freeing map at 0x9732ac8.
[Wed May 27 18:04:46 2009].830136 freeLayer(): freeing layer at 0x9739718.
[Wed May 27 18:04:46 2009].830201 freeLayer(): freeing layer at 0x9862a68.
[Wed May 27 18:04:46 2009].830240 freeLayer(): freeing layer at 0x991bb38.
[Wed May 27 18:04:46 2009].830289 shp2img total time: 6.202s
GDAL: GDALDeregister_GTiff() called.


2009/5/27 Frank Warmerdam warmer...@pobox.com

 Michael Da Silva Pereira wrote:

 I am trying to display from browser using browse mode,
 and using shp2img to test drawing to a straight .png
 /home/michael/mapserver-5.4.0/shp2img -m global.map -o test.png -all_debug
 1000


 Michael,

 And what output do you see?  You might also try setting the CPL_DEBUG
 environment variable to ON.

 eg.

 export CPL_DEBUG=ON
 /home/michael/mapserver-5.4.0/shp2img -m global.map -o test.png -all_debug
 1000

 Best regards,
 --

 ---+--
 I set the clouds in motion - turn up   | Frank Warmerdam,
 warmer...@pobox.com
 light and sound - activate the windows | 
 http://pobox.com/~warmerdamhttp://pobox.com/%7Ewarmerdam
 and watch the world go round - Rush| Geospatial Programmer for Rent




-- 

Regards,
Michael da Silva Pereira
Mobile: +27 84 245 2376
Office: +27 11 251 2036
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Problems getting a JP2 or TIFF raster layer drawen

2009-05-27 Thread Frank Warmerdam

Michael Da Silva Pereira wrote:

It displays everything normally, except the raster, which is just not drawn

GDAL: Auto register /usr/lib/gdal15plugins/gdal_GRASS.so using 
GDALRegister_GRASS.

[Wed May 27 18:04:41 2009].197691 msLoadMap(): 0.570s
[Wed May 27 18:04:41 2009].414187 msDrawMap(): Layer 0 
(vereenigingroads), 0.194s

[Wed May 27 18:04:41 2009].414307 msDrawRasterLayerLow(2627D): entering.
JPEG2000: IHDR box found. Dump: width=20018, height=22269, numcmpts=3, bpp=8
JPEG2000: Component 0: bpp=8, signedness=0
JPEG2000: Component 1: bpp=8, signedness=0
JPEG2000: Component 2: bpp=8, signedness=0
GDALJP2Metadata: Got projection from GeoJP2 (geotiff) box: PROJCS[WGS 
84 / UTM zone 35S,GEOGCS[WGS 84,DATUM[WGS_1984,SPHEROID[WGS 
84,6378137,298.2572235629972,AUTHORITY[EPSG,7030]],AUTHORITY[EPSG,6326]],PRIMEM[Greenwich,0],UNIT[degree,0.0174532925199433],AUTHORITY[EPSG,4326]],PROJECTION[Transverse_Mercator],PARAMETER[latitude_of_origin,0],PARAMETER[central_meridian,27],PARAMETER[scale_factor,0.9996],PARAMETER[false_easting,50],PARAMETER[false_northing,1000],UNIT[metre,1,AUTHORITY[EPSG,9001]],AUTHORITY[EPSG,32735]]

GDAL: GDALOpen(/var/www/ms-tmp/./2627D.JP2) succeeds as JPEG2000.
GDAL: GDALClose(/var/www/ms-tmp/./2627D.JP2)


Michael,

The file is opening fine, so I would suggest very carefully considering
the georeferenced bounds reported by gdalinfo for the file, and the
map region you are drawing.

In fact, the coordinate system of file this is UTM 35S, but your map is
in lat/long degrees.  If you want MapServer to reproject a UTM image
to lat/long on the fly you will need to specify appropriate PROJECTION
blocks for the map and the raster layer - which I observe you have not done.

For the MAP perhaps something like:

PROJECTION
  +proj=latlong +datum=WGS84
END

and for the raster layer something like:

PROJECTION
  +proj=utm +zone=35 +south +datum=WGS84
END

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users