Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff
Hello, Thanks. I have the following line in the map file LAYER declaration: PROCESSING "BANDS=120" In any case, the current configuration gives me a floating point geotiff that is all zeros. I know that band 120 of the file has non-zero double precision data in it. Maybe it's a byte ordering problem Peter Lime, Steve D (DNR) wrote: Is this link of help? http://mapserver.org/input/raster.html#special-processing-directives There's a directive to extract a single band from an n-band image... Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Peter Willis Sent: Friday, January 29, 2010 10:41 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff Hello, Interesting... The documentation indicates: &RangeSubset=contents:nearest[Band[120]] I tried what you suggest but continue to have the same problem. The mapserver *did not* complain about '&RESAMPLE=BILINEAR&Band=120' so I guess we can assume that those parameters work. Peter Rahkonen Jukka wrote: Hi, I have never used this myself: &RangeSubset=contents:nearest[Band[120]] Is that WCS 1.0.0 parameter? For selecting bands from WCS 1.0.0 service I have been using something like &RESAMPLE=BILINEAR&Band=4 -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Peter Willis Lähetetty: pe 29.1.2010 0:26 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff Hello, The definition of GEOTIFF_FLOAT is as follows: OUTPUTFORMAT NAME GEOTIFF_FLOAT DRIVER "GDAL/GTiff" MIMETYPE "application/octet-stream" IMAGEMODE FLOAT32 END I Added the MIMETYPE as shown to ensure that web browsers would ask to save the file rather than just open it in an image viewer from a temp file. (MS Windows...) That part works fine. Mostly I am concerned with extracting a specific 'band' from the multi-band file. The server serves floating point geotiff just fine. Peter Rahkonen Jukka wrote: Hi, How have you defined the OUTPUTFORMAT for GEOTIFF_FLOAT? -Jukka Rahkonen- Peter Willis wrote: Hello, I have been setting up a WCS map file for mapserver. PROBLEM: Problems arise when rasters are defined as follows: LAYER NAME SomeDataChannel120 STATUS OFF DEBUG ON TYPE RASTER ### required PROCESSING "BANDS=120" METADATA "wcs_label" "Data/stuff" "wcs_rangeset_name" 'bands' "wcs_rangeset_label" "Stuff thats mapped" "ows_extent" '-135 55 -121 46' "wcs_resolution" '0.08332 -0.083332' "ows_srs" 'EPSG:4326' "wcs_srs" 'EPSG:4326' "wcs_formats" 'GEOTIFF_FLOAT,GEOTIFF_INT16' "wcs_nativeformat" 'ENVI' #"wcs_bandcount" '563' "wcs_rangeset_axes" 'bands' END DATA /data/stuff.img PROJECTION "init=epsg:4623" END DUMP TRUE ### required END I have 'wcs_bandcount' commented out because mapserver causes an internal error in the web server if I define the band count. I get floating point geotiff served with the following client request: http://sparky.com/cgi-bin/wcs?REQUEST=GetCoverage&SERVICE=WCS&VERSION=1.0.0&COVERAGE=SomeDataChannel120&CRS=EPSG:4326&BBOX=-135,55,-121,46&WIDTH=432&HEIGHT=216&FORMAT=GEOTIFF_FLOAT&RangeSubset=contents:nearest[Band[120]] ..however, I always only get the first band from the img file QUESTIONS: Is there a problem with this setup? Do I need to define each band as a layer in the mapfile or will mapserver WCS allow the client to request a single channel? Thanks for any enlightenment, Peter ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff
Is this link of help? http://mapserver.org/input/raster.html#special-processing-directives There's a directive to extract a single band from an n-band image... Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Peter Willis Sent: Friday, January 29, 2010 10:41 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff Hello, Interesting... The documentation indicates: &RangeSubset=contents:nearest[Band[120]] I tried what you suggest but continue to have the same problem. The mapserver *did not* complain about '&RESAMPLE=BILINEAR&Band=120' so I guess we can assume that those parameters work. Peter Rahkonen Jukka wrote: > Hi, > > I have never used this myself: &RangeSubset=contents:nearest[Band[120]] > Is that WCS 1.0.0 parameter? For selecting bands from WCS 1.0.0 service I > have been using something like > &RESAMPLE=BILINEAR&Band=4 > > -Jukka Rahkonen- > > > -Alkuperäinen viesti- > Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Peter Willis > Lähetetty: pe 29.1.2010 0:26 > Vastaanottaja: mapserver-users@lists.osgeo.org > Aihe: Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS > as floating point geotiff > > Hello, > > The definition of GEOTIFF_FLOAT is as follows: > > OUTPUTFORMAT >NAME GEOTIFF_FLOAT >DRIVER "GDAL/GTiff" >MIMETYPE "application/octet-stream" >IMAGEMODE FLOAT32 > END > > I Added the MIMETYPE as shown to ensure that web browsers > would ask to save the file rather than just open it in an > image viewer from a temp file. (MS Windows...) > > That part works fine. > > > Mostly I am concerned with extracting a specific 'band' > from the multi-band file. The server serves floating point > geotiff just fine. > > Peter > > > Rahkonen Jukka wrote: >> Hi, >> >> How have you defined the OUTPUTFORMAT for GEOTIFF_FLOAT? >> >> -Jukka Rahkonen- >> >> >> Peter Willis wrote: >> >> >>> Hello, >>> I have been setting up a WCS map file for mapserver. >>> PROBLEM: >>> Problems arise when rasters are defined >>> as follows: >> LAYER >>NAME SomeDataChannel120 >>STATUS OFF >>DEBUG ON >>TYPE RASTER ### required >>PROCESSING "BANDS=120" >>METADATA >> "wcs_label" "Data/stuff" >> "wcs_rangeset_name" 'bands' >> "wcs_rangeset_label" "Stuff thats mapped" >> "ows_extent" '-135 55 -121 46' >> "wcs_resolution" '0.08332 -0.083332' >> "ows_srs" 'EPSG:4326' >> "wcs_srs" 'EPSG:4326' >> "wcs_formats" 'GEOTIFF_FLOAT,GEOTIFF_INT16' >> "wcs_nativeformat" 'ENVI' >> #"wcs_bandcount" '563' >> "wcs_rangeset_axes" 'bands' >>END >>DATA /data/stuff.img >>PROJECTION >> "init=epsg:4623" >>END >>DUMP TRUE ### required >> END >> >> >> I have 'wcs_bandcount' commented out because mapserver >> causes an internal error in the web server if I define the >> band count. >> >> I get floating point geotiff served with the following client request: >> http://sparky.com/cgi-bin/wcs?REQUEST=GetCoverage&SERVICE=WCS&VERSION=1.0.0&COVERAGE=SomeDataChannel120&CRS=EPSG:4326&BBOX=-135,55,-121,46&WIDTH=432&HEIGHT=216&FORMAT=GEOTIFF_FLOAT&RangeSubset=contents:nearest[Band[120]] >> >> ..however, I always only get the first band from the img file >> >> >> QUESTIONS: >> >> Is there a problem with this setup? >> >> Do I need to define each band as a layer in the mapfile >> or will mapserver WCS allow the client to request a single >> channel? >> >> Thanks for any enlightenment, >> >> Peter > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff
Hello, Interesting... The documentation indicates: &RangeSubset=contents:nearest[Band[120]] I tried what you suggest but continue to have the same problem. The mapserver *did not* complain about '&RESAMPLE=BILINEAR&Band=120' so I guess we can assume that those parameters work. Peter Rahkonen Jukka wrote: Hi, I have never used this myself: &RangeSubset=contents:nearest[Band[120]] Is that WCS 1.0.0 parameter? For selecting bands from WCS 1.0.0 service I have been using something like &RESAMPLE=BILINEAR&Band=4 -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Peter Willis Lähetetty: pe 29.1.2010 0:26 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff Hello, The definition of GEOTIFF_FLOAT is as follows: OUTPUTFORMAT NAME GEOTIFF_FLOAT DRIVER "GDAL/GTiff" MIMETYPE "application/octet-stream" IMAGEMODE FLOAT32 END I Added the MIMETYPE as shown to ensure that web browsers would ask to save the file rather than just open it in an image viewer from a temp file. (MS Windows...) That part works fine. Mostly I am concerned with extracting a specific 'band' from the multi-band file. The server serves floating point geotiff just fine. Peter Rahkonen Jukka wrote: Hi, How have you defined the OUTPUTFORMAT for GEOTIFF_FLOAT? -Jukka Rahkonen- Peter Willis wrote: Hello, I have been setting up a WCS map file for mapserver. PROBLEM: Problems arise when rasters are defined as follows: LAYER NAME SomeDataChannel120 STATUS OFF DEBUG ON TYPE RASTER ### required PROCESSING "BANDS=120" METADATA "wcs_label" "Data/stuff" "wcs_rangeset_name" 'bands' "wcs_rangeset_label" "Stuff thats mapped" "ows_extent" '-135 55 -121 46' "wcs_resolution" '0.08332 -0.083332' "ows_srs" 'EPSG:4326' "wcs_srs" 'EPSG:4326' "wcs_formats" 'GEOTIFF_FLOAT,GEOTIFF_INT16' "wcs_nativeformat" 'ENVI' #"wcs_bandcount" '563' "wcs_rangeset_axes" 'bands' END DATA /data/stuff.img PROJECTION "init=epsg:4623" END DUMP TRUE ### required END I have 'wcs_bandcount' commented out because mapserver causes an internal error in the web server if I define the band count. I get floating point geotiff served with the following client request: http://sparky.com/cgi-bin/wcs?REQUEST=GetCoverage&SERVICE=WCS&VERSION=1.0.0&COVERAGE=SomeDataChannel120&CRS=EPSG:4326&BBOX=-135,55,-121,46&WIDTH=432&HEIGHT=216&FORMAT=GEOTIFF_FLOAT&RangeSubset=contents:nearest[Band[120]] ..however, I always only get the first band from the img file QUESTIONS: Is there a problem with this setup? Do I need to define each band as a layer in the mapfile or will mapserver WCS allow the client to request a single channel? Thanks for any enlightenment, Peter ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff
Hi, I have never used this myself: &RangeSubset=contents:nearest[Band[120]] Is that WCS 1.0.0 parameter? For selecting bands from WCS 1.0.0 service I have been using something like &RESAMPLE=BILINEAR&Band=4 -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org puolesta: Peter Willis Lähetetty: pe 29.1.2010 0:26 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] How to serve individual RAW binary Bands fromWCS as floating point geotiff Hello, The definition of GEOTIFF_FLOAT is as follows: OUTPUTFORMAT NAME GEOTIFF_FLOAT DRIVER "GDAL/GTiff" MIMETYPE "application/octet-stream" IMAGEMODE FLOAT32 END I Added the MIMETYPE as shown to ensure that web browsers would ask to save the file rather than just open it in an image viewer from a temp file. (MS Windows...) That part works fine. Mostly I am concerned with extracting a specific 'band' from the multi-band file. The server serves floating point geotiff just fine. Peter Rahkonen Jukka wrote: > Hi, > > How have you defined the OUTPUTFORMAT for GEOTIFF_FLOAT? > > -Jukka Rahkonen- > > > Peter Willis wrote: > > >> Hello, > >> I have been setting up a WCS map file for mapserver. > >> PROBLEM: > >> Problems arise when rasters are defined >> as follows: > > LAYER >NAME SomeDataChannel120 >STATUS OFF >DEBUG ON >TYPE RASTER ### required >PROCESSING "BANDS=120" >METADATA > "wcs_label" "Data/stuff" > "wcs_rangeset_name" 'bands' > "wcs_rangeset_label" "Stuff thats mapped" > "ows_extent" '-135 55 -121 46' > "wcs_resolution" '0.08332 -0.083332' > "ows_srs" 'EPSG:4326' > "wcs_srs" 'EPSG:4326' > "wcs_formats" 'GEOTIFF_FLOAT,GEOTIFF_INT16' > "wcs_nativeformat" 'ENVI' > #"wcs_bandcount" '563' > "wcs_rangeset_axes" 'bands' >END >DATA /data/stuff.img >PROJECTION > "init=epsg:4623" >END >DUMP TRUE ### required > END > > > I have 'wcs_bandcount' commented out because mapserver > causes an internal error in the web server if I define the > band count. > > I get floating point geotiff served with the following client request: > http://sparky.com/cgi-bin/wcs?REQUEST=GetCoverage&SERVICE=WCS&VERSION=1.0.0&COVERAGE=SomeDataChannel120&CRS=EPSG:4326&BBOX=-135,55,-121,46&WIDTH=432&HEIGHT=216&FORMAT=GEOTIFF_FLOAT&RangeSubset=contents:nearest[Band[120]] > > ..however, I always only get the first band from the img file > > > QUESTIONS: > > Is there a problem with this setup? > > Do I need to define each band as a layer in the mapfile > or will mapserver WCS allow the client to request a single > channel? > > Thanks for any enlightenment, > > Peter ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users