Hi,
considering that the files have nodata explictily marked, the best way
would be to enable jai-ext and
not mess with the SLD:
http://docs.geoserver.org/stable/en/user/configuration/image_processing/index.html#jai-ext
GeoServer 2.13-beta recommended, it's the version that has got the most
fixes in regard to
the Sentinel2 publishing case (the german spatial agency is publishing
Sentinel2 data straight
from the jp2 files using it)
Cheers
Andrea
On Tue, Feb 27, 2018 at 6:53 PM, Pascal Coulon <[email protected]>
wrote:
> All,
>
>
>
> We are hoping to publish some 16Bits Multi-bands (10 bands) GeoTiff –
> Earth Observation Dataset Sentinel2. We have some major issue making
> transparent the “*nodata*” area available in the GeoTIFF
>
>
>
> The idea is to apply a range of SLD (e.g. true colour, false colour). Each
> SLD we apply makes the most of the channel selection along with some
> ContrastEnhancement. Note, we need to need to publish the full GeoTiff as
> opposed to pre-process the dataset off line. We will need to allow the WCS
> to run of the full GeoTiff as opposed to a simplified RGB GeoTiff.
>
>
>
> The channel selection and the ContrastEnhancement work well. However, we
> have now exhausted all avenues to make the no data area transparent.
>
>
>
> Our approach is similar to the one employed by Simone Giannecchini -
> http://blog.geoserver.org/2008/12/18/raster-symbolizer-tips-tricks-part-2/.
> We understand that this approach was successful and the post, it is also
> mentioned a sample file (EmissiveCampania.tif); it would be great if we
> could get access to it as a mean to compare with our data.
>
>
>
> We have tried a number of options
>
>
>
> · Apply specific nodata value, but so far not luck (gdalwarp
> -srcnodata 255 -dstalpha input.tif output.tif) – as per reported here
> http://osgeo-org.1560.x6.nabble.com/10-bands-geotiff-
> 16-bits-handling-transparency-for-no-data-tc5354305.html
>
> · set an InputTransparentColor to a layer – but this throw an
> error as per reported here http://osgeo-org.1560.x6.
> nabble.com/Unsupported-data-type-when-using-a-transparent-
> color-td5261925.html
>
>
>
> For information, I am including below some information on the file,
> GeoServer version and the SLD being used.
>
>
>
> Any help would be greatly appreciated from the GeoServer community.
>
>
>
> Regards,
>
>
>
> Pascal
>
>
>
> #################################################
>
> *GDLAINFO (note that I am only including the first two bands for economy.)*
>
> Driver: GTiff/GeoTIFF
>
> Files: test_16b.tif
>
> Size is 10818, 11120
>
> Coordinate System is:
>
> PROJCS["OSGB 1936 / British National Grid",
>
> GEOGCS["OSGB 1936",
>
> DATUM["OSGB_1936",
>
> SPHEROID["Airy 1830",6377563.396,299.3249646,
>
> AUTHORITY["EPSG","7001"]],
>
> TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],
>
> AUTHORITY["EPSG","6277"]],
>
> PRIMEM["Greenwich",0,
>
> AUTHORITY["EPSG","8901"]],
>
> UNIT["degree",0.0174532925199433,
>
> AUTHORITY["EPSG","9122"]],
>
> AUTHORITY["EPSG","4277"]],
>
> PROJECTION["Transverse_Mercator"],
>
> PARAMETER["latitude_of_origin",49],
>
> PARAMETER["central_meridian",-2],
>
> PARAMETER["scale_factor",0.9996012717],
>
> PARAMETER["false_easting",400000],
>
> PARAMETER["false_northing",-100000],
>
> UNIT["metre",1,
>
> AUTHORITY["EPSG","9001"]],
>
> AXIS["Easting",EAST],
>
> AXIS["Northing",NORTH],
>
> AUTHORITY["EPSG","27700"]]
>
> Origin = (430590.000000000000000,171580.000000000000000)
>
> Pixel Size = (10.000000000000000,-10.000000000000000)
>
> Metadata:
>
> AREA_OR_POINT=Area
>
> Image Structure Metadata:
>
> COMPRESSION=LZW
>
> INTERLEAVE=PIXEL
>
> Corner Coordinates:
>
> Upper Left ( 430590.000, 171580.000) ( 1d33'35.35"W, 51d26'30.82"N)
>
> Lower Left ( 430590.000, 60380.000) ( 1d34' 8.98"W, 50d26'30.70"N)
>
> Upper Right ( 538770.000, 171580.000) ( 0d 0'13.54"W, 51d25'32.60"N)
>
> Lower Right ( 538770.000, 60380.000) ( 0d 2'45.96"W, 50d25'34.51"N)
>
> Center ( 484680.000, 115980.000) ( 0d47'40.99"W, 50d56'11.37"N)
>
> Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
>
> Description = Blue
>
> Min=1.000 Max=2459.000
>
> Minimum=1.000, Maximum=2459.000, Mean=93.234, StdDev=155.846
>
> NoData Value=0
>
> Overviews: 2704x2780, 1352x1390, 676x695, 338x347, 169x173
>
> Metadata:
>
> ATTRIBUTETABLE_CHUNKSIZE=1000
>
> LAYER_TYPE=athematic
>
> STATISTICS_EXCLUDEDVALUES=0
>
> STATISTICS_HISTOBINFUNCTION=linear
>
> STATISTICS_HISTOBINVALUES=313|132138|3218980|10696252|
> 15875437|9418712|4137267|2396392|1547224|1319819|
> 871921|689650|480895|312188|275321|206391|202031|179196|
> 147838|154172|132337|139280|133389|114713|123262|107450|
> 116572|112379|98792|107788|94840|102595|99792|88529|
> 95852|85074|93346|91822|81827|88194|78309|85110|84842|75079|
> 82032|72224|80071|78713|70615|76875|68391|75817|74871|66010|
> 72996|64896|71879|71538|62797|68936|61109|67659|66478|58752|
> 64310|56529|62350|61532|54160|59564|52071|56460|55200|48656|
> 52824|47359|50917|49391|43434|47113|40748|43910|42092|36596|
> 38981|33993|36364|34556|29897|31995|27534|29271|28404|24645|
> 25379|21550|23349|22269|19231|20164|17231|18340|17206|14342|
> 15165|12766|13492|12568|10726|11399|9455|10083|9439|7950|
> 8030|6767|7090|6674|5325|5575|4498|4556|4183|3471|3452|2981|
> 2973|2645|2283|2214|2081|1714|1723|1266|1363|1162|920|907|
> 674|737|646|527|547|389|409|332|260|233|170|185|148|112|
> 80|66|61|58|33|27|19|7|1|4|5|5|1|3|2|4|3|3|2|2|4|3|2|0|6|5|
> 3|1|7|3|1|2|5|2|9|0|1|3|1|1|2|1|2|3|3|1|2|1|3|1|3|0|0|2|2|2|
> 4|1|2|2|0|2|3|0|4|2|4|0|0|0|1|3|0|2|5|1|0|0|1|0|1|0|0|1|0|0|
> 0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|1
>
> STATISTICS_HISTOMAX=2459
>
> STATISTICS_HISTOMIN=1
>
> STATISTICS_HISTONUMBINS=256
>
> STATISTICS_MAXIMUM=2459
>
> STATISTICS_MEAN=93.23404507260453
>
> STATISTICS_MEDIAN=39.40625
>
> STATISTICS_MINIMUM=1
>
> STATISTICS_MODE=39.40625
>
> STATISTICS_STDDEV=155.8464802192733
>
> Driver: GTiff/GeoTIFF
>
> Files: test_16b.tif
>
> Size is 10818, 11120
>
> Coordinate System is:
>
> PROJCS["OSGB 1936 / British National Grid",
>
> GEOGCS["OSGB 1936",
>
> DATUM["OSGB_1936",
>
> SPHEROID["Airy 1830",6377563.396,299.3249646,
>
> AUTHORITY["EPSG","7001"]],
>
> TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],
>
> AUTHORITY["EPSG","6277"]],
>
> PRIMEM["Greenwich",0,
>
> AUTHORITY["EPSG","8901"]],
>
> UNIT["degree",0.0174532925199433,
>
> AUTHORITY["EPSG","9122"]],
>
> AUTHORITY["EPSG","4277"]],
>
> PROJECTION["Transverse_Mercator"],
>
> PARAMETER["latitude_of_origin",49],
>
> PARAMETER["central_meridian",-2],
>
> PARAMETER["scale_factor",0.9996012717],
>
> PARAMETER["false_easting",400000],
>
> PARAMETER["false_northing",-100000],
>
> UNIT["metre",1,
>
> AUTHORITY["EPSG","9001"]],
>
> AXIS["Easting",EAST],
>
> AXIS["Northing",NORTH],
>
> AUTHORITY["EPSG","27700"]]
>
> Origin = (430590.000000000000000,171580.000000000000000)
>
> Pixel Size = (10.000000000000000,-10.000000000000000)
>
> Metadata:
>
> AREA_OR_POINT=Area
>
> Image Structure Metadata:
>
> COMPRESSION=LZW
>
> INTERLEAVE=PIXEL
>
> Corner Coordinates:
>
> Upper Left ( 430590.000, 171580.000) ( 1d33'35.35"W, 51d26'30.82"N)
>
> Lower Left ( 430590.000, 60380.000) ( 1d34' 8.98"W, 50d26'30.70"N)
>
> Upper Right ( 538770.000, 171580.000) ( 0d 0'13.54"W, 51d25'32.60"N)
>
> Lower Right ( 538770.000, 60380.000) ( 0d 2'45.96"W, 50d25'34.51"N)
>
> Center ( 484680.000, 115980.000) ( 0d47'40.99"W, 50d56'11.37"N)
>
> Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
>
> Description = Blue
>
> Min=1.000 Max=2459.000
>
> Minimum=1.000, Maximum=2459.000, Mean=93.234, StdDev=155.846
>
> NoData Value=0
>
> Overviews: 2704x2780, 1352x1390, 676x695, 338x347, 169x173
>
> Metadata:
>
> ATTRIBUTETABLE_CHUNKSIZE=1000
>
> LAYER_TYPE=athematic
>
> STATISTICS_EXCLUDEDVALUES=0
>
> STATISTICS_HISTOBINFUNCTION=linear
>
> STATISTICS_HISTOBINVALUES=313|132138|3218980|10696252|
> 15875437|9418712|4137267|2396392|1547224|1319819|
> 871921|689650|480895|312188|275321|206391|202031|179196|
> 147838|154172|132337|139280|133389|114713|123262|107450|
> 116572|112379|98792|107788|94840|102595|99792|88529|
> 95852|85074|93346|91822|81827|88194|78309|85110|84842|75079|
> 82032|72224|80071|78713|70615|76875|68391|75817|74871|66010|
> 72996|64896|71879|71538|62797|68936|61109|67659|66478|58752|
> 64310|56529|62350|61532|54160|59564|52071|56460|55200|48656|
> 52824|47359|50917|49391|43434|47113|40748|43910|42092|36596|
> 38981|33993|36364|34556|29897|31995|27534|29271|28404|24645|
> 25379|21550|23349|22269|19231|20164|17231|18340|17206|14342|
> 15165|12766|13492|12568|10726|11399|9455|10083|9439|7950|
> 8030|6767|7090|6674|5325|5575|4498|4556|4183|3471|3452|2981|
> 2973|2645|2283|2214|2081|1714|1723|1266|1363|1162|920|907|
> 674|737|646|527|547|389|409|332|260|233|170|185|148|112|
> 80|66|61|58|33|27|19|7|1|4|5|5|1|3|2|4|3|3|2|2|4|3|2|0|6|5|
> 3|1|7|3|1|2|5|2|9|0|1|3|1|1|2|1|2|3|3|1|2|1|3|1|3|0|0|2|2|2|
> 4|1|2|2|0|2|3|0|4|2|4|0|0|0|1|3|0|2|5|1|0|0|1|0|1|0|0|1|0|0|
> 0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|1
>
> STATISTICS_HISTOMAX=2459
>
> STATISTICS_HISTOMIN=1
>
> STATISTICS_HISTONUMBINS=256
>
> STATISTICS_MAXIMUM=2459
>
> STATISTICS_MEAN=93.23404507260453
>
> STATISTICS_MEDIAN=39.40625
>
> STATISTICS_MINIMUM=1
>
> STATISTICS_MODE=39.40625
>
> STATISTICS_STDDEV=155.8464802192733
>
>
>
> ######################################
>
> *GeoServer and GeoTool version*
>
> · GeoServer Version2.12-SNAPSHOT
>
> · Git Revisioncee07edb89e39269e7a197611ac479ab7d6782b0
>
> · Build Date2018-02-09T14:12:13Z
>
> · GeoTools Version18-SNAPSHOT (rev f3cc192ad41e67e17f95f8ecf5ac03
> ab4318e93e)
>
>
>
> ######################################
>
> *True Colour SLD Example*
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <StyledLayerDescriptor
>
> xmlns="http://www.opengis.net/sld"
>
> xmlns:ogc="http://www.opengis.net/ogc"
>
> xmlns:xlink="http://www.w3.org/1999/xlink"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.opengis.net/sld
>
> http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
> version="1.0.0">
>
> <NamedLayer>
>
> <Name>S2_True_Colour</Name>
>
> <UserStyle>
>
> <Title>S2_True_Colour</Title>
>
> <FeatureTypeStyle>
>
> <Rule>
>
> <RasterSymbolizer>
>
> <Opacity>1.0</Opacity>
>
> <ChannelSelection>
>
> <RedChannel>
>
> <SourceChannelName>3</SourceChannelName>
>
> <ContrastEnhancement>
>
> <Normalize>
>
> <VendorOption name="algorithm">
> StretchToMinimumMaximum</VendorOption>
>
> <VendorOption name="minValue">0</VendorOption>
>
> <VendorOption name="maxValue">300</VendorOption>
>
> </Normalize>
>
> </ContrastEnhancement>
>
> </RedChannel>
>
> <GreenChannel>
>
> <SourceChannelName>2</SourceChannelName>
>
> <ContrastEnhancement>
>
> <Normalize>
>
> <VendorOption name="algorithm">
> StretchToMinimumMaximum</VendorOption>
>
> <VendorOption name="minValue">0</VendorOption>
>
> <VendorOption name="maxValue">300</VendorOption>
>
> </Normalize>
>
> </ContrastEnhancement>
>
> </GreenChannel>
>
> <BlueChannel>
>
> <SourceChannelName>1</SourceChannelName>
>
> <ContrastEnhancement>
>
> <Normalize>
>
> <VendorOption name="algorithm">
> StretchToMinimumMaximum</VendorOption>
>
> <VendorOption name="minValue">0</VendorOption>
>
> <VendorOption name="maxValue">300</VendorOption>
>
> </Normalize>
>
> </ContrastEnhancement>
>
> </BlueChannel>
>
> </ChannelSelection>
>
> </RasterSymbolizer>
>
> </Rule>
>
> </FeatureTypeStyle>
>
> </UserStyle>
>
> </NamedLayer>
>
> </StyledLayerDescriptor>
>
> <http://gfidisc.scisys.co.uk>
>
>
> SCISYS UK Limited. Registered in England and Wales No. 4373530.
> Registered Office: Methuen Park, Chippenham, Wiltshire SN14 0GB, UK.
>
> Before printing, please think about the environment.
>
> <http://gfidisc.scisys.co.uk>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines: http://geoserver.org/comm/
> userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-
> requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
--
Regards,
Andrea Aime
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users