Cool, I would still like to isolate the problem with WorldImageWriter. You can crop your raster using the gdal_translate utility and send it over along with some basic test code.
Simone. ------------------------------------------------------- Ing. Simone Giannecchini GeoSolutions S.A.S. Founder - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.linkedin.com/in/simonegiannecchini http://twitter.com/simogeo ------------------------------------------------------- On Mon, May 10, 2010 at 5:27 PM, Jianhui Jin <[email protected]> wrote: > Hi Simone > > The 2.6.3 has solved the problem for giffwriter but not the worldimagewriter. > > Thank you for the help. > > J. > > On Sun, May 9, 2010 at 11:34 PM, Jianhui Jin <[email protected]> wrote: >> Thank you so much for the help. J. >> >> On Sun, May 9, 2010 at 10:13 PM, Jianhui Jin <[email protected]> wrote: >>> Hi Simone >>> >>> 6.2.1, but the sample data is too large and I don't know how to slice >>> it. Using the geotiffwriter got the same false result. >>> >>> I got the 6.2.3, put them in but as I remember there are some jars I >>> should left them out of the whole packs for something to work, so I am >>> trying to not mess everything up. >>> >>> J. >>> >>> On Thu, May 6, 2010 at 7:57 PM, Simone Giannecchini >>> <[email protected]> wrote: >>>> Ciao Jin, >>>> a few things: >>>> >>>> -1- which version of geotools are you using? >>>> -2- can you provide some sample data for testing? >>>> -3- Can you try using the geotiff writer? >>>> >>>> Simone. >>>> ------------------------------------------------------- >>>> Ing. Simone Giannecchini >>>> GeoSolutions S.A.S. >>>> Founder - Software Engineer >>>> Via Carignoni 51 >>>> 55041 Camaiore (LU) >>>> Italy >>>> >>>> phone: +39 0584983027 >>>> fax: +39 0584983027 >>>> mob: +39 333 8128928 >>>> >>>> >>>> http://www.geo-solutions.it >>>> http://geo-solutions.blogspot.com/ >>>> http://www.linkedin.com/in/simonegiannecchini >>>> http://twitter.com/simogeo >>>> >>>> ------------------------------------------------------- >>>> >>>> >>>> >>>> On Tue, May 4, 2010 at 3:27 PM, Jianhui Jin <[email protected]> wrote: >>>>> Hi All >>>>> >>>>> I am learning to write out a raster file as images. using >>>>> WorldImageWriter produce false result when I try to read in a raster >>>>> then output the exact gridcoverage: >>>>> String roofRaster = >>>>> "C:/Users/OSData/Raw/Bournemouth-03_002_8bit_25cm_o.tif"; >>>>> String outputRasterPath = >>>>> "C:/Users/output/raster/RasterWriteOutTest.tif"; >>>>> >>>>> AbstractGridCoverage2DReader roofAbstractGridCoverage2DReader; >>>>> AbstractGridFormat format = GridFormatFinder.findFormat(roofRaster); >>>>> roofAbstractGridCoverage2DReader = format.getReader(new >>>>> File(roofRaster)); >>>>> GridCoverage2D roofCoverage = >>>>> roofAbstractGridCoverage2DReader.read(null); >>>>> >>>>> WorldImageWriter imageWriter = new WorldImageWriter(new >>>>> File(outputRasterPath)); >>>>> imageWriter.write(roofCoverage, null); >>>>> >>>>> simple codes, however, the output does not look the same as the input >>>>> tiff, and i have build a statistics for both in ArcGIS, the min and >>>>> max in the input is 0 to 255 for the first 3 bands, and 0 to 16 for >>>>> the band 4, but the output raster is 0 to 16 for the first 3, and 0 to >>>>> 1 for the band 4. >>>>> >>>>> >>>>> Thank you very much >>>>> >>>>> Jin. >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> _______________________________________________ >>>>> Geotools-gt2-users mailing list >>>>> [email protected] >>>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >>>>> >>>> >>> >> > > ------------------------------------------------------------------------------ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
