[Geoserver-users] Wrong CellType for Signed 8 bit GeoTiff

Hi all,

When i submit a map using 8bit as a GeoTiff, the geoserver always interprets this map as unsigned. So the interval between -128 to -1 is interpreted as 128 to 255.

The issue i guess that the geoserver doesn’t care about the Gdal Byte special flag as described, a example of how fix the problem: http://pastebin.com/qmMeAhPj

Hi all,

When i submit a map using 8bit as a GeoTiff, the geoserver always interprets this map as unsigned. So the interval between -128 to -1 is interpreted as 128 to 255.

The issue i guess that the geoserver doesn’t care about the Gdal Byte special flag as described, a example of how fix the problem: http://pastebin.com/qmMeAhPj

Dear Danilo,
I am pretty sure this is the case.

We'll have to think about to handles this case as this goes down to
the low level number crunching machinery.

I see you have opened a JIRA eventual work will be tracked on it.

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

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.

On Thu, Jun 16, 2016 at 6:46 PM, Danilo da Silveira Figueira
<danilosfigueira@anonymised.com> wrote:

Hi all,

When i submit a map using 8bit as a GeoTiff, the geoserver always interprets
this map as unsigned. So the interval between -128 to -1 is interpreted as
128 to 255.

The issue i guess that the geoserver doesn't care about the Gdal Byte
special flag as described, a example of how fix the problem:
http://pastebin.com/qmMeAhPj

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning
reports. http://sdm.link/zohomanageengine
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thanks for the response Simone.

So if someone else is facing this issue, i sugest to use two Rules, the first legend with the correct values and labels, and a second Rule with the unsigned values.

You can use two Rules to represent these values. The corresponding value for Signed -1 is the Unsigned 255. So you define the -1 on the first Rule, and the 255 on the second Rule as the following sld example.

<?xml version="1.0" encoding="UTF-8"?>

sld:NamedLayer
sld:NameDefault Styler</sld:Name>
sld:UserStyle
sld:NameDefault Styler</sld:Name>
sld:TitleBiodiversity Conservation Priorities</sld:Title>
sld:FeatureTypeStyle
sld:Namebiodiversity_conservation_priorities_1</sld:Name>
sld:Rule
sld:RasterSymbolizer
sld:ChannelSelection
sld:GrayChannel
sld:SourceChannelName1</sld:SourceChannelName>
</sld:GrayChannel>
</sld:ChannelSelection>
<sld:ColorMap type=“values”>
<sld:ColorMapEntry color=“#B2B2B2” opacity=“1” quantity=“-1” label=“-1”/>
</sld:ColorMap>
</sld:RasterSymbolizer>
</sld:Rule>
sld:Rule
sld:RasterSymbolizer
sld:ChannelSelection
sld:GrayChannel
sld:SourceChannelName1</sld:SourceChannelName>
</sld:GrayChannel>
</sld:ChannelSelection>
<sld:ColorMap type=“values”>
<sld:ColorMapEntry color=“#B2B2B2” opacity=“1” quantity=“255” label=“255”/>
</sld:ColorMap>
</sld:RasterSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>

···

2016-06-17 10:34 GMT-03:00 Simone Giannecchini <simone.giannecchini@anonymised.com>:

Dear Danilo,
I am pretty sure this is the case.

We’ll have to think about to handles this case as this goes down to
the low level number crunching machinery.

I see you have opened a JIRA eventual work will be tracked on it.

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

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.

On Thu, Jun 16, 2016 at 6:46 PM, Danilo da Silveira Figueira
<danilosfigueira@anonymised.com> wrote:

Hi all,

When i submit a map using 8bit as a GeoTiff, the geoserver always interprets
this map as unsigned. So the interval between -128 to -1 is interpreted as
128 to 255.

The issue i guess that the geoserver doesn’t care about the Gdal Byte
special flag as described, a example of how fix the problem:
http://pastebin.com/qmMeAhPj


What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning
reports. http://sdm.link/zohomanageengine


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users