[Gvsig_english] raster iamge wrong band value
Benjamin Ducke
benjamin.ducke at oxfordarch.co.uk
Wed Jul 7 11:15:44 CEST 2010
OK, I have found a fix. Will file a ticket on OSOR...
Ben
----- Original Message -----
> Just some more notes on this:
>
> I tried changing the data type on that big GLOBCOVER file
> that Klaus originally ran into trouble with. But SEXTANTE ran
> out of memory. I then tried using the SEXTANTE map calculator
> to add +128 to the data range, but same memory problems.
>
> Luckily, the latest SEXTANTE 0.6 release comes with a GRASS GIS
> interface. So I could use GRASS' r.out.gdal module to convert
> to a new GeoTIFF of type "UInt16". With LZW compression enabled,
> that gave me a GeoTIFF of pretty much exactly twice the size
> of the original (which you would expect going from 8 bit Byte to
> 16 bit Short).
>
> Of course, one could also use the GDAL command line tools directly
> to achieve the same effect.
>
> But all in all, I must say that this would be a real obstacle
> for many gvSIG users and I think this bug should really be fixed
> for the 1.10 release, as it affects very basic functionality.
> Like Klaus stated before, users should be able to rely on gvSIG
> correctly loading basic file formats like GeoTIFF.
>
> Given that a "proper" fix, changing all the data type handling
> would probably take too much time, I am wondering if a quick fix
> could consist in just "pretending" that a Byte type raster data
> source is type Integer, and load it as integer instead of byte.
>
> I would take a look at it but I am not sure where to start.
> Which one is the method (in libRaster, I guess?) that first
> initializes the data type for a raster data source?
>
> Cheers,
>
> Ben
>
>
> ----- Original Message -----
> > Yes, short type is the right choice, of course.
> >
> > About if it can be fixed or not, I don't know, I work mainly in
> > vectorial part.
> >
> > Cheers.
> >
> > Benjamin Ducke escribió:
> > > Or maybe use type "short"? Seems to me that would save some memory
> > > (16 bit instead of 32 per cell).
> > >
> > > Is there any chance this fix will make it into 1.10?
> > >
> > > Cheers,
> > >
> > > Ben
> > >
> > > ----- Original Message -----
> > >
> > >> Hi Klaus.
> > >>
> > >> I think the problem is about byte datatype in java. In C++ you
> > >> can use an unsigned byte, but in java you can't (always are
> > >> signed).
> > >>
> > >> So, for this kind of images, we should use internaly int's
> > >> instead of byte's. So, yes, it seems a bug, and can be corrected
> > >> in future
> > >> releases.
> > >>
> > >> Thanks for your help.
> > >>
> > >> Fran.
> > >>
> > >>
> > >> Mithoefer, Klaus escribió:
> > >>
> > >>> Dear Guilermo,
> > >>>
> > >>>
> > >>>
> > >>> Thank you for your email. I have tried gvSIG, ESRI ArcGIS and
> > >>> software which uses GDAL libraries such as FWtools. Its only
> > >>> gvSIg which produces wrong results. The data type is byte(gvSIG)
> > >>> and according to
> > >>> ArcGIS 8 Bit unsigned integer which is to me generally the same
> > >>> but more detailed information.
> > >>>
> > >>>
> > >>>
> > >>> However, I can off course work around that but to be honest it
> > >>> seems it is a bug in gvSIG. If I can’t trust a software that it
> > >>> is able to
> > >>> read a file correctly (and it is a simple tif file public domain
> > >>> land cover data.
> > >>>
> > >>>
> > >>>
> > >>> Thank you also for sending me the picture but it only showed the
> > >>> landcover. Water bodies for example should have value 210.
> > >>>
> > >>>
> > >>>
> > >>> Again, thanks for your comments! That’s well appreciated.
> > >>>
> > >>>
> > >>>
> > >>> Klaus
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> *From:* gvsig_internacional-bounces at listserv.gva.es
> > >>> [mailto:gvsig_internacional-bounces at listserv.gva.es] *On Behalf
> > >>> Of *Guillermo Tamburini
> > >>> *Sent:* Monday, July 05, 2010 09:30
> > >>> *To:* Users and Developers mailing list
> > >>> *Subject:* Re: [Gvsig_english] raster iamge wrong band value
> > >>>
> > >>>
> > >>>
> > >>> Sorry but,
> > >>>
> > >>> did you check my last proposal? Or was I wrong?
> > >>>
> > >>> This is an example of my result.
> > >>>
> > >>> Regards.
> > >>>
> > >>> Mithoefer, Klaus wrote:
> > >>>
> > >>> Thanks a lot Benjamin, but It didn't help.
> > >>>
> > >>> Kind regards,
> > >>>
> > >>> Klaus
> > >>>
> > >>> -----Original Message-----
> > >>> From: gvsig_internacional-bounces at listserv.gva.es
> > >>> <mailto:gvsig_internacional-bounces at listserv.gva.es>
> > >>> [mailto:gvsig_internacional-bounces at listserv.gva.es] On Behalf
> > >>> Of Benjamin Ducke
> > >>> Sent: Thursday, July 01, 2010 12:54 AM
> > >>> To: Users and Developers mailing list
> > >>> Subject: Re: [Gvsig_english] raster iamge wrong band value
> > >>>
> > >>> Have you tried updating the layer's band statistics after
> > >>> importing the raster?
> > >>>
> > >>> Ben
> > >>>
> > >>> ----- Original Message -----
> > >>>
> > >>>
> > >>> Thank you Guillermo and Vincent!
> > >>>
> > >>>
> > >>>
> > >>> I guess Vincent might be right. The data source I am using
> > >>> can be
> > >>>
> > >>> found on the web at
> > >>>
> > >>> ftp://guestglobcover:Pir8Eefo@us-ext-nas.eo.esa.int/regional/07_Globcover_200412_200606_V2.2_Africa.zip
> > >>>
> > >>> I use the file GLOBCOVER_200412_200606_V2.2_Africa_Reg.tif
> > >>> from this
> > >>>
> > >>> package which is an 8 bit unsigned file format. It seems
> > >>> really that
> > >>>
> > >>> gvSIG is interpreting this as 8 bit signed.
> > >>>
> > >>>
> > >>>
> > >>> I tried to convert is using GDAL to Eras IMG, but the effect
> > >>> remains.
> > >>>
> > >>>
> > >>>
> > >>> Thank you.
> > >>>
> > >>>
> > >>>
> > >>> Klaus
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> -----Original Message-----
> > >>>
> > >>> From: gvsig_internacional-bounces at listserv.gva.es
> > >>> <mailto:gvsig_internacional-bounces at listserv.gva.es>
> > >>>
> > >>> [mailto:gvsig_internacional-bounces at listserv.gva.es] On
> > >>> Behalf Of
> > >>>
> > >>> Guillermo Tamburini
> > >>>
> > >>> Sent: Wednesday, June 30, 2010 14:46
> > >>>
> > >>> To: Users and Developers mailing list
> > >>>
> > >>> Subject: Re: [Gvsig_english] raster iamge wrong band value
> > >>>
> > >>>
> > >>>
> > >>> hi,
> > >>>
> > >>>
> > >>>
> > >>> I have no idea what could be your problem. And i can not
> > >>> test with
> > >>>
> > >>> other softwares because I haven't it now.
> > >>>
> > >>>
> > >>>
> > >>> Well, my only proposal is that you try to make sure that the
> > >>> different
> > >>>
> > >>> software are understanding the data in the same data type.
> > >>> Raster
> > >>>
> > >>> layers could be byte, float, integer... Or to export the
> > >>> data to other
> > >>>
> > >>> formats for testing if the result is always the same.
> > >>>
> > >>>
> > >>>
> > >>> From gvSIG you could check the data type in the general tab
> > >>> of the
> > >>>
> > >>> layer proprieties. May be in ESRI and in that case you get
> > >>> only real
> > >>>
> > >>> positive numbers, and gvSIG is understanding numbers up and
> > >>> down the
> > >>>
> > >>> zero. In that case you would obtain the data moved a half to
> > >>> the
> > >>>
> > >>> negative values.
> > >>>
> > >>>
> > >>>
> > >>> If you want you can send us some data example for testing
> > >>> it.
> > >>>
> > >>>
> > >>>
> > >>> Best regards.
> > >>>
> > >>>
> > >>>
> > >>> Mithoefer, Klaus wrote:
> > >>>
> > >>>
> > >>>
> > >>> Dear List,
> > >>>
> > >>>
> > >>>
> > >>> I use globecover vegetation data. When I try to retrieve
> > >>> the band
> > >>>
> > >>> value by using the information picker or assign values
> > >>> to a point
> > >>>
> > >>> layer I get the wrong value (e.g. for lakes I get-46
> > >>> instead of
> > >>>
> > >>> 210). I compared this with ArcGIS and FWtools.
> > >>>
> > >>>
> > >>>
> > >>> I tried gvSIG 1.2, 1.9 and 2010 OADE with Geotif and
> > >>> Erdas IMG
> > >>>
> > >>> format. They all do the same. What is the problem?
> > >>>
> > >>>
> > >>>
> > >>> Thank you,
> > >>>
> > >>>
> > >>>
> > >>> Klaus
> > >>>
> > >>>
> > >>>
> > >>> Klaus Mithöfer
> > >>>
> > >>> Geographic Information Systems (GIS) Officer
> > >>>
> > >>> icipe - International Centre of Insect Physiology and
> > >>> Ecology
> > >>>
> > >>> P.O. Box 30772 - 00100
> > >>>
> > >>> Nairobi, Kenya
> > >>>
> > >>> Phone: +254-20-8632000, Extn. 2147
> > >>>
> > >>> Fax: +254-20-8632001/2
> > >>>
> > >>> Mobile: +254-724-308404
> > >>>
> > >>> E-Mail: kmithoefer at icipe.org
> > >>> <mailto:kmithoefer at icipe.org>
> > >>>
> > >>> web: www.icipe.org <http://www.icipe.org>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> ----------------------------------------------------------------------------
> > >>>
> > >>> This position is supported by German development
> > >>> cooperation //
> > >>>
> > >>> Centre for international Migration and Development -
> > >>>
> > >>> http://www.cimonline.de/en/index.asp
> > >>>
> > >>>
> > >>>
> > >>> Klaus.mithoefer at cimonline.de
> > >>> <mailto:Klaus.mithoefer at cimonline.de>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>> Gvsig_internacional
> > >>>
> > >>> mailing list
> > >>>
> > >>> Gvsig_internacional at listserv.gva.es
> > >>> <mailto:Gvsig_internacional at listserv.gva.es>
> > >>>
> > >>> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> -- Guillermo Tamburini Beliveau
> > >>>
> > >>> Proyecto gvSIG
> > >>>
> > >>> Consellería de Infraestructuras y Transportes (GVA)
> > >>>
> > >>> Valencia (Spain)
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> _______________________________________________
> > >>> Gvsig_internacional
> > >>>
> > >>> mailing list
> > >>>
> > >>> Gvsig_internacional at listserv.gva.es
> > >>> <mailto:Gvsig_internacional at listserv.gva.es>
> > >>>
> > >>> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> > >>>
> > >>> _______________________________________________
> > >>> Gvsig_internacional
> > >>>
> > >>> mailing list
> > >>>
> > >>> Gvsig_internacional at listserv.gva.es
> > >>> <mailto:Gvsig_internacional at listserv.gva.es>
> > >>>
> > >>> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> ------ Files attached to this email may be in ISO 26300 format
> > >>> (OASIS Open Document Format). If you have difficulty opening
> > >>> them, please visit http://iso26300.info for more information.
> > >>>
> > >>> _______________________________________________
> > >>> Gvsig_internacional mailing list
> > >>> Gvsig_internacional at listserv.gva.es
> > >>> <mailto:Gvsig_internacional at listserv.gva.es>
> > >>> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> > >>> _______________________________________________
> > >>> Gvsig_internacional mailing list
> > >>> Gvsig_internacional at listserv.gva.es
> > >>> <mailto:Gvsig_internacional at listserv.gva.es>
> > >>> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> -- Guillermo Tamburini Beliveau
> > >>> Proyecto gvSIG
> > >>> Consellería de Infraestructuras y Transportes (GVA)
> > >>> Valencia (Spain)
> > >>>
> > >>> ------------------------------------------------------------------------
> > >>>
> > >>> _______________________________________________
> > >>> Gvsig_internacional mailing list
> > >>> Gvsig_internacional at listserv.gva.es
> > >>> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> > >>>
> > >>>
> > >> -- Fran Peñarrubia
> > >> Scolab www.scolab.es
> > >>
> > >> Asociación gvSIG
> > >> www.gvsig.com
> > >>
> > >> _______________________________________________
> > >> Gvsig_internacional mailing list
> > >> Gvsig_internacional at listserv.gva.es
> > >> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> > >>
> > >
> > >
> > > ------ Files attached to this email may be in ISO 26300 format
> > > (OASIS Open Document Format). If you have difficulty opening them,
> > > please visit http://iso26300.info for more information.
> > >
> > > _______________________________________________
> > > Gvsig_internacional mailing list
> > > Gvsig_internacional at listserv.gva.es
> > > http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> > >
> >
> > -- Fran Peñarrubia
> > Scolab www.scolab.es
> >
> > Asociación gvSIG
> > www.gvsig.com
> >
> > _______________________________________________ Gvsig_internacional
> > mailing list
> > Gvsig_internacional at listserv.gva.es
> > http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
> ------ Files attached to this email may be in ISO 26300 format (OASIS
> Open Document Format). If you have difficulty opening them, please
> visit http://iso26300.info for more information.
>
> _______________________________________________ Gvsig_internacional
> mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
------
Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.
More information about the Gvsig_internacional
mailing list