Re: [mapserver-users] Unable to render a raster with 4 bands

2011-06-15 Thread Frank Warmerdam

On 11-06-10 09:24 PM, jt2000 wrote:

I have a GRD raster that I'm trying to show on the map using mapserver.
Currently I'm getting all transparent output.

I've converted it to TIF using gdal_translate and it converted fine.  I also
used shp2img to convert to png without any issues.



Band 1 Block=1293x1 Type=Byte, ColorInterp=Red
   NoData Value=0



What do I need to change in the map file to make this work?
I have tried PROCESSING "SCALE=0,0.00305185094759972" to see if that would
help.


jt2000,

You don't provide your LAYER definition so there isn't much to go on.
What I can say is that based on the debug output the layer is being
rendered and it would seem there was at least some overlap of the data
file with your map area.

I do not know why you are using a SCALE processing option.  The imagery
is already 8bit, not floating point, so there should be no need to
dramatically rescale.

Don't worry too much about the debug output about NODATA value 0 being
ignored.  At worst this should mean that nodata areas will actually
be drawn.  It should not mean that things show up transparent when they
are not.

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


[mapserver-users] Unable to render a raster with 4 bands

2011-06-10 Thread jt2000
I have a GRD raster that I'm trying to show on the map using mapserver. 
Currently I'm getting all transparent output.

I've converted it to TIF using gdal_translate and it converted fine.  I also
used shp2img to convert to png without any issues.

Here is gdalinfo on the TIF file.

Driver: GTiff/GeoTIFF
Files: Test.tif
Size is 1293, 1276
Coordinate System is:
PROJCS["NAD83 / UTM zone 18N",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4269"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-75],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",50],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","26918"]]
Origin = (306885.000,4328685.000)
Pixel Size = (30.000,-30.000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  306885.000, 4328685.000) ( 77d13'57.95"W, 39d 5' 9.33"N)
Lower Left  (  306885.000, 4290405.000) ( 77d13'19.14"W, 38d44'28.42"N)
Upper Right (  345675.000, 4328685.000) ( 76d47' 4.23"W, 39d 5'37.14"N)
Lower Right (  345675.000, 4290405.000) ( 76d46'33.21"W, 38d44'55.89"N)
Center  (  326280.000, 4309545.000) ( 77d 0'13.63"W, 38d55' 3.48"N)
Band 1 Block=1293x1 Type=Byte, ColorInterp=Red
  NoData Value=0
Band 2 Block=1293x1 Type=Byte, ColorInterp=Green
  NoData Value=0
Band 3 Block=1293x1 Type=Byte, ColorInterp=Blue
  NoData Value=0
Band 4 Block=1293x1 Type=Byte, ColorInterp=Alpha
  NoData Value=0
  Offset: -200,   Scale:0.00305185094759972

I'm seeing this in the mapserver log.


[Fri Jun 10 19:57:28 2011].556592 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Fri Jun 10 19:57:28 2011].569044 msPostGISLayerIsOpen called.
[Fri Jun 10 19:57:28 2011].891159 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Fri Jun 10 19:57:28 2011].891559 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Fri Jun 10 19:57:28 2011].891901 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Fri Jun 10 19:57:28 2011].892286 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Fri Jun 10 19:57:28 2011].903631 msPostGISLayerIsOpen called.
[Fri Jun 10 19:57:29 2011].131158 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Fri Jun 10 19:57:29 2011].131362 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Fri Jun 10 19:57:29 2011].131523 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.
[Fri Jun 10 19:57:29 2011].131717 LoadGDALImage(rasterlayer): NODATA value 0
in GDAL
file or PROCESSING directive ignored.  Not yet supported for
unclassified scaled data.

What do I need to change in the map file to make this work?  
I have tried PROCESSING "SCALE=0,0.00305185094759972" to see if that would
help.


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Unable-to-render-a-raster-with-4-bands-tp6464301p6464301.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users