1bit Raster Transparency

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

1bit Raster Transparency

Stefano Iacovella
I've read a few post on the nabble archive about how to handle transparency with raster and also had a look at http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
Eventually it seems I've not understood how to render raster with transparency so I hope you can help me finding a solution.

I prepared a mosaic with 1 bit Raster. I processed the image files with gdal utilities to transform it in geotiff. Here are the output of gdalinfo:

Driver: GTiff/GeoTIFF
Files: 459020.tiff
Size is 11653, 9217
Coordinate System is:
PROJCS["Monte Mario / Italy zone 1",
    GEOGCS["Monte Mario",
        DATUM["Monte_Mario",
            SPHEROID["International 1924",6378388,297.000000000005,
                AUTHORITY["EPSG","7022"]],
            AUTHORITY["EPSG","6265"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4265"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",1500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","3003"]]
Origin = (1450696.319000000134110,4516874.898998536169529)
Pixel Size = (0.634999999841250,-0.634999999841250)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=15.748
  TIFFTAG_YRESOLUTION=15.748
  TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E, 40d48'2.48"N)
Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E, 40d44'52.69"N)
Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E, 40d48'3.96"N)
Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E, 40d44'54.16"N)
Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E, 40d46'28.35"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
  NoData Value=255
  Image Structure Metadata:
    NBITS=1
  Color Table (RGB with 2 entries)
    0: 255,255,255,255
    1: 0,0,0,255

I used the mosaic plugin to load them in geoserver 1.7.2. I can get a map with WMS request but there are some white strips at the borders of each file. Original files have overlapping areas that are white. I would like to set the white pixel to transparent and so eliminate the stripes.
I set the OutputTransparentColor field in the config of coverage to #FFFFFF but had no result.
I tried to set also the InputTransparentColor filed to #FFFFFF value but I got an exception:

2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to render RenderedOp for this operation.
java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
        at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
        at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
        at javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
...

Should I use RasterSymbolizer?
Thanks a lot for any hint

Stefano Iacovella

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Simone Giannecchini
Ciao Stefano,
the correct way to obtain what you need would be using the
InputTransparentColor. However, there are various bugs/limitations in
JAI as far as managing transparency with mosaic which I tried to
workaround (apparently with not much success :-) ).
Could you make available some sample data for testing?

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
<[hidden email]> wrote:

> I've read a few post on the nabble archive about how to handle transparency
> with raster and also had a look at
> http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
> Eventually it seems I've not understood how to render raster with
> transparency so I hope you can help me finding a solution.
>
> I prepared a mosaic with 1 bit Raster. I processed the image files with gdal
> utilities to transform it in geotiff. Here are the output of gdalinfo:
>
> Driver: GTiff/GeoTIFF
> Files: 459020.tiff
> Size is 11653, 9217
> Coordinate System is:
> PROJCS["Monte Mario / Italy zone 1",
>     GEOGCS["Monte Mario",
>         DATUM["Monte_Mario",
>             SPHEROID["International 1924",6378388,297.000000000005,
>                 AUTHORITY["EPSG","7022"]],
>             AUTHORITY["EPSG","6265"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4265"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",9],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",1500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","3003"]]
> Origin = (1450696.319000000134110,4516874.898998536169529)
> Pixel Size = (0.634999999841250,-0.634999999841250)
> Metadata:
>   AREA_OR_POINT=Area
>   TIFFTAG_XRESOLUTION=15.748
>   TIFFTAG_YRESOLUTION=15.748
>   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
> Image Structure Metadata:
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E, 40d48'2.48"N)
> Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E, 40d44'52.69"N)
> Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E, 40d48'3.96"N)
> Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E, 40d44'54.16"N)
> Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E, 40d46'28.35"N)
> Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>   NoData Value=255
>   Image Structure Metadata:
>     NBITS=1
>   Color Table (RGB with 2 entries)
>     0: 255,255,255,255
>     1: 0,0,0,255
>
> I used the mosaic plugin to load them in geoserver 1.7.2. I can get a map
> with WMS request but there are some white strips at the borders of each
> file. Original files have overlapping areas that are white. I would like to
> set the white pixel to transparent and so eliminate the stripes.
> I set the OutputTransparentColor field in the config of coverage to #FFFFFF
> but had no result.
> I tried to set also the InputTransparentColor filed to #FFFFFF value but I
> got an exception:
>
> 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to render
> RenderedOp for this operation.
> java.lang.RuntimeException: - Unable to render RenderedOp for this
> operation.
>         at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>         at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>         at javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
> ...
>
> Should I use RasterSymbolizer?
> Thanks a lot for any hint
>
> Stefano Iacovella
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Stefano Iacovella
Ciao Simone

thank you for the kindly support :-)
It was my fault I replied directly to Simone's mailbox. We come back to the list hoping we'll find a solution and it may be useful to someone else.

Coming to the topic I get the original tif+tfw file and transform them to the geotiff format. May be I made some errors in the transformation. this is the output of gdalinfo on the original file:

Driver: GTiff/GeoTIFF
Files: CTR_OLD/564090.tif
Size is 11653, 8994
Coordinate System is `'
Origin = (1442261.101999999955297,4328093.219998572021723)
Pixel Size = (0.634999999841250,-0.634999999841250)
Metadata:
  TIFFTAG_XRESOLUTION=15.748
  TIFFTAG_YRESOLUTION=15.748
  TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
Image Structure Metadata:
  COMPRESSION=CCITTFAX4
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( 1442261.102, 4328093.220)
Lower Left  ( 1442261.102, 4322382.030)
Upper Right ( 1449660.757, 4328093.220)
Lower Right ( 1449660.757, 4322382.030)
Center      ( 1445960.929, 4325237.625)
Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
  Overviews: 146x112
  Image Structure Metadata:
    NBITS=1
  Color Table (RGB with 2 entries)
    0: 255,255,255,255
    1: 0,0,0,255

I use this parameters to transform them in geotiff:

 gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co "NBITS=1" -a_srs "EPSG:3003" $file $newfile

May be of any help change any of this parameters?

The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with GDAL plugin.
Could it be useful if I disable the JAI support?

Thanks again


2009/2/12 Simone Giannecchini <[hidden email]>
Ciao Simone,
quick progress update (sono parecchio indaffarato sti giorni purtroppo).

Allora innanzitutto per tua sfortuna stai usando un tipo di dato che attualmente manda in crash la pipeline di rendering del java2d su 2 delle mie 3 macchine su cui ho testato. Stai usando  tiff black - white che sono trasformate  in una palette a 1 bit e questo crea imbarazzi notevoli alla pipelina, Ho cmq trovato un workaround.
Se tu non sei incorso in questo problema ti sarei grato se tu potessi darmi qualche dettaglio sulla piattaforma di test (OS soprattutto) e sulla versione di java. La pipelina di rendering cambia a seconda di OS e versione di java (OGL, Direct3D, etc..).

Per il secondo problema ho riprodotto, ma non ancora fixxato. Domani dovrei dare un colpo definitivo.


ti tengo aggioranto,

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------


On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella <[hidden email]> wrote:
Ciao Simone

ti allego un archivio con i quattro fotogrammi ed i file con i metadati di costruzione del mosaico.
Per i risultati ed eventuali altre prove ovviamente ci sentiamo sulla ml pubblica.
Grazie mille per il supporto




2009/2/8 Simone Giannecchini <[hidden email]>
Ciao Stefano, mettila pure dove ti torna meglio.
L'importante è continuare la discussione sulla ml pubblica.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
<[hidden email]> wrote:
> Ciao Simone
>
> I can email you a smaple of four files that should be enough for building a
> mosaic. If you prefer I can manage to make them availabe on a public url
> avoinding to fill your mailbox.
> Thanks a lot for the answer
>
> Stefano Iacovella
>
> 2009/2/8 Simone Giannecchini <[hidden email]>
>>
>> Ciao Stefano,
>> the correct way to obtain what you need would be using the
>> InputTransparentColor. However, there are various bugs/limitations in
>> JAI as far as managing transparency with mosaic which I tried to
>> workaround (apparently with not much success :-) ).
>> Could you make available some sample data for testing?
>>
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>>
>> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>> <[hidden email]> wrote:
>> > I've read a few post on the nabble archive about how to handle
>> > transparency
>> > with raster and also had a look at
>> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>> > Eventually it seems I've not understood how to render raster with
>> > transparency so I hope you can help me finding a solution.
>> >
>> > I prepared a mosaic with 1 bit Raster. I processed the image files with
>> > gdal
>> > utilities to transform it in geotiff. Here are the output of gdalinfo:
>> >
>> > Driver: GTiff/GeoTIFF
>> > Files: 459020.tiff
>> > Size is 11653, 9217
>> > Coordinate System is:
>> > PROJCS["Monte Mario / Italy zone 1",
>> >     GEOGCS["Monte Mario",
>> >         DATUM["Monte_Mario",
>> >             SPHEROID["International 1924",6378388,297.000000000005,
>> >                 AUTHORITY["EPSG","7022"]],
>> >             AUTHORITY["EPSG","6265"]],
>> >         PRIMEM["Greenwich",0],
>> >         UNIT["degree",0.0174532925199433],
>> >         AUTHORITY["EPSG","4265"]],
>> >     PROJECTION["Transverse_Mercator"],
>> >     PARAMETER["latitude_of_origin",0],
>> >     PARAMETER["central_meridian",9],
>> >     PARAMETER["scale_factor",0.9996],
>> >     PARAMETER["false_easting",1500000],
>> >     PARAMETER["false_northing",0],
>> >     UNIT["metre",1,
>> >         AUTHORITY["EPSG","9001"]],
>> >     AUTHORITY["EPSG","3003"]]
>> > Origin = (1450696.319000000134110,4516874.898998536169529)
>> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> > Metadata:
>> >   AREA_OR_POINT=Area
>> >   TIFFTAG_XRESOLUTION=15.748
>> >   TIFFTAG_YRESOLUTION=15.748
>> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> > Image Structure Metadata:
>> >   INTERLEAVE=BAND
>> > Corner Coordinates:
>> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E, 40d48'2.48"N)
>> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E, 40d44'52.69"N)
>> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E, 40d48'3.96"N)
>> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E, 40d44'54.16"N)
>> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E, 40d46'28.35"N)
>> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >   NoData Value=255
>> >   Image Structure Metadata:
>> >     NBITS=1
>> >   Color Table (RGB with 2 entries)
>> >     0: 255,255,255,255
>> >     1: 0,0,0,255
>> >
>> > I used the mosaic plugin to load them in geoserver 1.7.2. I can get a
>> > map
>> > with WMS request but there are some white strips at the borders of each
>> > file. Original files have overlapping areas that are white. I would like
>> > to
>> > set the white pixel to transparent and so eliminate the stripes.
>> > I set the OutputTransparentColor field in the config of coverage to
>> > #FFFFFF
>> > but had no result.
>> > I tried to set also the InputTransparentColor filed to #FFFFFF value but
>> > I
>> > got an exception:
>> >
>> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to render
>> > RenderedOp for this operation.
>> > java.lang.RuntimeException: - Unable to render RenderedOp for this
>> > operation.
>> >         at
>> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>> >         at
>> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>> >         at
>> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>> > ...
>> >
>> > Should I use RasterSymbolizer?
>> > Thanks a lot for any hint
>> >
>> > Stefano Iacovella
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Create and Deploy Rich Internet Apps outside the browser with
>> > Adobe(R)AIR(TM)
>> > software. With Adobe AIR, Ajax developers can use existing skills and
>> > code
>> > to
>> > build responsive, highly engaging applications that combine the power of
>> > local
>> > resources and data with the reach of the web. Download the Adobe AIR SDK
>> > and
>> > Ajax docs to start building applications
>> > today-http://p.sf.net/sfu/adobe-com
>> > _______________________________________________
>> > Geoserver-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >
>> >
>
>




------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Fwd: 1bit Raster Transparency

Stefano Iacovella
In reply to this post by Stefano Iacovella


---------- Forwarded message ----------
I tried to set also the InputTransparentColor filed to #FFFFFF value but I got an exception:

2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to render RenderedOp for this operation.
java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
        at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
        at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
        at javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
...

Just an update about logging

I found an other exception in catalina.out:

Error: Could not find mediaLib accelerator wrapper classes. Continuing in pure Java mode.
Occurs in: com.sun.media.jai.mlib.MediaLibAccessor
java.lang.NoClassDefFoundError: com/sun/medialib/mlib/Image
    at com.sun.media.jai.mlib.MediaLibAccessor$1.run(MediaLibAccessor.java:248)
    at java.security.AccessController.doPrivileged(Native Method)


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Stefano Iacovella
uh I realized I had no JAI libraries instaleld in the JDK used to run geoserver.

I downloaded this package

http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib-linux-i586-jdk.bin

run it in the JAVA_HOME

then restarted the Tomcat containing geoserver. Then I tried again a WMS GetMap of the mosaic with InputTransparentColor filed to #FFFFFF

Now I got a different exception

in geoserver.log I found the same error:

2009-02-12 14:51:15,661 ERROR [geotools.rendering] - - Unable to render RenderedOp for this operation.
java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
    at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
    at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)

While in catalina.out now I found

Error: One factory fails for the operation "Mosaic"
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
    at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
    at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
    at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
    at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
    at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
    at javax.media.jai.RenderedOp.getMinX(RenderedOp.java:2161)
    at org.geotools.coverage.grid.GeneralGridEnvelope.<init>(GeneralGridEnvelope.java:199)
    at org.geotools.coverage.grid.GeneralGridRange.<init>(GeneralGridRange.java:156)
    at org.geotools.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:520)
    at org.geotools.coverage.grid.GridCoverageFactory.create(GridCoverageFactory.java:463)
    at org.geotools.gce.imagemosaic.ImageMosaicReader.prepareMosaic(ImageMosaicReader.java:1397)
    at org.geotools.gce.imagemosaic.ImageMosaicReader.loadRequestedTiles(ImageMosaicReader.java:1104)
    at org.geotools.gce.imagemosaic.ImageMosaicReader.loadTiles(ImageMosaicReader.java:686)
    at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:536)
    at org.geotools.renderer.lite.StreamingRenderer.renderRaster(StreamingRenderer.java:1847)
    at org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1721)
    at org.geotools.renderer.lite.StreamingRenderer.process(StreamingRenderer.java:1667)
    at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1609)
    at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:642)
    at org.geotools.renderer.shape.ShapefileRenderer.renderWithStreamingRenderer(ShapefileRenderer.java:1472)
    at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1341)
    at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:265)
    at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:347)
    at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:416)
    at org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
    at org.geoserver.ows.Dispatcher.response(Dispatcher.java:698)
    at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:215)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
    at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
    at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
    at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
    at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
    at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: Alpha images must have the same data type as the sources.
    at com.sun.media.jai.opimage.MosaicOpImage.<init>(MosaicOpImage.java:223)
    at com.sun.media.jai.opimage.MosaicRIF.create(MosaicRIF.java:39)
    ... 79 more

2009/2/12 Stefano Iacovella <[hidden email]>


---------- Forwarded message ----------
I tried to set also the
InputTransparentColor filed to #FFFFFF value but I got an exception:


2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to render RenderedOp for this operation.
java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
        at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
        at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
        at javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
...

Just an update about logging

I found an other exception in catalina.out:

Error: Could not find mediaLib accelerator wrapper classes. Continuing in pure Java mode.
Occurs in: com.sun.media.jai.mlib.MediaLibAccessor
java.lang.NoClassDefFoundError: com/sun/medialib/mlib/Image
    at com.sun.media.jai.mlib.MediaLibAccessor$1.run(MediaLibAccessor.java:248)
    at java.security.AccessController.doPrivileged(Native Method)



------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Simone Giannecchini
In reply to this post by Stefano Iacovella
Ciao Stefano,
I inspected a bit further and the problem is related to how the 1 bit
compression is managed by both imageio and geotools as well.
I will fix them both.

Meanwhile:
1> can you try to envode as plain RGB but using LZW compression to
have smaller files?
2> can I use e of your sample images as sample dataa to open upa jira?


Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Thu, Feb 12, 2009 at 11:25 AM, Stefano Iacovella
<[hidden email]> wrote:

> Ciao Simone
>
> thank you for the kindly support :-)
> It was my fault I replied directly to Simone's mailbox. We come back to the
> list hoping we'll find a solution and it may be useful to someone else.
>
> Coming to the topic I get the original tif+tfw file and transform them to
> the geotiff format. May be I made some errors in the transformation. this is
> the output of gdalinfo on the original file:
>
> Driver: GTiff/GeoTIFF
> Files: CTR_OLD/564090.tif
> Size is 11653, 8994
> Coordinate System is `'
> Origin = (1442261.101999999955297,4328093.219998572021723)
> Pixel Size = (0.634999999841250,-0.634999999841250)
> Metadata:
>   TIFFTAG_XRESOLUTION=15.748
>   TIFFTAG_YRESOLUTION=15.748
>   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
> Image Structure Metadata:
>   COMPRESSION=CCITTFAX4
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( 1442261.102, 4328093.220)
> Lower Left  ( 1442261.102, 4322382.030)
> Upper Right ( 1449660.757, 4328093.220)
> Lower Right ( 1449660.757, 4322382.030)
> Center      ( 1445960.929, 4325237.625)
> Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
>   Overviews: 146x112
>   Image Structure Metadata:
>     NBITS=1
>   Color Table (RGB with 2 entries)
>     0: 255,255,255,255
>     1: 0,0,0,255
>
> I use this parameters to transform them in geotiff:
>
>  gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co "NBITS=1"
> -a_srs "EPSG:3003" $file $newfile
>
> May be of any help change any of this parameters?
>
> The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with GDAL
> plugin.
> Could it be useful if I disable the JAI support?
>
> Thanks again
>
>
> 2009/2/12 Simone Giannecchini <[hidden email]>
>>
>> Ciao Simone,
>> quick progress update (sono parecchio indaffarato sti giorni purtroppo).
>>
>> Allora innanzitutto per tua sfortuna stai usando un tipo di dato che
>> attualmente manda in crash la pipeline di rendering del java2d su 2 delle
>> mie 3 macchine su cui ho testato. Stai usando  tiff black - white che sono
>> trasformate  in una palette a 1 bit e questo crea imbarazzi notevoli alla
>> pipelina, Ho cmq trovato un workaround.
>> Se tu non sei incorso in questo problema ti sarei grato se tu potessi
>> darmi qualche dettaglio sulla piattaforma di test (OS soprattutto) e sulla
>> versione di java. La pipelina di rendering cambia a seconda di OS e versione
>> di java (OGL, Direct3D, etc..).
>>
>> Per il secondo problema ho riprodotto, ma non ancora fixxato. Domani
>> dovrei dare un colpo definitivo.
>>
>>
>> ti tengo aggioranto,
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>> On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella
>> <[hidden email]> wrote:
>>>
>>> Ciao Simone
>>>
>>> ti allego un archivio con i quattro fotogrammi ed i file con i metadati
>>> di costruzione del mosaico.
>>> Per i risultati ed eventuali altre prove ovviamente ci sentiamo sulla ml
>>> pubblica.
>>> Grazie mille per il supporto
>>>
>>>
>>>
>>> 2009/2/8 Simone Giannecchini <[hidden email]>
>>>>
>>>> Ciao Stefano, mettila pure dove ti torna meglio.
>>>> L'importante è continuare la discussione sulla ml pubblica.
>>>>
>>>> Simone.
>>>> -------------------------------------------------------
>>>> Ing. Simone Giannecchini
>>>> GeoSolutions S.A.S.
>>>> Owner - 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://simboss.blogspot.com/
>>>> http://www.linkedin.com/in/simonegiannecchini
>>>>
>>>> -------------------------------------------------------
>>>>
>>>>
>>>>
>>>> On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
>>>> <[hidden email]> wrote:
>>>> > Ciao Simone
>>>> >
>>>> > I can email you a smaple of four files that should be enough for
>>>> > building a
>>>> > mosaic. If you prefer I can manage to make them availabe on a public
>>>> > url
>>>> > avoinding to fill your mailbox.
>>>> > Thanks a lot for the answer
>>>> >
>>>> > Stefano Iacovella
>>>> >
>>>> > 2009/2/8 Simone Giannecchini <[hidden email]>
>>>> >>
>>>> >> Ciao Stefano,
>>>> >> the correct way to obtain what you need would be using the
>>>> >> InputTransparentColor. However, there are various bugs/limitations in
>>>> >> JAI as far as managing transparency with mosaic which I tried to
>>>> >> workaround (apparently with not much success :-) ).
>>>> >> Could you make available some sample data for testing?
>>>> >>
>>>> >> Simone.
>>>> >> -------------------------------------------------------
>>>> >> Ing. Simone Giannecchini
>>>> >> GeoSolutions S.A.S.
>>>> >> Owner - 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://simboss.blogspot.com/
>>>> >> http://www.linkedin.com/in/simonegiannecchini
>>>> >>
>>>> >> -------------------------------------------------------
>>>> >>
>>>> >>
>>>> >>
>>>> >> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>>>> >> <[hidden email]> wrote:
>>>> >> > I've read a few post on the nabble archive about how to handle
>>>> >> > transparency
>>>> >> > with raster and also had a look at
>>>> >> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>>>> >> > Eventually it seems I've not understood how to render raster with
>>>> >> > transparency so I hope you can help me finding a solution.
>>>> >> >
>>>> >> > I prepared a mosaic with 1 bit Raster. I processed the image files
>>>> >> > with
>>>> >> > gdal
>>>> >> > utilities to transform it in geotiff. Here are the output of
>>>> >> > gdalinfo:
>>>> >> >
>>>> >> > Driver: GTiff/GeoTIFF
>>>> >> > Files: 459020.tiff
>>>> >> > Size is 11653, 9217
>>>> >> > Coordinate System is:
>>>> >> > PROJCS["Monte Mario / Italy zone 1",
>>>> >> >     GEOGCS["Monte Mario",
>>>> >> >         DATUM["Monte_Mario",
>>>> >> >             SPHEROID["International 1924",6378388,297.000000000005,
>>>> >> >                 AUTHORITY["EPSG","7022"]],
>>>> >> >             AUTHORITY["EPSG","6265"]],
>>>> >> >         PRIMEM["Greenwich",0],
>>>> >> >         UNIT["degree",0.0174532925199433],
>>>> >> >         AUTHORITY["EPSG","4265"]],
>>>> >> >     PROJECTION["Transverse_Mercator"],
>>>> >> >     PARAMETER["latitude_of_origin",0],
>>>> >> >     PARAMETER["central_meridian",9],
>>>> >> >     PARAMETER["scale_factor",0.9996],
>>>> >> >     PARAMETER["false_easting",1500000],
>>>> >> >     PARAMETER["false_northing",0],
>>>> >> >     UNIT["metre",1,
>>>> >> >         AUTHORITY["EPSG","9001"]],
>>>> >> >     AUTHORITY["EPSG","3003"]]
>>>> >> > Origin = (1450696.319000000134110,4516874.898998536169529)
>>>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>>>> >> > Metadata:
>>>> >> >   AREA_OR_POINT=Area
>>>> >> >   TIFFTAG_XRESOLUTION=15.748
>>>> >> >   TIFFTAG_YRESOLUTION=15.748
>>>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>>>> >> > Image Structure Metadata:
>>>> >> >   INTERLEAVE=BAND
>>>> >> > Corner Coordinates:
>>>> >> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E,
>>>> >> > 40d48'2.48"N)
>>>> >> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E,
>>>> >> > 40d44'52.69"N)
>>>> >> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E,
>>>> >> > 40d48'3.96"N)
>>>> >> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E,
>>>> >> > 40d44'54.16"N)
>>>> >> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E,
>>>> >> > 40d46'28.35"N)
>>>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>>>> >> >   NoData Value=255
>>>> >> >   Image Structure Metadata:
>>>> >> >     NBITS=1
>>>> >> >   Color Table (RGB with 2 entries)
>>>> >> >     0: 255,255,255,255
>>>> >> >     1: 0,0,0,255
>>>> >> >
>>>> >> > I used the mosaic plugin to load them in geoserver 1.7.2. I can get
>>>> >> > a
>>>> >> > map
>>>> >> > with WMS request but there are some white strips at the borders of
>>>> >> > each
>>>> >> > file. Original files have overlapping areas that are white. I would
>>>> >> > like
>>>> >> > to
>>>> >> > set the white pixel to transparent and so eliminate the stripes.
>>>> >> > I set the OutputTransparentColor field in the config of coverage to
>>>> >> > #FFFFFF
>>>> >> > but had no result.
>>>> >> > I tried to set also the InputTransparentColor filed to #FFFFFF
>>>> >> > value but
>>>> >> > I
>>>> >> > got an exception:
>>>> >> >
>>>> >> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to
>>>> >> > render
>>>> >> > RenderedOp for this operation.
>>>> >> > java.lang.RuntimeException: - Unable to render RenderedOp for this
>>>> >> > operation.
>>>> >> >         at
>>>> >> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>>>> >> >         at
>>>> >> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>>>> >> >         at
>>>> >> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>>>> >> > ...
>>>> >> >
>>>> >> > Should I use RasterSymbolizer?
>>>> >> > Thanks a lot for any hint
>>>> >> >
>>>> >> > Stefano Iacovella
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > ------------------------------------------------------------------------------
>>>> >> > Create and Deploy Rich Internet Apps outside the browser with
>>>> >> > Adobe(R)AIR(TM)
>>>> >> > software. With Adobe AIR, Ajax developers can use existing skills
>>>> >> > and
>>>> >> > code
>>>> >> > to
>>>> >> > build responsive, highly engaging applications that combine the
>>>> >> > power of
>>>> >> > local
>>>> >> > resources and data with the reach of the web. Download the Adobe
>>>> >> > AIR SDK
>>>> >> > and
>>>> >> > Ajax docs to start building applications
>>>> >> > today-http://p.sf.net/sfu/adobe-com
>>>> >> > _______________________________________________
>>>> >> > Geoserver-users mailing list
>>>> >> > [hidden email]
>>>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>> >> >
>>>> >> >
>>>> >
>>>> >
>>>
>>
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Stefano Iacovella
Ciao Simone

2) yes you can upload the samples I sent you to jira

1)
Meanwhile I transformed the tiff in RGB or at least I tried to do it :-)

the gdalinfo of the new files is this:

Driver: GTiff/GeoTIFF
Files: 441130.tiff
Size is 11654, 9901
Coordinate System is:
PROJCS["Monte Mario / Italy zone 1",
    GEOGCS["Monte Mario",
        DATUM["Monte_Mario",
            SPHEROID["International 1924",6378388,297.000000000005,
                AUTHORITY["EPSG","7022"]],
            AUTHORITY["EPSG","6265"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4265"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",1500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","3003"]]
Origin = (1443709.606224609538913,4522902.623206349089742)
Pixel Size = (0.634920634920640,-0.634920634920640)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=0.015699999
  TIFFTAG_YRESOLUTION=0.015699999
  TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( 1443709.606, 4522902.623) (  8d19'55.86"E, 40d51'16.33"N)
Lower Left  ( 1443709.606, 4516616.274) (  8d19'57.91"E, 40d47'52.48"N)
Upper Right ( 1451108.971, 4522902.623) (  8d25'11.87"E, 40d51'18.04"N)
Lower Right ( 1451108.971, 4516616.274) (  8d25'13.64"E, 40d47'54.19"N)
Center      ( 1447409.289, 4519759.449) (  8d22'34.82"E, 40d49'35.29"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
  NoData Value=255
  Color Table (RGB with 256 entries)
    0: 255,255,255,255
    1: 0,0,0,255
    2: 0,0,0,255
....
  255: 0,0,0,255

Now I have no more exception with InputTransparentColor set to #FFFFFF but I get a white map
the geoserver.log contains the following lines


2009-02-12 17:57:40,180 DEBUG [wms.responses] - setting up map
2009-02-12 17:57:40,182 DEBUG [gce.imagemosaic] - Connected mosaic reader to its data store file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
2009-02-12 17:57:40,182 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by org.geotools.data.shapefile.shp.ShapefileReader
2009-02-12 17:57:40,182 TRACE [data.shapefile] - Shapefile Reader has been opened. Number open: 1
2009-02-12 17:57:40,183 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader
2009-02-12 17:57:40,183 TRACE [data.shapefile] - Dbase File Reader has been opened. Number open: 1
2009-02-12 17:57:40,184 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by org.geotools.data.shapefile.prj.PrjFileReader
2009-02-12 17:57:40,184 TRACE [data.shapefile] - PRJ reader has been opened. Number open: 1
2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by org.geotools.data.shapefile.prj.PrjFileReader
2009-02-12 17:57:40,189 TRACE [data.shapefile] - PRJ reader has been closed. Number open: 0
2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader
2009-02-12 17:57:40,189 TRACE [data.shapefile] - Dbase File Reader has been closed. Number open: 0
2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by org.geotools.data.shapefile.shp.ShapefileReader
2009-02-12 17:57:40,189 TRACE [data.shapefile] - Shapefile Reader has been closed. Number open: 0
2009-02-12 17:57:40,190 DEBUG [gce.imagemosaic] - About to create index
2009-02-12 17:57:40,190 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by org.geotools.data.shapefile.shp.ShapefileReader
2009-02-12 17:57:40,190 TRACE [data.shapefile] - Shapefile Reader has been opened. Number open: 1
2009-02-12 17:57:40,191 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader
2009-02-12 17:57:40,191 TRACE [data.shapefile] - Dbase File Reader has been opened. Number open: 1
2009-02-12 17:57:40,193 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by org.geotools.data.shapefile.shp.ShapefileReader
2009-02-12 17:57:40,194 TRACE [data.shapefile] - Shapefile Reader has been closed. Number open: 0
2009-02-12 17:57:40,194 DEBUG [data.shapefile] - Read lock: file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by org.geotools.data.shapefile.dbf.DbaseFileReader
2009-02-12 17:57:40,194 TRACE [data.shapefile] - Dbase File Reader has been closed. Number open: 0
2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Created index
2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
2009-02-12 17:57:40,196 DEBUG [wms.map] - setting up 800x616 image
2009-02-12 17:57:40,236 DEBUG [renderer.shape] - Affine Transform is AffineTransform[[0.035378100037628, 0.0, -50836.19000897012], [0.0, -0.035378100037629, 160058.54636575168]]
2009-02-12 17:57:40,237 DEBUG [geotools.styling] - number of fts set 1
2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - processing 1 stylers for http://www.opengis.net/gmlGridCoverage
2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - creating rules for scale denominator - 100,950.265
2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute grid
2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute params
2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - Querying layer GridCoverage with bbox: ReferencedEnvelope[1436939.517806234 : 1459552.377149984, 4506814.842972493 : 4524226.74466718]
2009-02-12 17:57:40,238 DEBUG [geotools.rendering] - rendering Raster for feature org.geotools.feature.simple.SimpleFeatureImpl@5af4bcc4 - org.geotools.gce.imagemosaic.ImageMosaicReader@15960fd
2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Reading mosaic from file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
2009-02-12 17:57:40,240 DEBUG [gce.imagemosaic] - Creating mosaic to comply with envelope GeneralEnvelope[(1436939.517806234, 4506814.842972493), (1459552.377149984, 4524226.74466718)] crs PROJCS["Monte Mario / Italy zone 1",
  GEOGCS["Monte Mario",
    DATUM["Monte_Mario",
      SPHEROID["International 1924", 6378388.0, 297.000000000005, AUTHORITY["EPSG","7022"]],
      AUTHORITY["EPSG","6265"]],
    PRIMEM["Greenwich", 0.0],
    UNIT["degree", 0.017453292519943295],
    AXIS["Longitude", EAST],
    AXIS["Latitude", NORTH],
    AUTHORITY["EPSG","4265"]],
  PROJECTION["Transverse_Mercator"],
  PARAMETER["central_meridian", 9.0],
  PARAMETER["latitude_of_origin", 0.0],
  PARAMETER["scale_factor", 0.9996],
  PARAMETER["false_easting", 1500000.0],
  PARAMETER["false_northing", 0.0],
  UNIT["m", 1.0],
  AXIS["x", EAST],
  AXIS["y", NORTH],
  AUTHORITY["EPSG","3003"]] dim java.awt.Rectangle[x=0,y=0,width=800,height=616]
2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - loading tile for envelope ReferencedEnvelope[1443666.843461 : 1458139.073441, 4511022.104 : 4522902.623206]
2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Trying to  use the index...
2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index does not need to be created...
2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index Loaded
2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - We have 4 tiles to load
2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Loading level 0 with subsampling factors 47 47
2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - About to read image number 0
2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - File found
2009-02-12 17:57:40,242 DEBUG [gce.imagemosaic] - Just read image number 0
2009-02-12 17:57:40,258 DEBUG [gce.imagemosaic] - Adding to mosaic image number 0
2009-02-12 17:57:40,259 DEBUG [gce.imagemosaic] - Support for alpha on input image number 0
2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - About to read image number 1
2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - File found
2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Just read image number 1
2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Adding to mosaic image number 1
2009-02-12 17:57:40,292 DEBUG [gce.imagemosaic] - Support for alpha on input image number 1
2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - About to read image number 2
2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - File found
2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Just read image number 2
2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Adding to mosaic image number 2
2009-02-12 17:57:40,312 DEBUG [gce.imagemosaic] - Support for alpha on input image number 2
2009-02-12 17:57:40,315 DEBUG [gce.imagemosaic] - About to read image number 3
2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - File found
2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - Just read image number 3
2009-02-12 17:57:40,317 DEBUG [gce.imagemosaic] - Adding to mosaic image number 3
2009-02-12 17:57:40,333 DEBUG [gce.imagemosaic] - Support for alpha on input image number 3
2009-02-12 17:57:40,336 DEBUG [gce.imagemosaic] - Loaded bbox Env[1443666.843460616 : 1458139.0734409676, 4511022.103999999 : 4522902.623206349] while requested bbox GeneralEnvelope[(1436939.517806234, 4506814.842972493), (1459552.377149984, 4524226.74466718)]
2009-02-12 17:57:40,337 DEBUG [gce.imagemosaic] - Mosaic created
2009-02-12 17:57:41,035 INFO [coverage.grid] - Creates a photographic view of grid coverage "mos" using operation "Lookup".
2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Drawing coverage GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104), (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario / Italy zone 1"]]
   RenderedSampleDimension("mos":[0.0 ... 255.0])
      Category("mos":[0...255])
 Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED, GEOPHYSICS]

2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Transforming coverage envelope with transform PARAM_MT["Affine",
  PARAMETER["num_row", 3],
  PARAMETER["num_col", 3]]
2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Using interpolation javax.media.jai.InterpolationNearest@19dcf69
2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
2009-02-12 17:57:41,039 DEBUG [geotools.rendering] - clonedFinalWorldToGrid AffineTransform[[1.055670103092791, 0.0, 238.00000000000728], [-0.0, 1.048155104660409, 46.84490151560749]]
2009-02-12 17:57:43,084 DEBUG [geotools.rendering] - Raster rendered
2009-02-12 17:57:43,085 DEBUG [geotools.rendering] - Style cache hit ratio: NaN , hits 0, requests 0
2009-02-12 17:57:43,085 DEBUG [renderer.shape] - Style cache hit ratio: NaN , hits 0, requests 0
2009-02-12 17:57:43,085 DEBUG [wms.responses] - asking delegate for write to org.geoserver.ows.DispatcherOutputStream@8fd95d
2009-02-12 17:57:43,099 DEBUG [geotools.image] - Encoding input image to write out as JPEG.
2009-02-12 17:57:43,099 DEBUG [geotools.image] - Getting a JPEG writer and configuring it.
2009-02-12 17:57:43,100 DEBUG [geotools.image] - Writing out...


I didn't specify LZW compression but I'll give it a try



2009/2/12 Simone Giannecchini <[hidden email]>
Ciao Stefano,
I inspected a bit further and the problem is related to how the 1 bit
compression is managed by both imageio and geotools as well.
I will fix them both.

Meanwhile:
1> can you try to envode as plain RGB but using LZW compression to
have smaller files?
2> can I use e of your sample images as sample dataa to open upa jira?


Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Thu, Feb 12, 2009 at 11:25 AM, Stefano Iacovella
<[hidden email]> wrote:
> Ciao Simone
>
> thank you for the kindly support :-)
> It was my fault I replied directly to Simone's mailbox. We come back to the
> list hoping we'll find a solution and it may be useful to someone else.
>
> Coming to the topic I get the original tif+tfw file and transform them to
> the geotiff format. May be I made some errors in the transformation. this is
> the output of gdalinfo on the original file:
>
> Driver: GTiff/GeoTIFF
> Files: CTR_OLD/564090.tif
> Size is 11653, 8994
> Coordinate System is `'
> Origin = (1442261.101999999955297,4328093.219998572021723)
> Pixel Size = (0.634999999841250,-0.634999999841250)
> Metadata:
>   TIFFTAG_XRESOLUTION=15.748
>   TIFFTAG_YRESOLUTION=15.748
>   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
> Image Structure Metadata:
>   COMPRESSION=CCITTFAX4
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( 1442261.102, 4328093.220)
> Lower Left  ( 1442261.102, 4322382.030)
> Upper Right ( 1449660.757, 4328093.220)
> Lower Right ( 1449660.757, 4322382.030)
> Center      ( 1445960.929, 4325237.625)
> Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
>   Overviews: 146x112
>   Image Structure Metadata:
>     NBITS=1
>   Color Table (RGB with 2 entries)
>     0: 255,255,255,255
>     1: 0,0,0,255
>
> I use this parameters to transform them in geotiff:
>
>  gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co "NBITS=1"
> -a_srs "EPSG:3003" $file $newfile
>
> May be of any help change any of this parameters?
>
> The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with GDAL
> plugin.
> Could it be useful if I disable the JAI support?
>
> Thanks again
>
>
> 2009/2/12 Simone Giannecchini <[hidden email]>
>>
>> Ciao Simone,
>> quick progress update (sono parecchio indaffarato sti giorni purtroppo).
>>
>> Allora innanzitutto per tua sfortuna stai usando un tipo di dato che
>> attualmente manda in crash la pipeline di rendering del java2d su 2 delle
>> mie 3 macchine su cui ho testato. Stai usando  tiff black - white che sono
>> trasformate  in una palette a 1 bit e questo crea imbarazzi notevoli alla
>> pipelina, Ho cmq trovato un workaround.
>> Se tu non sei incorso in questo problema ti sarei grato se tu potessi
>> darmi qualche dettaglio sulla piattaforma di test (OS soprattutto) e sulla
>> versione di java. La pipelina di rendering cambia a seconda di OS e versione
>> di java (OGL, Direct3D, etc..).
>>
>> Per il secondo problema ho riprodotto, ma non ancora fixxato. Domani
>> dovrei dare un colpo definitivo.
>>
>>
>> ti tengo aggioranto,
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>> On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella
>> <[hidden email]> wrote:
>>>
>>> Ciao Simone
>>>
>>> ti allego un archivio con i quattro fotogrammi ed i file con i metadati
>>> di costruzione del mosaico.
>>> Per i risultati ed eventuali altre prove ovviamente ci sentiamo sulla ml
>>> pubblica.
>>> Grazie mille per il supporto
>>>
>>>
>>>
>>> 2009/2/8 Simone Giannecchini <[hidden email]>
>>>>
>>>> Ciao Stefano, mettila pure dove ti torna meglio.
>>>> L'importante è continuare la discussione sulla ml pubblica.
>>>>
>>>> Simone.
>>>> -------------------------------------------------------
>>>> Ing. Simone Giannecchini
>>>> GeoSolutions S.A.S.
>>>> Owner - 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://simboss.blogspot.com/
>>>> http://www.linkedin.com/in/simonegiannecchini
>>>>
>>>> -------------------------------------------------------
>>>>
>>>>
>>>>
>>>> On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
>>>> <[hidden email]> wrote:
>>>> > Ciao Simone
>>>> >
>>>> > I can email you a smaple of four files that should be enough for
>>>> > building a
>>>> > mosaic. If you prefer I can manage to make them availabe on a public
>>>> > url
>>>> > avoinding to fill your mailbox.
>>>> > Thanks a lot for the answer
>>>> >
>>>> > Stefano Iacovella
>>>> >
>>>> > 2009/2/8 Simone Giannecchini <[hidden email]>
>>>> >>
>>>> >> Ciao Stefano,
>>>> >> the correct way to obtain what you need would be using the
>>>> >> InputTransparentColor. However, there are various bugs/limitations in
>>>> >> JAI as far as managing transparency with mosaic which I tried to
>>>> >> workaround (apparently with not much success :-) ).
>>>> >> Could you make available some sample data for testing?
>>>> >>
>>>> >> Simone.
>>>> >> -------------------------------------------------------
>>>> >> Ing. Simone Giannecchini
>>>> >> GeoSolutions S.A.S.
>>>> >> Owner - 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://simboss.blogspot.com/
>>>> >> http://www.linkedin.com/in/simonegiannecchini
>>>> >>
>>>> >> -------------------------------------------------------
>>>> >>
>>>> >>
>>>> >>
>>>> >> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>>>> >> <[hidden email]> wrote:
>>>> >> > I've read a few post on the nabble archive about how to handle
>>>> >> > transparency
>>>> >> > with raster and also had a look at
>>>> >> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>>>> >> > Eventually it seems I've not understood how to render raster with
>>>> >> > transparency so I hope you can help me finding a solution.
>>>> >> >
>>>> >> > I prepared a mosaic with 1 bit Raster. I processed the image files
>>>> >> > with
>>>> >> > gdal
>>>> >> > utilities to transform it in geotiff. Here are the output of
>>>> >> > gdalinfo:
>>>> >> >
>>>> >> > Driver: GTiff/GeoTIFF
>>>> >> > Files: 459020.tiff
>>>> >> > Size is 11653, 9217
>>>> >> > Coordinate System is:
>>>> >> > PROJCS["Monte Mario / Italy zone 1",
>>>> >> >     GEOGCS["Monte Mario",
>>>> >> >         DATUM["Monte_Mario",
>>>> >> >             SPHEROID["International 1924",6378388,297.000000000005,
>>>> >> >                 AUTHORITY["EPSG","7022"]],
>>>> >> >             AUTHORITY["EPSG","6265"]],
>>>> >> >         PRIMEM["Greenwich",0],
>>>> >> >         UNIT["degree",0.0174532925199433],
>>>> >> >         AUTHORITY["EPSG","4265"]],
>>>> >> >     PROJECTION["Transverse_Mercator"],
>>>> >> >     PARAMETER["latitude_of_origin",0],
>>>> >> >     PARAMETER["central_meridian",9],
>>>> >> >     PARAMETER["scale_factor",0.9996],
>>>> >> >     PARAMETER["false_easting",1500000],
>>>> >> >     PARAMETER["false_northing",0],
>>>> >> >     UNIT["metre",1,
>>>> >> >         AUTHORITY["EPSG","9001"]],
>>>> >> >     AUTHORITY["EPSG","3003"]]
>>>> >> > Origin = (1450696.319000000134110,4516874.898998536169529)
>>>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>>>> >> > Metadata:
>>>> >> >   AREA_OR_POINT=Area
>>>> >> >   TIFFTAG_XRESOLUTION=15.748
>>>> >> >   TIFFTAG_YRESOLUTION=15.748
>>>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>>>> >> > Image Structure Metadata:
>>>> >> >   INTERLEAVE=BAND
>>>> >> > Corner Coordinates:
>>>> >> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E,
>>>> >> > 40d48'2.48"N)
>>>> >> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E,
>>>> >> > 40d44'52.69"N)
>>>> >> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E,
>>>> >> > 40d48'3.96"N)
>>>> >> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E,
>>>> >> > 40d44'54.16"N)
>>>> >> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E,
>>>> >> > 40d46'28.35"N)
>>>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>>>> >> >   NoData Value=255
>>>> >> >   Image Structure Metadata:
>>>> >> >     NBITS=1
>>>> >> >   Color Table (RGB with 2 entries)
>>>> >> >     0: 255,255,255,255
>>>> >> >     1: 0,0,0,255
>>>> >> >
>>>> >> > I used the mosaic plugin to load them in geoserver 1.7.2. I can get
>>>> >> > a
>>>> >> > map
>>>> >> > with WMS request but there are some white strips at the borders of
>>>> >> > each
>>>> >> > file. Original files have overlapping areas that are white. I would
>>>> >> > like
>>>> >> > to
>>>> >> > set the white pixel to transparent and so eliminate the stripes.
>>>> >> > I set the OutputTransparentColor field in the config of coverage to
>>>> >> > #FFFFFF
>>>> >> > but had no result.
>>>> >> > I tried to set also the InputTransparentColor filed to #FFFFFF
>>>> >> > value but
>>>> >> > I
>>>> >> > got an exception:
>>>> >> >
>>>> >> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to
>>>> >> > render
>>>> >> > RenderedOp for this operation.
>>>> >> > java.lang.RuntimeException: - Unable to render RenderedOp for this
>>>> >> > operation.
>>>> >> >         at
>>>> >> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>>>> >> >         at
>>>> >> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>>>> >> >         at
>>>> >> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>>>> >> > ...
>>>> >> >
>>>> >> > Should I use RasterSymbolizer?
>>>> >> > Thanks a lot for any hint
>>>> >> >
>>>> >> > Stefano Iacovella
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > ------------------------------------------------------------------------------
>>>> >> > Create and Deploy Rich Internet Apps outside the browser with
>>>> >> > Adobe(R)AIR(TM)
>>>> >> > software. With Adobe AIR, Ajax developers can use existing skills
>>>> >> > and
>>>> >> > code
>>>> >> > to
>>>> >> > build responsive, highly engaging applications that combine the
>>>> >> > power of
>>>> >> > local
>>>> >> > resources and data with the reach of the web. Download the Adobe
>>>> >> > AIR SDK
>>>> >> > and
>>>> >> > Ajax docs to start building applications
>>>> >> > today-http://p.sf.net/sfu/adobe-com
>>>> >> > _______________________________________________
>>>> >> > Geoserver-users mailing list
>>>> >> > [hidden email]
>>>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>> >> >
>>>> >> >
>>>> >
>>>> >
>>>
>>
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>


------------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Simone Giannecchini
Ciao Stefano,
two things:

1> you are requesting a JPEG transparency won't work anyway, try png
2> can you send me this new dataset, just out of curiosity, I'd like
to play with it.

Thanks for letting me use the other data as test case.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Thu, Feb 12, 2009 at 6:01 PM, Stefano Iacovella
<[hidden email]> wrote:

> Ciao Simone
>
> 2) yes you can upload the samples I sent you to jira
>
> 1)
> Meanwhile I transformed the tiff in RGB or at least I tried to do it :-)
>
> the gdalinfo of the new files is this:
>
> Driver: GTiff/GeoTIFF
> Files: 441130.tiff
> Size is 11654, 9901
> Coordinate System is:
> PROJCS["Monte Mario / Italy zone 1",
>     GEOGCS["Monte Mario",
>         DATUM["Monte_Mario",
>             SPHEROID["International 1924",6378388,297.000000000005,
>                 AUTHORITY["EPSG","7022"]],
>             AUTHORITY["EPSG","6265"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4265"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",9],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",1500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","3003"]]
> Origin = (1443709.606224609538913,4522902.623206349089742)
> Pixel Size = (0.634920634920640,-0.634920634920640)
> Metadata:
>   AREA_OR_POINT=Area
>   TIFFTAG_XRESOLUTION=0.015699999
>   TIFFTAG_YRESOLUTION=0.015699999
>   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
> Image Structure Metadata:
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( 1443709.606, 4522902.623) (  8d19'55.86"E, 40d51'16.33"N)
> Lower Left  ( 1443709.606, 4516616.274) (  8d19'57.91"E, 40d47'52.48"N)
> Upper Right ( 1451108.971, 4522902.623) (  8d25'11.87"E, 40d51'18.04"N)
> Lower Right ( 1451108.971, 4516616.274) (  8d25'13.64"E, 40d47'54.19"N)
> Center      ( 1447409.289, 4519759.449) (  8d22'34.82"E, 40d49'35.29"N)
> Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>   NoData Value=255
>   Color Table (RGB with 256 entries)
>     0: 255,255,255,255
>     1: 0,0,0,255
>     2: 0,0,0,255
> ....
>   255: 0,0,0,255
>
> Now I have no more exception with InputTransparentColor set to #FFFFFF but I
> get a white map
> the geoserver.log contains the following lines
>
>
> 2009-02-12 17:57:40,180 DEBUG [wms.responses] - setting up map
> 2009-02-12 17:57:40,182 DEBUG [gce.imagemosaic] - Connected mosaic reader to
> its data store file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
> 2009-02-12 17:57:40,182 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
> org.geotools.data.shapefile.shp.ShapefileReader
> 2009-02-12 17:57:40,182 TRACE [data.shapefile] - Shapefile Reader has been
> opened. Number open: 1
> 2009-02-12 17:57:40,183 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
> org.geotools.data.shapefile.dbf.DbaseFileReader
> 2009-02-12 17:57:40,183 TRACE [data.shapefile] - Dbase File Reader has been
> opened. Number open: 1
> 2009-02-12 17:57:40,184 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
> org.geotools.data.shapefile.prj.PrjFileReader
> 2009-02-12 17:57:40,184 TRACE [data.shapefile] - PRJ reader has been opened.
> Number open: 1
> 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
> org.geotools.data.shapefile.prj.PrjFileReader
> 2009-02-12 17:57:40,189 TRACE [data.shapefile] - PRJ reader has been closed.
> Number open: 0
> 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
> org.geotools.data.shapefile.dbf.DbaseFileReader
> 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Dbase File Reader has been
> closed. Number open: 0
> 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
> org.geotools.data.shapefile.shp.ShapefileReader
> 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Shapefile Reader has been
> closed. Number open: 0
> 2009-02-12 17:57:40,190 DEBUG [gce.imagemosaic] - About to create index
> 2009-02-12 17:57:40,190 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
> org.geotools.data.shapefile.shp.ShapefileReader
> 2009-02-12 17:57:40,190 TRACE [data.shapefile] - Shapefile Reader has been
> opened. Number open: 1
> 2009-02-12 17:57:40,191 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
> org.geotools.data.shapefile.dbf.DbaseFileReader
> 2009-02-12 17:57:40,191 TRACE [data.shapefile] - Dbase File Reader has been
> opened. Number open: 1
> 2009-02-12 17:57:40,193 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
> org.geotools.data.shapefile.shp.ShapefileReader
> 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Shapefile Reader has been
> closed. Number open: 0
> 2009-02-12 17:57:40,194 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
> org.geotools.data.shapefile.dbf.DbaseFileReader
> 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Dbase File Reader has been
> closed. Number open: 0
> 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Created index
> 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
> 2009-02-12 17:57:40,196 DEBUG [wms.map] - setting up 800x616 image
> 2009-02-12 17:57:40,236 DEBUG [renderer.shape] - Affine Transform is
> AffineTransform[[0.035378100037628, 0.0, -50836.19000897012], [0.0,
> -0.035378100037629, 160058.54636575168]]
> 2009-02-12 17:57:40,237 DEBUG [geotools.styling] - number of fts set 1
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - processing 1 stylers
> for http://www.opengis.net/gmlGridCoverage
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - creating rules for
> scale denominator - 100,950.265
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute grid
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute params
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - Querying layer
> GridCoverage with bbox: ReferencedEnvelope[1436939.517806234 :
> 1459552.377149984, 4506814.842972493 : 4524226.74466718]
> 2009-02-12 17:57:40,238 DEBUG [geotools.rendering] - rendering Raster for
> feature org.geotools.feature.simple.SimpleFeatureImpl@5af4bcc4 -
> org.geotools.gce.imagemosaic.ImageMosaicReader@15960fd
> 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Reading mosaic from
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
> 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
> 2009-02-12 17:57:40,240 DEBUG [gce.imagemosaic] - Creating mosaic to comply
> with envelope GeneralEnvelope[(1436939.517806234, 4506814.842972493),
> (1459552.377149984, 4524226.74466718)] crs PROJCS["Monte Mario / Italy zone
> 1",
>   GEOGCS["Monte Mario",
>     DATUM["Monte_Mario",
>       SPHEROID["International 1924", 6378388.0, 297.000000000005,
> AUTHORITY["EPSG","7022"]],
>       AUTHORITY["EPSG","6265"]],
>     PRIMEM["Greenwich", 0.0],
>     UNIT["degree", 0.017453292519943295],
>     AXIS["Longitude", EAST],
>     AXIS["Latitude", NORTH],
>     AUTHORITY["EPSG","4265"]],
>   PROJECTION["Transverse_Mercator"],
>   PARAMETER["central_meridian", 9.0],
>   PARAMETER["latitude_of_origin", 0.0],
>   PARAMETER["scale_factor", 0.9996],
>   PARAMETER["false_easting", 1500000.0],
>   PARAMETER["false_northing", 0.0],
>   UNIT["m", 1.0],
>   AXIS["x", EAST],
>   AXIS["y", NORTH],
>   AUTHORITY["EPSG","3003"]] dim
> java.awt.Rectangle[x=0,y=0,width=800,height=616]
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - loading tile for envelope
> ReferencedEnvelope[1443666.843461 : 1458139.073441, 4511022.104 :
> 4522902.623206]
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Trying to  use the
> index...
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index does not need to be
> created...
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index Loaded
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - We have 4 tiles to load
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Loading level 0 with
> subsampling factors 47 47
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - About to read image number
> 0
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - File found
> 2009-02-12 17:57:40,242 DEBUG [gce.imagemosaic] - Just read image number 0
> 2009-02-12 17:57:40,258 DEBUG [gce.imagemosaic] - Adding to mosaic image
> number 0
> 2009-02-12 17:57:40,259 DEBUG [gce.imagemosaic] - Support for alpha on input
> image number 0
> 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - About to read image number
> 1
> 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - File found
> 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Just read image number 1
> 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Adding to mosaic image
> number 1
> 2009-02-12 17:57:40,292 DEBUG [gce.imagemosaic] - Support for alpha on input
> image number 1
> 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - About to read image number
> 2
> 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - File found
> 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Just read image number 2
> 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Adding to mosaic image
> number 2
> 2009-02-12 17:57:40,312 DEBUG [gce.imagemosaic] - Support for alpha on input
> image number 2
> 2009-02-12 17:57:40,315 DEBUG [gce.imagemosaic] - About to read image number
> 3
> 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - File found
> 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - Just read image number 3
> 2009-02-12 17:57:40,317 DEBUG [gce.imagemosaic] - Adding to mosaic image
> number 3
> 2009-02-12 17:57:40,333 DEBUG [gce.imagemosaic] - Support for alpha on input
> image number 3
> 2009-02-12 17:57:40,336 DEBUG [gce.imagemosaic] - Loaded bbox
> Env[1443666.843460616 : 1458139.0734409676, 4511022.103999999 :
> 4522902.623206349] while requested bbox GeneralEnvelope[(1436939.517806234,
> 4506814.842972493), (1459552.377149984, 4524226.74466718)]
> 2009-02-12 17:57:40,337 DEBUG [gce.imagemosaic] - Mosaic created
> 2009-02-12 17:57:41,035 INFO [coverage.grid] - Creates a photographic view
> of grid coverage "mos" using operation "Lookup".
> 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Drawing coverage
> GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
> (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario / Italy
> zone 1"]]
>    RenderedSampleDimension("mos":[0.0 ... 255.0])
>       Category("mos":[0...255])
>  Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED, GEOPHYSICS]
>
> 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Transforming coverage
> envelope with transform PARAM_MT["Affine",
>   PARAMETER["num_row", 3],
>   PARAMETER["num_col", 3]]
> 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Using interpolation
> javax.media.jai.InterpolationNearest@19dcf69
> 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
> 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
> 2009-02-12 17:57:41,039 DEBUG [geotools.rendering] - clonedFinalWorldToGrid
> AffineTransform[[1.055670103092791, 0.0, 238.00000000000728], [-0.0,
> 1.048155104660409, 46.84490151560749]]
> 2009-02-12 17:57:43,084 DEBUG [geotools.rendering] - Raster rendered
> 2009-02-12 17:57:43,085 DEBUG [geotools.rendering] - Style cache hit ratio:
> NaN , hits 0, requests 0
> 2009-02-12 17:57:43,085 DEBUG [renderer.shape] - Style cache hit ratio: NaN
> , hits 0, requests 0
> 2009-02-12 17:57:43,085 DEBUG [wms.responses] - asking delegate for write to
> org.geoserver.ows.DispatcherOutputStream@8fd95d
> 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Encoding input image to
> write out as JPEG.
> 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Getting a JPEG writer and
> configuring it.
> 2009-02-12 17:57:43,100 DEBUG [geotools.image] - Writing out...
>
>
> I didn't specify LZW compression but I'll give it a try
>
>
>
> 2009/2/12 Simone Giannecchini <[hidden email]>
>>
>> Ciao Stefano,
>> I inspected a bit further and the problem is related to how the 1 bit
>> compression is managed by both imageio and geotools as well.
>> I will fix them both.
>>
>> Meanwhile:
>> 1> can you try to envode as plain RGB but using LZW compression to
>> have smaller files?
>> 2> can I use e of your sample images as sample dataa to open upa jira?
>>
>>
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>>
>> On Thu, Feb 12, 2009 at 11:25 AM, Stefano Iacovella
>> <[hidden email]> wrote:
>> > Ciao Simone
>> >
>> > thank you for the kindly support :-)
>> > It was my fault I replied directly to Simone's mailbox. We come back to
>> > the
>> > list hoping we'll find a solution and it may be useful to someone else.
>> >
>> > Coming to the topic I get the original tif+tfw file and transform them
>> > to
>> > the geotiff format. May be I made some errors in the transformation.
>> > this is
>> > the output of gdalinfo on the original file:
>> >
>> > Driver: GTiff/GeoTIFF
>> > Files: CTR_OLD/564090.tif
>> > Size is 11653, 8994
>> > Coordinate System is `'
>> > Origin = (1442261.101999999955297,4328093.219998572021723)
>> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> > Metadata:
>> >   TIFFTAG_XRESOLUTION=15.748
>> >   TIFFTAG_YRESOLUTION=15.748
>> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> > Image Structure Metadata:
>> >   COMPRESSION=CCITTFAX4
>> >   INTERLEAVE=BAND
>> > Corner Coordinates:
>> > Upper Left  ( 1442261.102, 4328093.220)
>> > Lower Left  ( 1442261.102, 4322382.030)
>> > Upper Right ( 1449660.757, 4328093.220)
>> > Lower Right ( 1449660.757, 4322382.030)
>> > Center      ( 1445960.929, 4325237.625)
>> > Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
>> >   Overviews: 146x112
>> >   Image Structure Metadata:
>> >     NBITS=1
>> >   Color Table (RGB with 2 entries)
>> >     0: 255,255,255,255
>> >     1: 0,0,0,255
>> >
>> > I use this parameters to transform them in geotiff:
>> >
>> >  gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co
>> > "NBITS=1"
>> > -a_srs "EPSG:3003" $file $newfile
>> >
>> > May be of any help change any of this parameters?
>> >
>> > The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with GDAL
>> > plugin.
>> > Could it be useful if I disable the JAI support?
>> >
>> > Thanks again
>> >
>> >
>> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >>
>> >> Ciao Simone,
>> >> quick progress update (sono parecchio indaffarato sti giorni
>> >> purtroppo).
>> >>
>> >> Allora innanzitutto per tua sfortuna stai usando un tipo di dato che
>> >> attualmente manda in crash la pipeline di rendering del java2d su 2
>> >> delle
>> >> mie 3 macchine su cui ho testato. Stai usando  tiff black - white che
>> >> sono
>> >> trasformate  in una palette a 1 bit e questo crea imbarazzi notevoli
>> >> alla
>> >> pipelina, Ho cmq trovato un workaround.
>> >> Se tu non sei incorso in questo problema ti sarei grato se tu potessi
>> >> darmi qualche dettaglio sulla piattaforma di test (OS soprattutto) e
>> >> sulla
>> >> versione di java. La pipelina di rendering cambia a seconda di OS e
>> >> versione
>> >> di java (OGL, Direct3D, etc..).
>> >>
>> >> Per il secondo problema ho riprodotto, ma non ancora fixxato. Domani
>> >> dovrei dare un colpo definitivo.
>> >>
>> >>
>> >> ti tengo aggioranto,
>> >> Simone.
>> >> -------------------------------------------------------
>> >> Ing. Simone Giannecchini
>> >> GeoSolutions S.A.S.
>> >> Owner - 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://simboss.blogspot.com/
>> >> http://www.linkedin.com/in/simonegiannecchini
>> >>
>> >> -------------------------------------------------------
>> >>
>> >>
>> >> On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella
>> >> <[hidden email]> wrote:
>> >>>
>> >>> Ciao Simone
>> >>>
>> >>> ti allego un archivio con i quattro fotogrammi ed i file con i
>> >>> metadati
>> >>> di costruzione del mosaico.
>> >>> Per i risultati ed eventuali altre prove ovviamente ci sentiamo sulla
>> >>> ml
>> >>> pubblica.
>> >>> Grazie mille per il supporto
>> >>>
>> >>>
>> >>>
>> >>> 2009/2/8 Simone Giannecchini <[hidden email]>
>> >>>>
>> >>>> Ciao Stefano, mettila pure dove ti torna meglio.
>> >>>> L'importante è continuare la discussione sulla ml pubblica.
>> >>>>
>> >>>> Simone.
>> >>>> -------------------------------------------------------
>> >>>> Ing. Simone Giannecchini
>> >>>> GeoSolutions S.A.S.
>> >>>> Owner - 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://simboss.blogspot.com/
>> >>>> http://www.linkedin.com/in/simonegiannecchini
>> >>>>
>> >>>> -------------------------------------------------------
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
>> >>>> <[hidden email]> wrote:
>> >>>> > Ciao Simone
>> >>>> >
>> >>>> > I can email you a smaple of four files that should be enough for
>> >>>> > building a
>> >>>> > mosaic. If you prefer I can manage to make them availabe on a
>> >>>> > public
>> >>>> > url
>> >>>> > avoinding to fill your mailbox.
>> >>>> > Thanks a lot for the answer
>> >>>> >
>> >>>> > Stefano Iacovella
>> >>>> >
>> >>>> > 2009/2/8 Simone Giannecchini <[hidden email]>
>> >>>> >>
>> >>>> >> Ciao Stefano,
>> >>>> >> the correct way to obtain what you need would be using the
>> >>>> >> InputTransparentColor. However, there are various bugs/limitations
>> >>>> >> in
>> >>>> >> JAI as far as managing transparency with mosaic which I tried to
>> >>>> >> workaround (apparently with not much success :-) ).
>> >>>> >> Could you make available some sample data for testing?
>> >>>> >>
>> >>>> >> Simone.
>> >>>> >> -------------------------------------------------------
>> >>>> >> Ing. Simone Giannecchini
>> >>>> >> GeoSolutions S.A.S.
>> >>>> >> Owner - 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://simboss.blogspot.com/
>> >>>> >> http://www.linkedin.com/in/simonegiannecchini
>> >>>> >>
>> >>>> >> -------------------------------------------------------
>> >>>> >>
>> >>>> >>
>> >>>> >>
>> >>>> >> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>> >>>> >> <[hidden email]> wrote:
>> >>>> >> > I've read a few post on the nabble archive about how to handle
>> >>>> >> > transparency
>> >>>> >> > with raster and also had a look at
>> >>>> >> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>> >>>> >> > Eventually it seems I've not understood how to render raster
>> >>>> >> > with
>> >>>> >> > transparency so I hope you can help me finding a solution.
>> >>>> >> >
>> >>>> >> > I prepared a mosaic with 1 bit Raster. I processed the image
>> >>>> >> > files
>> >>>> >> > with
>> >>>> >> > gdal
>> >>>> >> > utilities to transform it in geotiff. Here are the output of
>> >>>> >> > gdalinfo:
>> >>>> >> >
>> >>>> >> > Driver: GTiff/GeoTIFF
>> >>>> >> > Files: 459020.tiff
>> >>>> >> > Size is 11653, 9217
>> >>>> >> > Coordinate System is:
>> >>>> >> > PROJCS["Monte Mario / Italy zone 1",
>> >>>> >> >     GEOGCS["Monte Mario",
>> >>>> >> >         DATUM["Monte_Mario",
>> >>>> >> >             SPHEROID["International
>> >>>> >> > 1924",6378388,297.000000000005,
>> >>>> >> >                 AUTHORITY["EPSG","7022"]],
>> >>>> >> >             AUTHORITY["EPSG","6265"]],
>> >>>> >> >         PRIMEM["Greenwich",0],
>> >>>> >> >         UNIT["degree",0.0174532925199433],
>> >>>> >> >         AUTHORITY["EPSG","4265"]],
>> >>>> >> >     PROJECTION["Transverse_Mercator"],
>> >>>> >> >     PARAMETER["latitude_of_origin",0],
>> >>>> >> >     PARAMETER["central_meridian",9],
>> >>>> >> >     PARAMETER["scale_factor",0.9996],
>> >>>> >> >     PARAMETER["false_easting",1500000],
>> >>>> >> >     PARAMETER["false_northing",0],
>> >>>> >> >     UNIT["metre",1,
>> >>>> >> >         AUTHORITY["EPSG","9001"]],
>> >>>> >> >     AUTHORITY["EPSG","3003"]]
>> >>>> >> > Origin = (1450696.319000000134110,4516874.898998536169529)
>> >>>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >>>> >> > Metadata:
>> >>>> >> >   AREA_OR_POINT=Area
>> >>>> >> >   TIFFTAG_XRESOLUTION=15.748
>> >>>> >> >   TIFFTAG_YRESOLUTION=15.748
>> >>>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >>>> >> > Image Structure Metadata:
>> >>>> >> >   INTERLEAVE=BAND
>> >>>> >> > Corner Coordinates:
>> >>>> >> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E,
>> >>>> >> > 40d48'2.48"N)
>> >>>> >> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E,
>> >>>> >> > 40d44'52.69"N)
>> >>>> >> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E,
>> >>>> >> > 40d48'3.96"N)
>> >>>> >> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E,
>> >>>> >> > 40d44'54.16"N)
>> >>>> >> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E,
>> >>>> >> > 40d46'28.35"N)
>> >>>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >>>> >> >   NoData Value=255
>> >>>> >> >   Image Structure Metadata:
>> >>>> >> >     NBITS=1
>> >>>> >> >   Color Table (RGB with 2 entries)
>> >>>> >> >     0: 255,255,255,255
>> >>>> >> >     1: 0,0,0,255
>> >>>> >> >
>> >>>> >> > I used the mosaic plugin to load them in geoserver 1.7.2. I can
>> >>>> >> > get
>> >>>> >> > a
>> >>>> >> > map
>> >>>> >> > with WMS request but there are some white strips at the borders
>> >>>> >> > of
>> >>>> >> > each
>> >>>> >> > file. Original files have overlapping areas that are white. I
>> >>>> >> > would
>> >>>> >> > like
>> >>>> >> > to
>> >>>> >> > set the white pixel to transparent and so eliminate the stripes.
>> >>>> >> > I set the OutputTransparentColor field in the config of coverage
>> >>>> >> > to
>> >>>> >> > #FFFFFF
>> >>>> >> > but had no result.
>> >>>> >> > I tried to set also the InputTransparentColor filed to #FFFFFF
>> >>>> >> > value but
>> >>>> >> > I
>> >>>> >> > got an exception:
>> >>>> >> >
>> >>>> >> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to
>> >>>> >> > render
>> >>>> >> > RenderedOp for this operation.
>> >>>> >> > java.lang.RuntimeException: - Unable to render RenderedOp for
>> >>>> >> > this
>> >>>> >> > operation.
>> >>>> >> >         at
>> >>>> >> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>> >>>> >> >         at
>> >>>> >> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>> >>>> >> >         at
>> >>>> >> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>> >>>> >> > ...
>> >>>> >> >
>> >>>> >> > Should I use RasterSymbolizer?
>> >>>> >> > Thanks a lot for any hint
>> >>>> >> >
>> >>>> >> > Stefano Iacovella
>> >>>> >> >
>> >>>> >> >
>> >>>> >> >
>> >>>> >> >
>> >>>> >> > ------------------------------------------------------------------------------
>> >>>> >> > Create and Deploy Rich Internet Apps outside the browser with
>> >>>> >> > Adobe(R)AIR(TM)
>> >>>> >> > software. With Adobe AIR, Ajax developers can use existing
>> >>>> >> > skills
>> >>>> >> > and
>> >>>> >> > code
>> >>>> >> > to
>> >>>> >> > build responsive, highly engaging applications that combine the
>> >>>> >> > power of
>> >>>> >> > local
>> >>>> >> > resources and data with the reach of the web. Download the Adobe
>> >>>> >> > AIR SDK
>> >>>> >> > and
>> >>>> >> > Ajax docs to start building applications
>> >>>> >> > today-http://p.sf.net/sfu/adobe-com
>> >>>> >> > _______________________________________________
>> >>>> >> > Geoserver-users mailing list
>> >>>> >> > [hidden email]
>> >>>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >>>> >> >
>> >>>> >> >
>> >>>> >
>> >>>> >
>> >>>
>> >>
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Create and Deploy Rich Internet Apps outside the browser with
>> > Adobe(R)AIR(TM)
>> > software. With Adobe AIR, Ajax developers can use existing skills and
>> > code
>> > to
>> > build responsive, highly engaging applications that combine the power of
>> > local
>> > resources and data with the reach of the web. Download the Adobe AIR SDK
>> > and
>> > Ajax docs to start building applications
>> > today-http://p.sf.net/sfu/adobe-com
>> > _______________________________________________
>> > Geoserver-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >
>> >
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Stefano Iacovella
Ciao Simone

1) Oops! I'm usind the Ol preview built in in Geoserver demo and it defaulkt to jpg. I made a png (8 and 24 bit) request on the same mosaic but I always got a white map. The geoserver.log lists:

2009-02-13 10:23:34,787 DEBUG [gce.imagemosaic] - Mosaic created
2009-02-13 10:23:35,191 INFO [coverage.grid] - Creates a photographic view of grid coverage "mos" using operation "Lookup".
2009-02-13 10:23:35,192 DEBUG [geotools.rendering] - Drawing coverage GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104), (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario / Italy zone 1"]]
?   RenderedSampleDimension("mos":[0.0 ... 255.0])
?     ? Category("mos":[0...255])
? Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED, GEOPHYSICS]

2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Transforming coverage envelope with transform PARAM_MT["Affine",
  PARAMETER["num_row", 3],
  PARAMETER["num_col", 3]]
2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Using interpolation javax.media.jai.InterpolationNearest@69ae9f
2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
2009-02-13 10:23:35,195 DEBUG [geotools.rendering] - clonedFinalWorldToGrid AffineTransform[[1.055670103092791, 0.0, 143.99999999999272], [-0.0, 1.048155104660409, 97.84490151557839]]
2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Raster rendered
2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Style cache hit ratio: NaN , hits 0, requests 0
2009-02-13 10:23:36,319 DEBUG [renderer.shape] - Style cache hit ratio: NaN , hits 0, requests 0
2009-02-13 10:23:36,319 DEBUG [wms.responses] - asking delegate for write to org.geoserver.ows.DispatcherOutputStream@2aabf8
2009-02-13 10:23:36,319 DEBUG [map.png] - Writing png image ...
2009-02-13 10:23:36,320 DEBUG [geotools.image] - Encoded input image for png writer
2009-02-13 10:23:36,320 DEBUG [geotools.image] - Getting a writer
2009-02-13 10:23:36,320 DEBUG [geotools.image] - Setting write parameters for this writer
2009-02-13 10:23:36,321 DEBUG [geotools.image] - Writer is NOT native
2009-02-13 10:23:36,321 DEBUG [geotools.image] - About to write png image
2009-02-13 10:23:36,721 DEBUG [map.png] - Writing png image ... done!

2) I'm sending you the files. I made them form the original tif/tfw files with gdal_transfrm using the -co "NBITS=8" parameter while the previous were produced with the "NBITS=1" value



2009/2/12 Simone Giannecchini <[hidden email]>
Ciao Stefano,
two things:

1> you are requesting a JPEG transparency won't work anyway, try png
2> can you send me this new dataset, just out of curiosity, I'd like
to play with it.

Thanks for letting me use the other data as test case.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Thu, Feb 12, 2009 at 6:01 PM, Stefano Iacovella
<[hidden email]> wrote:
> Ciao Simone
>
> 2) yes you can upload the samples I sent you to jira
>
> 1)
> Meanwhile I transformed the tiff in RGB or at least I tried to do it :-)
>
> the gdalinfo of the new files is this:
>
> Driver: GTiff/GeoTIFF
> Files: 441130.tiff
> Size is 11654, 9901
> Coordinate System is:
> PROJCS["Monte Mario / Italy zone 1",
>     GEOGCS["Monte Mario",
>         DATUM["Monte_Mario",
>             SPHEROID["International 1924",6378388,297.000000000005,
>                 AUTHORITY["EPSG","7022"]],
>             AUTHORITY["EPSG","6265"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4265"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",9],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",1500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","3003"]]
> Origin = (1443709.606224609538913,4522902.623206349089742)
> Pixel Size = (0.634920634920640,-0.634920634920640)
> Metadata:
>   AREA_OR_POINT=Area
>   TIFFTAG_XRESOLUTION=0.015699999
>   TIFFTAG_YRESOLUTION=0.015699999
>   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
> Image Structure Metadata:
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( 1443709.606, 4522902.623) (  8d19'55.86"E, 40d51'16.33"N)
> Lower Left  ( 1443709.606, 4516616.274) (  8d19'57.91"E, 40d47'52.48"N)
> Upper Right ( 1451108.971, 4522902.623) (  8d25'11.87"E, 40d51'18.04"N)
> Lower Right ( 1451108.971, 4516616.274) (  8d25'13.64"E, 40d47'54.19"N)
> Center      ( 1447409.289, 4519759.449) (  8d22'34.82"E, 40d49'35.29"N)
> Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>   NoData Value=255
>   Color Table (RGB with 256 entries)
>     0: 255,255,255,255
>     1: 0,0,0,255
>     2: 0,0,0,255
> ....
>   255: 0,0,0,255
>
> Now I have no more exception with InputTransparentColor set to #FFFFFF but I
> get a white map
> the geoserver.log contains the following lines
>
>
> 2009-02-12 17:57:40,180 DEBUG [wms.responses] - setting up map
> 2009-02-12 17:57:40,182 DEBUG [gce.imagemosaic] - Connected mosaic reader to
> its data store file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
> 2009-02-12 17:57:40,182 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
> org.geotools.data.shapefile.shp.ShapefileReader
> 2009-02-12 17:57:40,182 TRACE [data.shapefile] - Shapefile Reader has been
> opened. Number open: 1
> 2009-02-12 17:57:40,183 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
> org.geotools.data.shapefile.dbf.DbaseFileReader
> 2009-02-12 17:57:40,183 TRACE [data.shapefile] - Dbase File Reader has been
> opened. Number open: 1
> 2009-02-12 17:57:40,184 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
> org.geotools.data.shapefile.prj.PrjFileReader
> 2009-02-12 17:57:40,184 TRACE [data.shapefile] - PRJ reader has been opened.
> Number open: 1
> 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
> org.geotools.data.shapefile.prj.PrjFileReader
> 2009-02-12 17:57:40,189 TRACE [data.shapefile] - PRJ reader has been closed.
> Number open: 0
> 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
> org.geotools.data.shapefile.dbf.DbaseFileReader
> 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Dbase File Reader has been
> closed. Number open: 0
> 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
> org.geotools.data.shapefile.shp.ShapefileReader
> 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Shapefile Reader has been
> closed. Number open: 0
> 2009-02-12 17:57:40,190 DEBUG [gce.imagemosaic] - About to create index
> 2009-02-12 17:57:40,190 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
> org.geotools.data.shapefile.shp.ShapefileReader
> 2009-02-12 17:57:40,190 TRACE [data.shapefile] - Shapefile Reader has been
> opened. Number open: 1
> 2009-02-12 17:57:40,191 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
> org.geotools.data.shapefile.dbf.DbaseFileReader
> 2009-02-12 17:57:40,191 TRACE [data.shapefile] - Dbase File Reader has been
> opened. Number open: 1
> 2009-02-12 17:57:40,193 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
> org.geotools.data.shapefile.shp.ShapefileReader
> 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Shapefile Reader has been
> closed. Number open: 0
> 2009-02-12 17:57:40,194 DEBUG [data.shapefile] - Read lock:
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
> org.geotools.data.shapefile.dbf.DbaseFileReader
> 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Dbase File Reader has been
> closed. Number open: 0
> 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Created index
> 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
> 2009-02-12 17:57:40,196 DEBUG [wms.map] - setting up 800x616 image
> 2009-02-12 17:57:40,236 DEBUG [renderer.shape] - Affine Transform is
> AffineTransform[[0.035378100037628, 0.0, -50836.19000897012], [0.0,
> -0.035378100037629, 160058.54636575168]]
> 2009-02-12 17:57:40,237 DEBUG [geotools.styling] - number of fts set 1
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - processing 1 stylers
> for http://www.opengis.net/gmlGridCoverage
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - creating rules for
> scale denominator - 100,950.265
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute grid
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute params
> 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - Querying layer
> GridCoverage with bbox: ReferencedEnvelope[1436939.517806234 :
> 1459552.377149984, 4506814.842972493 : 4524226.74466718]
> 2009-02-12 17:57:40,238 DEBUG [geotools.rendering] - rendering Raster for
> feature org.geotools.feature.simple.SimpleFeatureImpl@5af4bcc4 -
> org.geotools.gce.imagemosaic.ImageMosaicReader@15960fd
> 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Reading mosaic from
> file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
> 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
> 2009-02-12 17:57:40,240 DEBUG [gce.imagemosaic] - Creating mosaic to comply
> with envelope GeneralEnvelope[(1436939.517806234, 4506814.842972493),
> (1459552.377149984, 4524226.74466718)] crs PROJCS["Monte Mario / Italy zone
> 1",
>   GEOGCS["Monte Mario",
>     DATUM["Monte_Mario",
>       SPHEROID["International 1924", 6378388.0, 297.000000000005,
> AUTHORITY["EPSG","7022"]],
>       AUTHORITY["EPSG","6265"]],
>     PRIMEM["Greenwich", 0.0],
>     UNIT["degree", 0.017453292519943295],
>     AXIS["Longitude", EAST],
>     AXIS["Latitude", NORTH],
>     AUTHORITY["EPSG","4265"]],
>   PROJECTION["Transverse_Mercator"],
>   PARAMETER["central_meridian", 9.0],
>   PARAMETER["latitude_of_origin", 0.0],
>   PARAMETER["scale_factor", 0.9996],
>   PARAMETER["false_easting", 1500000.0],
>   PARAMETER["false_northing", 0.0],
>   UNIT["m", 1.0],
>   AXIS["x", EAST],
>   AXIS["y", NORTH],
>   AUTHORITY["EPSG","3003"]] dim
> java.awt.Rectangle[x=0,y=0,width=800,height=616]
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - loading tile for envelope
> ReferencedEnvelope[1443666.843461 : 1458139.073441, 4511022.104 :
> 4522902.623206]
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Trying to  use the
> index...
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index does not need to be
> created...
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index Loaded
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - We have 4 tiles to load
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Loading level 0 with
> subsampling factors 47 47
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - About to read image number
> 0
> 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - File found
> 2009-02-12 17:57:40,242 DEBUG [gce.imagemosaic] - Just read image number 0
> 2009-02-12 17:57:40,258 DEBUG [gce.imagemosaic] - Adding to mosaic image
> number 0
> 2009-02-12 17:57:40,259 DEBUG [gce.imagemosaic] - Support for alpha on input
> image number 0
> 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - About to read image number
> 1
> 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - File found
> 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Just read image number 1
> 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Adding to mosaic image
> number 1
> 2009-02-12 17:57:40,292 DEBUG [gce.imagemosaic] - Support for alpha on input
> image number 1
> 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - About to read image number
> 2
> 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - File found
> 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Just read image number 2
> 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Adding to mosaic image
> number 2
> 2009-02-12 17:57:40,312 DEBUG [gce.imagemosaic] - Support for alpha on input
> image number 2
> 2009-02-12 17:57:40,315 DEBUG [gce.imagemosaic] - About to read image number
> 3
> 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - File found
> 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - Just read image number 3
> 2009-02-12 17:57:40,317 DEBUG [gce.imagemosaic] - Adding to mosaic image
> number 3
> 2009-02-12 17:57:40,333 DEBUG [gce.imagemosaic] - Support for alpha on input
> image number 3
> 2009-02-12 17:57:40,336 DEBUG [gce.imagemosaic] - Loaded bbox
> Env[1443666.843460616 : 1458139.0734409676, 4511022.103999999 :
> 4522902.623206349] while requested bbox GeneralEnvelope[(1436939.517806234,
> 4506814.842972493), (1459552.377149984, 4524226.74466718)]
> 2009-02-12 17:57:40,337 DEBUG [gce.imagemosaic] - Mosaic created
> 2009-02-12 17:57:41,035 INFO [coverage.grid] - Creates a photographic view
> of grid coverage "mos" using operation "Lookup".
> 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Drawing coverage
> GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
> (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario / Italy
> zone 1"]]
>    RenderedSampleDimension("mos":[0.0 ... 255.0])
>       Category("mos":[0...255])
>  Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED, GEOPHYSICS]
>
> 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Transforming coverage
> envelope with transform PARAM_MT["Affine",
>   PARAMETER["num_row", 3],
>   PARAMETER["num_col", 3]]
> 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Using interpolation
> javax.media.jai.InterpolationNearest@19dcf69
> 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
> 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
> 2009-02-12 17:57:41,039 DEBUG [geotools.rendering] - clonedFinalWorldToGrid
> AffineTransform[[1.055670103092791, 0.0, 238.00000000000728], [-0.0,
> 1.048155104660409, 46.84490151560749]]
> 2009-02-12 17:57:43,084 DEBUG [geotools.rendering] - Raster rendered
> 2009-02-12 17:57:43,085 DEBUG [geotools.rendering] - Style cache hit ratio:
> NaN , hits 0, requests 0
> 2009-02-12 17:57:43,085 DEBUG [renderer.shape] - Style cache hit ratio: NaN
> , hits 0, requests 0
> 2009-02-12 17:57:43,085 DEBUG [wms.responses] - asking delegate for write to
> org.geoserver.ows.DispatcherOutputStream@8fd95d
> 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Encoding input image to
> write out as JPEG.
> 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Getting a JPEG writer and
> configuring it.
> 2009-02-12 17:57:43,100 DEBUG [geotools.image] - Writing out...
>
>
> I didn't specify LZW compression but I'll give it a try
>
>
>
> 2009/2/12 Simone Giannecchini <[hidden email]>
>>
>> Ciao Stefano,
>> I inspected a bit further and the problem is related to how the 1 bit
>> compression is managed by both imageio and geotools as well.
>> I will fix them both.
>>
>> Meanwhile:
>> 1> can you try to envode as plain RGB but using LZW compression to
>> have smaller files?
>> 2> can I use e of your sample images as sample dataa to open upa jira?
>>
>>
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>>
>> On Thu, Feb 12, 2009 at 11:25 AM, Stefano Iacovella
>> <[hidden email]> wrote:
>> > Ciao Simone
>> >
>> > thank you for the kindly support :-)
>> > It was my fault I replied directly to Simone's mailbox. We come back to
>> > the
>> > list hoping we'll find a solution and it may be useful to someone else.
>> >
>> > Coming to the topic I get the original tif+tfw file and transform them
>> > to
>> > the geotiff format. May be I made some errors in the transformation.
>> > this is
>> > the output of gdalinfo on the original file:
>> >
>> > Driver: GTiff/GeoTIFF
>> > Files: CTR_OLD/564090.tif
>> > Size is 11653, 8994
>> > Coordinate System is `'
>> > Origin = (1442261.101999999955297,4328093.219998572021723)
>> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> > Metadata:
>> >   TIFFTAG_XRESOLUTION=15.748
>> >   TIFFTAG_YRESOLUTION=15.748
>> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> > Image Structure Metadata:
>> >   COMPRESSION=CCITTFAX4
>> >   INTERLEAVE=BAND
>> > Corner Coordinates:
>> > Upper Left  ( 1442261.102, 4328093.220)
>> > Lower Left  ( 1442261.102, 4322382.030)
>> > Upper Right ( 1449660.757, 4328093.220)
>> > Lower Right ( 1449660.757, 4322382.030)
>> > Center      ( 1445960.929, 4325237.625)
>> > Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
>> >   Overviews: 146x112
>> >   Image Structure Metadata:
>> >     NBITS=1
>> >   Color Table (RGB with 2 entries)
>> >     0: 255,255,255,255
>> >     1: 0,0,0,255
>> >
>> > I use this parameters to transform them in geotiff:
>> >
>> >  gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co
>> > "NBITS=1"
>> > -a_srs "EPSG:3003" $file $newfile
>> >
>> > May be of any help change any of this parameters?
>> >
>> > The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with GDAL
>> > plugin.
>> > Could it be useful if I disable the JAI support?
>> >
>> > Thanks again
>> >
>> >
>> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >>
>> >> Ciao Simone,
>> >> quick progress update (sono parecchio indaffarato sti giorni
>> >> purtroppo).
>> >>
>> >> Allora innanzitutto per tua sfortuna stai usando un tipo di dato che
>> >> attualmente manda in crash la pipeline di rendering del java2d su 2
>> >> delle
>> >> mie 3 macchine su cui ho testato. Stai usando  tiff black - white che
>> >> sono
>> >> trasformate  in una palette a 1 bit e questo crea imbarazzi notevoli
>> >> alla
>> >> pipelina, Ho cmq trovato un workaround.
>> >> Se tu non sei incorso in questo problema ti sarei grato se tu potessi
>> >> darmi qualche dettaglio sulla piattaforma di test (OS soprattutto) e
>> >> sulla
>> >> versione di java. La pipelina di rendering cambia a seconda di OS e
>> >> versione
>> >> di java (OGL, Direct3D, etc..).
>> >>
>> >> Per il secondo problema ho riprodotto, ma non ancora fixxato. Domani
>> >> dovrei dare un colpo definitivo.
>> >>
>> >>
>> >> ti tengo aggioranto,
>> >> Simone.
>> >> -------------------------------------------------------
>> >> Ing. Simone Giannecchini
>> >> GeoSolutions S.A.S.
>> >> Owner - 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://simboss.blogspot.com/
>> >> http://www.linkedin.com/in/simonegiannecchini
>> >>
>> >> -------------------------------------------------------
>> >>
>> >>
>> >> On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella
>> >> <[hidden email]> wrote:
>> >>>
>> >>> Ciao Simone
>> >>>
>> >>> ti allego un archivio con i quattro fotogrammi ed i file con i
>> >>> metadati
>> >>> di costruzione del mosaico.
>> >>> Per i risultati ed eventuali altre prove ovviamente ci sentiamo sulla
>> >>> ml
>> >>> pubblica.
>> >>> Grazie mille per il supporto
>> >>>
>> >>>
>> >>>
>> >>> 2009/2/8 Simone Giannecchini <[hidden email]>
>> >>>>
>> >>>> Ciao Stefano, mettila pure dove ti torna meglio.
>> >>>> L'importante è continuare la discussione sulla ml pubblica.
>> >>>>
>> >>>> Simone.
>> >>>> -------------------------------------------------------
>> >>>> Ing. Simone Giannecchini
>> >>>> GeoSolutions S.A.S.
>> >>>> Owner - 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://simboss.blogspot.com/
>> >>>> http://www.linkedin.com/in/simonegiannecchini
>> >>>>
>> >>>> -------------------------------------------------------
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
>> >>>> <[hidden email]> wrote:
>> >>>> > Ciao Simone
>> >>>> >
>> >>>> > I can email you a smaple of four files that should be enough for
>> >>>> > building a
>> >>>> > mosaic. If you prefer I can manage to make them availabe on a
>> >>>> > public
>> >>>> > url
>> >>>> > avoinding to fill your mailbox.
>> >>>> > Thanks a lot for the answer
>> >>>> >
>> >>>> > Stefano Iacovella
>> >>>> >
>> >>>> > 2009/2/8 Simone Giannecchini <[hidden email]>
>> >>>> >>
>> >>>> >> Ciao Stefano,
>> >>>> >> the correct way to obtain what you need would be using the
>> >>>> >> InputTransparentColor. However, there are various bugs/limitations
>> >>>> >> in
>> >>>> >> JAI as far as managing transparency with mosaic which I tried to
>> >>>> >> workaround (apparently with not much success :-) ).
>> >>>> >> Could you make available some sample data for testing?
>> >>>> >>
>> >>>> >> Simone.
>> >>>> >> -------------------------------------------------------
>> >>>> >> Ing. Simone Giannecchini
>> >>>> >> GeoSolutions S.A.S.
>> >>>> >> Owner - 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://simboss.blogspot.com/
>> >>>> >> http://www.linkedin.com/in/simonegiannecchini
>> >>>> >>
>> >>>> >> -------------------------------------------------------
>> >>>> >>
>> >>>> >>
>> >>>> >>
>> >>>> >> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>> >>>> >> <[hidden email]> wrote:
>> >>>> >> > I've read a few post on the nabble archive about how to handle
>> >>>> >> > transparency
>> >>>> >> > with raster and also had a look at
>> >>>> >> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>> >>>> >> > Eventually it seems I've not understood how to render raster
>> >>>> >> > with
>> >>>> >> > transparency so I hope you can help me finding a solution.
>> >>>> >> >
>> >>>> >> > I prepared a mosaic with 1 bit Raster. I processed the image
>> >>>> >> > files
>> >>>> >> > with
>> >>>> >> > gdal
>> >>>> >> > utilities to transform it in geotiff. Here are the output of
>> >>>> >> > gdalinfo:
>> >>>> >> >
>> >>>> >> > Driver: GTiff/GeoTIFF
>> >>>> >> > Files: 459020.tiff
>> >>>> >> > Size is 11653, 9217
>> >>>> >> > Coordinate System is:
>> >>>> >> > PROJCS["Monte Mario / Italy zone 1",
>> >>>> >> >     GEOGCS["Monte Mario",
>> >>>> >> >         DATUM["Monte_Mario",
>> >>>> >> >             SPHEROID["International
>> >>>> >> > 1924",6378388,297.000000000005,
>> >>>> >> >                 AUTHORITY["EPSG","7022"]],
>> >>>> >> >             AUTHORITY["EPSG","6265"]],
>> >>>> >> >         PRIMEM["Greenwich",0],
>> >>>> >> >         UNIT["degree",0.0174532925199433],
>> >>>> >> >         AUTHORITY["EPSG","4265"]],
>> >>>> >> >     PROJECTION["Transverse_Mercator"],
>> >>>> >> >     PARAMETER["latitude_of_origin",0],
>> >>>> >> >     PARAMETER["central_meridian",9],
>> >>>> >> >     PARAMETER["scale_factor",0.9996],
>> >>>> >> >     PARAMETER["false_easting",1500000],
>> >>>> >> >     PARAMETER["false_northing",0],
>> >>>> >> >     UNIT["metre",1,
>> >>>> >> >         AUTHORITY["EPSG","9001"]],
>> >>>> >> >     AUTHORITY["EPSG","3003"]]
>> >>>> >> > Origin = (1450696.319000000134110,4516874.898998536169529)
>> >>>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >>>> >> > Metadata:
>> >>>> >> >   AREA_OR_POINT=Area
>> >>>> >> >   TIFFTAG_XRESOLUTION=15.748
>> >>>> >> >   TIFFTAG_YRESOLUTION=15.748
>> >>>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >>>> >> > Image Structure Metadata:
>> >>>> >> >   INTERLEAVE=BAND
>> >>>> >> > Corner Coordinates:
>> >>>> >> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E,
>> >>>> >> > 40d48'2.48"N)
>> >>>> >> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E,
>> >>>> >> > 40d44'52.69"N)
>> >>>> >> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E,
>> >>>> >> > 40d48'3.96"N)
>> >>>> >> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E,
>> >>>> >> > 40d44'54.16"N)
>> >>>> >> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E,
>> >>>> >> > 40d46'28.35"N)
>> >>>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >>>> >> >   NoData Value=255
>> >>>> >> >   Image Structure Metadata:
>> >>>> >> >     NBITS=1
>> >>>> >> >   Color Table (RGB with 2 entries)
>> >>>> >> >     0: 255,255,255,255
>> >>>> >> >     1: 0,0,0,255
>> >>>> >> >
>> >>>> >> > I used the mosaic plugin to load them in geoserver 1.7.2. I can
>> >>>> >> > get
>> >>>> >> > a
>> >>>> >> > map
>> >>>> >> > with WMS request but there are some white strips at the borders
>> >>>> >> > of
>> >>>> >> > each
>> >>>> >> > file. Original files have overlapping areas that are white. I
>> >>>> >> > would
>> >>>> >> > like
>> >>>> >> > to
>> >>>> >> > set the white pixel to transparent and so eliminate the stripes.
>> >>>> >> > I set the OutputTransparentColor field in the config of coverage
>> >>>> >> > to
>> >>>> >> > #FFFFFF
>> >>>> >> > but had no result.
>> >>>> >> > I tried to set also the InputTransparentColor filed to #FFFFFF
>> >>>> >> > value but
>> >>>> >> > I
>> >>>> >> > got an exception:
>> >>>> >> >
>> >>>> >> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable to
>> >>>> >> > render
>> >>>> >> > RenderedOp for this operation.
>> >>>> >> > java.lang.RuntimeException: - Unable to render RenderedOp for
>> >>>> >> > this
>> >>>> >> > operation.
>> >>>> >> >         at
>> >>>> >> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>> >>>> >> >         at
>> >>>> >> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>> >>>> >> >         at
>> >>>> >> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>> >>>> >> > ...
>> >>>> >> >
>> >>>> >> > Should I use RasterSymbolizer?
>> >>>> >> > Thanks a lot for any hint
>> >>>> >> >
>> >>>> >> > Stefano Iacovella
>> >>>> >> >
>> >>>> >> >
>> >>>> >> >
>> >>>> >> >
>> >>>> >> > ------------------------------------------------------------------------------
>> >>>> >> > Create and Deploy Rich Internet Apps outside the browser with
>> >>>> >> > Adobe(R)AIR(TM)
>> >>>> >> > software. With Adobe AIR, Ajax developers can use existing
>> >>>> >> > skills
>> >>>> >> > and
>> >>>> >> > code
>> >>>> >> > to
>> >>>> >> > build responsive, highly engaging applications that combine the
>> >>>> >> > power of
>> >>>> >> > local
>> >>>> >> > resources and data with the reach of the web. Download the Adobe
>> >>>> >> > AIR SDK
>> >>>> >> > and
>> >>>> >> > Ajax docs to start building applications
>> >>>> >> > today-http://p.sf.net/sfu/adobe-com
>> >>>> >> > _______________________________________________
>> >>>> >> > Geoserver-users mailing list
>> >>>> >> > [hidden email]
>> >>>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >>>> >> >
>> >>>> >> >
>> >>>> >
>> >>>> >
>> >>>
>> >>
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Create and Deploy Rich Internet Apps outside the browser with
>> > Adobe(R)AIR(TM)
>> > software. With Adobe AIR, Ajax developers can use existing skills and
>> > code
>> > to
>> > build responsive, highly engaging applications that combine the power of
>> > local
>> > resources and data with the reach of the web. Download the Adobe AIR SDK
>> > and
>> > Ajax docs to start building applications
>> > today-http://p.sf.net/sfu/adobe-com
>> > _______________________________________________
>> > Geoserver-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >
>> >
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Simone Giannecchini
Ciao Stefano,
one thing, when you say "but I always got a white map" you are
referring to the OL preview?
Notice that the background color for OL is white therefore if you ask
for PNG and set the transparency color for the mosaic to white nothing
will apparently change, you need to save that file to check if it
really has transparent background.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Fri, Feb 13, 2009 at 10:29 AM, Stefano Iacovella
<[hidden email]> wrote:

> Ciao Simone
>
> 1) Oops! I'm usind the Ol preview built in in Geoserver demo and it defaulkt
> to jpg. I made a png (8 and 24 bit) request on the same mosaic but I always
> got a white map. The geoserver.log lists:
>
> 2009-02-13 10:23:34,787 DEBUG [gce.imagemosaic] - Mosaic created
> 2009-02-13 10:23:35,191 INFO [coverage.grid] - Creates a photographic view
> of grid coverage "mos" using operation "Lookup".
> 2009-02-13 10:23:35,192 DEBUG [geotools.rendering] - Drawing coverage
> GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
> (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario / Italy
> zone 1"]]
> ?   RenderedSampleDimension("mos":[0.0 ... 255.0])
> ?     ? Category("mos":[0...255])
> ? Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED, GEOPHYSICS]
>
> 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Transforming coverage
> envelope with transform PARAM_MT["Affine",
>   PARAMETER["num_row", 3],
>   PARAMETER["num_col", 3]]
> 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Using interpolation
> javax.media.jai.InterpolationNearest@69ae9f
> 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
> 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
> 2009-02-13 10:23:35,195 DEBUG [geotools.rendering] - clonedFinalWorldToGrid
> AffineTransform[[1.055670103092791, 0.0, 143.99999999999272], [-0.0,
> 1.048155104660409, 97.84490151557839]]
> 2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Raster rendered
> 2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Style cache hit ratio:
> NaN , hits 0, requests 0
> 2009-02-13 10:23:36,319 DEBUG [renderer.shape] - Style cache hit ratio: NaN
> , hits 0, requests 0
> 2009-02-13 10:23:36,319 DEBUG [wms.responses] - asking delegate for write to
> org.geoserver.ows.DispatcherOutputStream@2aabf8
> 2009-02-13 10:23:36,319 DEBUG [map.png] - Writing png image ...
> 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Encoded input image for png
> writer
> 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Getting a writer
> 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Setting write parameters
> for this writer
> 2009-02-13 10:23:36,321 DEBUG [geotools.image] - Writer is NOT native
> 2009-02-13 10:23:36,321 DEBUG [geotools.image] - About to write png image
> 2009-02-13 10:23:36,721 DEBUG [map.png] - Writing png image ... done!
>
> 2) I'm sending you the files. I made them form the original tif/tfw files
> with gdal_transfrm using the -co "NBITS=8" parameter while the previous were
> produced with the "NBITS=1" value
>
>
>
> 2009/2/12 Simone Giannecchini <[hidden email]>
>>
>> Ciao Stefano,
>> two things:
>>
>> 1> you are requesting a JPEG transparency won't work anyway, try png
>> 2> can you send me this new dataset, just out of curiosity, I'd like
>> to play with it.
>>
>> Thanks for letting me use the other data as test case.
>>
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>>
>> On Thu, Feb 12, 2009 at 6:01 PM, Stefano Iacovella
>> <[hidden email]> wrote:
>> > Ciao Simone
>> >
>> > 2) yes you can upload the samples I sent you to jira
>> >
>> > 1)
>> > Meanwhile I transformed the tiff in RGB or at least I tried to do it :-)
>> >
>> > the gdalinfo of the new files is this:
>> >
>> > Driver: GTiff/GeoTIFF
>> > Files: 441130.tiff
>> > Size is 11654, 9901
>> > Coordinate System is:
>> > PROJCS["Monte Mario / Italy zone 1",
>> >     GEOGCS["Monte Mario",
>> >         DATUM["Monte_Mario",
>> >             SPHEROID["International 1924",6378388,297.000000000005,
>> >                 AUTHORITY["EPSG","7022"]],
>> >             AUTHORITY["EPSG","6265"]],
>> >         PRIMEM["Greenwich",0],
>> >         UNIT["degree",0.0174532925199433],
>> >         AUTHORITY["EPSG","4265"]],
>> >     PROJECTION["Transverse_Mercator"],
>> >     PARAMETER["latitude_of_origin",0],
>> >     PARAMETER["central_meridian",9],
>> >     PARAMETER["scale_factor",0.9996],
>> >     PARAMETER["false_easting",1500000],
>> >     PARAMETER["false_northing",0],
>> >     UNIT["metre",1,
>> >         AUTHORITY["EPSG","9001"]],
>> >     AUTHORITY["EPSG","3003"]]
>> > Origin = (1443709.606224609538913,4522902.623206349089742)
>> > Pixel Size = (0.634920634920640,-0.634920634920640)
>> > Metadata:
>> >   AREA_OR_POINT=Area
>> >   TIFFTAG_XRESOLUTION=0.015699999
>> >   TIFFTAG_YRESOLUTION=0.015699999
>> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> > Image Structure Metadata:
>> >   INTERLEAVE=BAND
>> > Corner Coordinates:
>> > Upper Left  ( 1443709.606, 4522902.623) (  8d19'55.86"E, 40d51'16.33"N)
>> > Lower Left  ( 1443709.606, 4516616.274) (  8d19'57.91"E, 40d47'52.48"N)
>> > Upper Right ( 1451108.971, 4522902.623) (  8d25'11.87"E, 40d51'18.04"N)
>> > Lower Right ( 1451108.971, 4516616.274) (  8d25'13.64"E, 40d47'54.19"N)
>> > Center      ( 1447409.289, 4519759.449) (  8d22'34.82"E, 40d49'35.29"N)
>> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >   NoData Value=255
>> >   Color Table (RGB with 256 entries)
>> >     0: 255,255,255,255
>> >     1: 0,0,0,255
>> >     2: 0,0,0,255
>> > ....
>> >   255: 0,0,0,255
>> >
>> > Now I have no more exception with InputTransparentColor set to #FFFFFF
>> > but I
>> > get a white map
>> > the geoserver.log contains the following lines
>> >
>> >
>> > 2009-02-12 17:57:40,180 DEBUG [wms.responses] - setting up map
>> > 2009-02-12 17:57:40,182 DEBUG [gce.imagemosaic] - Connected mosaic
>> > reader to
>> > its data store file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
>> > 2009-02-12 17:57:40,182 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> > org.geotools.data.shapefile.shp.ShapefileReader
>> > 2009-02-12 17:57:40,182 TRACE [data.shapefile] - Shapefile Reader has
>> > been
>> > opened. Number open: 1
>> > 2009-02-12 17:57:40,183 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> > 2009-02-12 17:57:40,183 TRACE [data.shapefile] - Dbase File Reader has
>> > been
>> > opened. Number open: 1
>> > 2009-02-12 17:57:40,184 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
>> > org.geotools.data.shapefile.prj.PrjFileReader
>> > 2009-02-12 17:57:40,184 TRACE [data.shapefile] - PRJ reader has been
>> > opened.
>> > Number open: 1
>> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
>> > org.geotools.data.shapefile.prj.PrjFileReader
>> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - PRJ reader has been
>> > closed.
>> > Number open: 0
>> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Dbase File Reader has
>> > been
>> > closed. Number open: 0
>> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> > org.geotools.data.shapefile.shp.ShapefileReader
>> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Shapefile Reader has
>> > been
>> > closed. Number open: 0
>> > 2009-02-12 17:57:40,190 DEBUG [gce.imagemosaic] - About to create index
>> > 2009-02-12 17:57:40,190 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> > org.geotools.data.shapefile.shp.ShapefileReader
>> > 2009-02-12 17:57:40,190 TRACE [data.shapefile] - Shapefile Reader has
>> > been
>> > opened. Number open: 1
>> > 2009-02-12 17:57:40,191 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> > 2009-02-12 17:57:40,191 TRACE [data.shapefile] - Dbase File Reader has
>> > been
>> > opened. Number open: 1
>> > 2009-02-12 17:57:40,193 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> > org.geotools.data.shapefile.shp.ShapefileReader
>> > 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Shapefile Reader has
>> > been
>> > closed. Number open: 0
>> > 2009-02-12 17:57:40,194 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> > 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Dbase File Reader has
>> > been
>> > closed. Number open: 0
>> > 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Created index
>> > 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
>> > 2009-02-12 17:57:40,196 DEBUG [wms.map] - setting up 800x616 image
>> > 2009-02-12 17:57:40,236 DEBUG [renderer.shape] - Affine Transform is
>> > AffineTransform[[0.035378100037628, 0.0, -50836.19000897012], [0.0,
>> > -0.035378100037629, 160058.54636575168]]
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.styling] - number of fts set 1
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - processing 1
>> > stylers
>> > for http://www.opengis.net/gmlGridCoverage
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - creating rules for
>> > scale denominator - 100,950.265
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute
>> > grid
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute
>> > params
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - Querying layer
>> > GridCoverage with bbox: ReferencedEnvelope[1436939.517806234 :
>> > 1459552.377149984, 4506814.842972493 : 4524226.74466718]
>> > 2009-02-12 17:57:40,238 DEBUG [geotools.rendering] - rendering Raster
>> > for
>> > feature org.geotools.feature.simple.SimpleFeatureImpl@5af4bcc4 -
>> > org.geotools.gce.imagemosaic.ImageMosaicReader@15960fd
>> > 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Reading mosaic from
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
>> > 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
>> > 2009-02-12 17:57:40,240 DEBUG [gce.imagemosaic] - Creating mosaic to
>> > comply
>> > with envelope GeneralEnvelope[(1436939.517806234, 4506814.842972493),
>> > (1459552.377149984, 4524226.74466718)] crs PROJCS["Monte Mario / Italy
>> > zone
>> > 1",
>> >   GEOGCS["Monte Mario",
>> >     DATUM["Monte_Mario",
>> >       SPHEROID["International 1924", 6378388.0, 297.000000000005,
>> > AUTHORITY["EPSG","7022"]],
>> >       AUTHORITY["EPSG","6265"]],
>> >     PRIMEM["Greenwich", 0.0],
>> >     UNIT["degree", 0.017453292519943295],
>> >     AXIS["Longitude", EAST],
>> >     AXIS["Latitude", NORTH],
>> >     AUTHORITY["EPSG","4265"]],
>> >   PROJECTION["Transverse_Mercator"],
>> >   PARAMETER["central_meridian", 9.0],
>> >   PARAMETER["latitude_of_origin", 0.0],
>> >   PARAMETER["scale_factor", 0.9996],
>> >   PARAMETER["false_easting", 1500000.0],
>> >   PARAMETER["false_northing", 0.0],
>> >   UNIT["m", 1.0],
>> >   AXIS["x", EAST],
>> >   AXIS["y", NORTH],
>> >   AUTHORITY["EPSG","3003"]] dim
>> > java.awt.Rectangle[x=0,y=0,width=800,height=616]
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - loading tile for
>> > envelope
>> > ReferencedEnvelope[1443666.843461 : 1458139.073441, 4511022.104 :
>> > 4522902.623206]
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Trying to  use the
>> > index...
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index does not need to
>> > be
>> > created...
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index Loaded
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - We have 4 tiles to
>> > load
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Loading level 0 with
>> > subsampling factors 47 47
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - About to read image
>> > number
>> > 0
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - File found
>> > 2009-02-12 17:57:40,242 DEBUG [gce.imagemosaic] - Just read image number
>> > 0
>> > 2009-02-12 17:57:40,258 DEBUG [gce.imagemosaic] - Adding to mosaic image
>> > number 0
>> > 2009-02-12 17:57:40,259 DEBUG [gce.imagemosaic] - Support for alpha on
>> > input
>> > image number 0
>> > 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - About to read image
>> > number
>> > 1
>> > 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - File found
>> > 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Just read image number
>> > 1
>> > 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Adding to mosaic image
>> > number 1
>> > 2009-02-12 17:57:40,292 DEBUG [gce.imagemosaic] - Support for alpha on
>> > input
>> > image number 1
>> > 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - About to read image
>> > number
>> > 2
>> > 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - File found
>> > 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Just read image number
>> > 2
>> > 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Adding to mosaic image
>> > number 2
>> > 2009-02-12 17:57:40,312 DEBUG [gce.imagemosaic] - Support for alpha on
>> > input
>> > image number 2
>> > 2009-02-12 17:57:40,315 DEBUG [gce.imagemosaic] - About to read image
>> > number
>> > 3
>> > 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - File found
>> > 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - Just read image number
>> > 3
>> > 2009-02-12 17:57:40,317 DEBUG [gce.imagemosaic] - Adding to mosaic image
>> > number 3
>> > 2009-02-12 17:57:40,333 DEBUG [gce.imagemosaic] - Support for alpha on
>> > input
>> > image number 3
>> > 2009-02-12 17:57:40,336 DEBUG [gce.imagemosaic] - Loaded bbox
>> > Env[1443666.843460616 : 1458139.0734409676, 4511022.103999999 :
>> > 4522902.623206349] while requested bbox
>> > GeneralEnvelope[(1436939.517806234,
>> > 4506814.842972493), (1459552.377149984, 4524226.74466718)]
>> > 2009-02-12 17:57:40,337 DEBUG [gce.imagemosaic] - Mosaic created
>> > 2009-02-12 17:57:41,035 INFO [coverage.grid] - Creates a photographic
>> > view
>> > of grid coverage "mos" using operation "Lookup".
>> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Drawing coverage
>> > GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
>> > (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario /
>> > Italy
>> > zone 1"]]
>> >    RenderedSampleDimension("mos":[0.0 ... 255.0])
>> >       Category("mos":[0...255])
>> >  Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED,
>> > GEOPHYSICS]
>> >
>> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Transforming
>> > coverage
>> > envelope with transform PARAM_MT["Affine",
>> >   PARAMETER["num_row", 3],
>> >   PARAMETER["num_col", 3]]
>> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Using interpolation
>> > javax.media.jai.InterpolationNearest@19dcf69
>> > 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
>> > 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
>> > 2009-02-12 17:57:41,039 DEBUG [geotools.rendering] -
>> > clonedFinalWorldToGrid
>> > AffineTransform[[1.055670103092791, 0.0, 238.00000000000728], [-0.0,
>> > 1.048155104660409, 46.84490151560749]]
>> > 2009-02-12 17:57:43,084 DEBUG [geotools.rendering] - Raster rendered
>> > 2009-02-12 17:57:43,085 DEBUG [geotools.rendering] - Style cache hit
>> > ratio:
>> > NaN , hits 0, requests 0
>> > 2009-02-12 17:57:43,085 DEBUG [renderer.shape] - Style cache hit ratio:
>> > NaN
>> > , hits 0, requests 0
>> > 2009-02-12 17:57:43,085 DEBUG [wms.responses] - asking delegate for
>> > write to
>> > org.geoserver.ows.DispatcherOutputStream@8fd95d
>> > 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Encoding input image to
>> > write out as JPEG.
>> > 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Getting a JPEG writer
>> > and
>> > configuring it.
>> > 2009-02-12 17:57:43,100 DEBUG [geotools.image] - Writing out...
>> >
>> >
>> > I didn't specify LZW compression but I'll give it a try
>> >
>> >
>> >
>> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >>
>> >> Ciao Stefano,
>> >> I inspected a bit further and the problem is related to how the 1 bit
>> >> compression is managed by both imageio and geotools as well.
>> >> I will fix them both.
>> >>
>> >> Meanwhile:
>> >> 1> can you try to envode as plain RGB but using LZW compression to
>> >> have smaller files?
>> >> 2> can I use e of your sample images as sample dataa to open upa jira?
>> >>
>> >>
>> >> Simone.
>> >> -------------------------------------------------------
>> >> Ing. Simone Giannecchini
>> >> GeoSolutions S.A.S.
>> >> Owner - 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://simboss.blogspot.com/
>> >> http://www.linkedin.com/in/simonegiannecchini
>> >>
>> >> -------------------------------------------------------
>> >>
>> >>
>> >>
>> >> On Thu, Feb 12, 2009 at 11:25 AM, Stefano Iacovella
>> >> <[hidden email]> wrote:
>> >> > Ciao Simone
>> >> >
>> >> > thank you for the kindly support :-)
>> >> > It was my fault I replied directly to Simone's mailbox. We come back
>> >> > to
>> >> > the
>> >> > list hoping we'll find a solution and it may be useful to someone
>> >> > else.
>> >> >
>> >> > Coming to the topic I get the original tif+tfw file and transform
>> >> > them
>> >> > to
>> >> > the geotiff format. May be I made some errors in the transformation.
>> >> > this is
>> >> > the output of gdalinfo on the original file:
>> >> >
>> >> > Driver: GTiff/GeoTIFF
>> >> > Files: CTR_OLD/564090.tif
>> >> > Size is 11653, 8994
>> >> > Coordinate System is `'
>> >> > Origin = (1442261.101999999955297,4328093.219998572021723)
>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >> > Metadata:
>> >> >   TIFFTAG_XRESOLUTION=15.748
>> >> >   TIFFTAG_YRESOLUTION=15.748
>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> > Image Structure Metadata:
>> >> >   COMPRESSION=CCITTFAX4
>> >> >   INTERLEAVE=BAND
>> >> > Corner Coordinates:
>> >> > Upper Left  ( 1442261.102, 4328093.220)
>> >> > Lower Left  ( 1442261.102, 4322382.030)
>> >> > Upper Right ( 1449660.757, 4328093.220)
>> >> > Lower Right ( 1449660.757, 4322382.030)
>> >> > Center      ( 1445960.929, 4325237.625)
>> >> > Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
>> >> >   Overviews: 146x112
>> >> >   Image Structure Metadata:
>> >> >     NBITS=1
>> >> >   Color Table (RGB with 2 entries)
>> >> >     0: 255,255,255,255
>> >> >     1: 0,0,0,255
>> >> >
>> >> > I use this parameters to transform them in geotiff:
>> >> >
>> >> >  gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co
>> >> > "NBITS=1"
>> >> > -a_srs "EPSG:3003" $file $newfile
>> >> >
>> >> > May be of any help change any of this parameters?
>> >> >
>> >> > The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with
>> >> > GDAL
>> >> > plugin.
>> >> > Could it be useful if I disable the JAI support?
>> >> >
>> >> > Thanks again
>> >> >
>> >> >
>> >> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >> >>
>> >> >> Ciao Simone,
>> >> >> quick progress update (sono parecchio indaffarato sti giorni
>> >> >> purtroppo).
>> >> >>
>> >> >> Allora innanzitutto per tua sfortuna stai usando un tipo di dato che
>> >> >> attualmente manda in crash la pipeline di rendering del java2d su 2
>> >> >> delle
>> >> >> mie 3 macchine su cui ho testato. Stai usando  tiff black - white
>> >> >> che
>> >> >> sono
>> >> >> trasformate  in una palette a 1 bit e questo crea imbarazzi notevoli
>> >> >> alla
>> >> >> pipelina, Ho cmq trovato un workaround.
>> >> >> Se tu non sei incorso in questo problema ti sarei grato se tu
>> >> >> potessi
>> >> >> darmi qualche dettaglio sulla piattaforma di test (OS soprattutto) e
>> >> >> sulla
>> >> >> versione di java. La pipelina di rendering cambia a seconda di OS e
>> >> >> versione
>> >> >> di java (OGL, Direct3D, etc..).
>> >> >>
>> >> >> Per il secondo problema ho riprodotto, ma non ancora fixxato. Domani
>> >> >> dovrei dare un colpo definitivo.
>> >> >>
>> >> >>
>> >> >> ti tengo aggioranto,
>> >> >> Simone.
>> >> >> -------------------------------------------------------
>> >> >> Ing. Simone Giannecchini
>> >> >> GeoSolutions S.A.S.
>> >> >> Owner - 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://simboss.blogspot.com/
>> >> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >>
>> >> >> -------------------------------------------------------
>> >> >>
>> >> >>
>> >> >> On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella
>> >> >> <[hidden email]> wrote:
>> >> >>>
>> >> >>> Ciao Simone
>> >> >>>
>> >> >>> ti allego un archivio con i quattro fotogrammi ed i file con i
>> >> >>> metadati
>> >> >>> di costruzione del mosaico.
>> >> >>> Per i risultati ed eventuali altre prove ovviamente ci sentiamo
>> >> >>> sulla
>> >> >>> ml
>> >> >>> pubblica.
>> >> >>> Grazie mille per il supporto
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> 2009/2/8 Simone Giannecchini <[hidden email]>
>> >> >>>>
>> >> >>>> Ciao Stefano, mettila pure dove ti torna meglio.
>> >> >>>> L'importante è continuare la discussione sulla ml pubblica.
>> >> >>>>
>> >> >>>> Simone.
>> >> >>>> -------------------------------------------------------
>> >> >>>> Ing. Simone Giannecchini
>> >> >>>> GeoSolutions S.A.S.
>> >> >>>> Owner - 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://simboss.blogspot.com/
>> >> >>>> http://www.linkedin.com/in/simonegiannecchini
>> >> >>>>
>> >> >>>> -------------------------------------------------------
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>> On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
>> >> >>>> <[hidden email]> wrote:
>> >> >>>> > Ciao Simone
>> >> >>>> >
>> >> >>>> > I can email you a smaple of four files that should be enough for
>> >> >>>> > building a
>> >> >>>> > mosaic. If you prefer I can manage to make them availabe on a
>> >> >>>> > public
>> >> >>>> > url
>> >> >>>> > avoinding to fill your mailbox.
>> >> >>>> > Thanks a lot for the answer
>> >> >>>> >
>> >> >>>> > Stefano Iacovella
>> >> >>>> >
>> >> >>>> > 2009/2/8 Simone Giannecchini
>> >> >>>> > <[hidden email]>
>> >> >>>> >>
>> >> >>>> >> Ciao Stefano,
>> >> >>>> >> the correct way to obtain what you need would be using the
>> >> >>>> >> InputTransparentColor. However, there are various
>> >> >>>> >> bugs/limitations
>> >> >>>> >> in
>> >> >>>> >> JAI as far as managing transparency with mosaic which I tried
>> >> >>>> >> to
>> >> >>>> >> workaround (apparently with not much success :-) ).
>> >> >>>> >> Could you make available some sample data for testing?
>> >> >>>> >>
>> >> >>>> >> Simone.
>> >> >>>> >> -------------------------------------------------------
>> >> >>>> >> Ing. Simone Giannecchini
>> >> >>>> >> GeoSolutions S.A.S.
>> >> >>>> >> Owner - 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://simboss.blogspot.com/
>> >> >>>> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >>>> >>
>> >> >>>> >> -------------------------------------------------------
>> >> >>>> >>
>> >> >>>> >>
>> >> >>>> >>
>> >> >>>> >> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>> >> >>>> >> <[hidden email]> wrote:
>> >> >>>> >> > I've read a few post on the nabble archive about how to
>> >> >>>> >> > handle
>> >> >>>> >> > transparency
>> >> >>>> >> > with raster and also had a look at
>> >> >>>> >> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>> >> >>>> >> > Eventually it seems I've not understood how to render raster
>> >> >>>> >> > with
>> >> >>>> >> > transparency so I hope you can help me finding a solution.
>> >> >>>> >> >
>> >> >>>> >> > I prepared a mosaic with 1 bit Raster. I processed the image
>> >> >>>> >> > files
>> >> >>>> >> > with
>> >> >>>> >> > gdal
>> >> >>>> >> > utilities to transform it in geotiff. Here are the output of
>> >> >>>> >> > gdalinfo:
>> >> >>>> >> >
>> >> >>>> >> > Driver: GTiff/GeoTIFF
>> >> >>>> >> > Files: 459020.tiff
>> >> >>>> >> > Size is 11653, 9217
>> >> >>>> >> > Coordinate System is:
>> >> >>>> >> > PROJCS["Monte Mario / Italy zone 1",
>> >> >>>> >> >     GEOGCS["Monte Mario",
>> >> >>>> >> >         DATUM["Monte_Mario",
>> >> >>>> >> >             SPHEROID["International
>> >> >>>> >> > 1924",6378388,297.000000000005,
>> >> >>>> >> >                 AUTHORITY["EPSG","7022"]],
>> >> >>>> >> >             AUTHORITY["EPSG","6265"]],
>> >> >>>> >> >         PRIMEM["Greenwich",0],
>> >> >>>> >> >         UNIT["degree",0.0174532925199433],
>> >> >>>> >> >         AUTHORITY["EPSG","4265"]],
>> >> >>>> >> >     PROJECTION["Transverse_Mercator"],
>> >> >>>> >> >     PARAMETER["latitude_of_origin",0],
>> >> >>>> >> >     PARAMETER["central_meridian",9],
>> >> >>>> >> >     PARAMETER["scale_factor",0.9996],
>> >> >>>> >> >     PARAMETER["false_easting",1500000],
>> >> >>>> >> >     PARAMETER["false_northing",0],
>> >> >>>> >> >     UNIT["metre",1,
>> >> >>>> >> >         AUTHORITY["EPSG","9001"]],
>> >> >>>> >> >     AUTHORITY["EPSG","3003"]]
>> >> >>>> >> > Origin = (1450696.319000000134110,4516874.898998536169529)
>> >> >>>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >> >>>> >> > Metadata:
>> >> >>>> >> >   AREA_OR_POINT=Area
>> >> >>>> >> >   TIFFTAG_XRESOLUTION=15.748
>> >> >>>> >> >   TIFFTAG_YRESOLUTION=15.748
>> >> >>>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> >>>> >> > Image Structure Metadata:
>> >> >>>> >> >   INTERLEAVE=BAND
>> >> >>>> >> > Corner Coordinates:
>> >> >>>> >> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E,
>> >> >>>> >> > 40d48'2.48"N)
>> >> >>>> >> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E,
>> >> >>>> >> > 40d44'52.69"N)
>> >> >>>> >> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E,
>> >> >>>> >> > 40d48'3.96"N)
>> >> >>>> >> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E,
>> >> >>>> >> > 40d44'54.16"N)
>> >> >>>> >> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E,
>> >> >>>> >> > 40d46'28.35"N)
>> >> >>>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >> >>>> >> >   NoData Value=255
>> >> >>>> >> >   Image Structure Metadata:
>> >> >>>> >> >     NBITS=1
>> >> >>>> >> >   Color Table (RGB with 2 entries)
>> >> >>>> >> >     0: 255,255,255,255
>> >> >>>> >> >     1: 0,0,0,255
>> >> >>>> >> >
>> >> >>>> >> > I used the mosaic plugin to load them in geoserver 1.7.2. I
>> >> >>>> >> > can
>> >> >>>> >> > get
>> >> >>>> >> > a
>> >> >>>> >> > map
>> >> >>>> >> > with WMS request but there are some white strips at the
>> >> >>>> >> > borders
>> >> >>>> >> > of
>> >> >>>> >> > each
>> >> >>>> >> > file. Original files have overlapping areas that are white. I
>> >> >>>> >> > would
>> >> >>>> >> > like
>> >> >>>> >> > to
>> >> >>>> >> > set the white pixel to transparent and so eliminate the
>> >> >>>> >> > stripes.
>> >> >>>> >> > I set the OutputTransparentColor field in the config of
>> >> >>>> >> > coverage
>> >> >>>> >> > to
>> >> >>>> >> > #FFFFFF
>> >> >>>> >> > but had no result.
>> >> >>>> >> > I tried to set also the InputTransparentColor filed to
>> >> >>>> >> > #FFFFFF
>> >> >>>> >> > value but
>> >> >>>> >> > I
>> >> >>>> >> > got an exception:
>> >> >>>> >> >
>> >> >>>> >> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable
>> >> >>>> >> > to
>> >> >>>> >> > render
>> >> >>>> >> > RenderedOp for this operation.
>> >> >>>> >> > java.lang.RuntimeException: - Unable to render RenderedOp for
>> >> >>>> >> > this
>> >> >>>> >> > operation.
>> >> >>>> >> >         at
>> >> >>>> >> >
>> >> >>>> >> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>> >> >>>> >> >         at
>> >> >>>> >> >
>> >> >>>> >> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>> >> >>>> >> >         at
>> >> >>>> >> >
>> >> >>>> >> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>> >> >>>> >> > ...
>> >> >>>> >> >
>> >> >>>> >> > Should I use RasterSymbolizer?
>> >> >>>> >> > Thanks a lot for any hint
>> >> >>>> >> >
>> >> >>>> >> > Stefano Iacovella
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >> > ------------------------------------------------------------------------------
>> >> >>>> >> > Create and Deploy Rich Internet Apps outside the browser with
>> >> >>>> >> > Adobe(R)AIR(TM)
>> >> >>>> >> > software. With Adobe AIR, Ajax developers can use existing
>> >> >>>> >> > skills
>> >> >>>> >> > and
>> >> >>>> >> > code
>> >> >>>> >> > to
>> >> >>>> >> > build responsive, highly engaging applications that combine
>> >> >>>> >> > the
>> >> >>>> >> > power of
>> >> >>>> >> > local
>> >> >>>> >> > resources and data with the reach of the web. Download the
>> >> >>>> >> > Adobe
>> >> >>>> >> > AIR SDK
>> >> >>>> >> > and
>> >> >>>> >> > Ajax docs to start building applications
>> >> >>>> >> > today-http://p.sf.net/sfu/adobe-com
>> >> >>>> >> > _______________________________________________
>> >> >>>> >> > Geoserver-users mailing list
>> >> >>>> >> > [hidden email]
>> >> >>>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >
>> >> >>>> >
>> >> >>>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > Create and Deploy Rich Internet Apps outside the browser with
>> >> > Adobe(R)AIR(TM)
>> >> > software. With Adobe AIR, Ajax developers can use existing skills and
>> >> > code
>> >> > to
>> >> > build responsive, highly engaging applications that combine the power
>> >> > of
>> >> > local
>> >> > resources and data with the reach of the web. Download the Adobe AIR
>> >> > SDK
>> >> > and
>> >> > Ajax docs to start building applications
>> >> > today-http://p.sf.net/sfu/adobe-com
>> >> > _______________________________________________
>> >> > Geoserver-users mailing list
>> >> > [hidden email]
>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >
>> >> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > Geoserver-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >
>> >
>
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Stefano Iacovella
Ciao Simone

I made a few screen shots that should be more explicative, I hope :-)

The first one is at this url

http://s5.tinypic.com/jpbukn.jpg

You can see what was the white strips I was writing about. The raster file displayed on the left side of the map has a overlapping area with the raster file displayed at the right side of the map. This area as no data and is rendered as white pixel. This map is what geoserver rendere the mosaic when in the coverage config section I don't insert a transparent color

The second screen shot is here and shows the same map but with #FFFFFF setted as the InputTransparentColor

http://i41.tinypic.com/4p7ib.png

this is what I described as white map. I saved it as a png file on my client but it shows the same. All pixel white :-(

Last I put a map obatined loading the two raster file on ArcGIS Desktop and that should be what I would like to rendere in geoserver

http://i40.tinypic.com/t01et4.png

Thanks

2009/2/13 Simone Giannecchini <[hidden email]>
Ciao Stefano,
one thing, when you say "but I always got a white map" you are
referring to the OL preview?
Notice that the background color for OL is white therefore if you ask
for PNG and set the transparency color for the mosaic to white nothing
will apparently change, you need to save that file to check if it
really has transparent background.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Fri, Feb 13, 2009 at 10:29 AM, Stefano Iacovella
<[hidden email]> wrote:
> Ciao Simone
>
> 1) Oops! I'm usind the Ol preview built in in Geoserver demo and it defaulkt
> to jpg. I made a png (8 and 24 bit) request on the same mosaic but I always
> got a white map. The geoserver.log lists:
>
> 2009-02-13 10:23:34,787 DEBUG [gce.imagemosaic] - Mosaic created
> 2009-02-13 10:23:35,191 INFO [coverage.grid] - Creates a photographic view
> of grid coverage "mos" using operation "Lookup".
> 2009-02-13 10:23:35,192 DEBUG [geotools.rendering] - Drawing coverage
> GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
> (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario / Italy
> zone 1"]]
> ?   RenderedSampleDimension("mos":[0.0 ... 255.0])
> ?     ? Category("mos":[0...255])
> ? Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED, GEOPHYSICS]
>
> 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Transforming coverage
> envelope with transform PARAM_MT["Affine",
>   PARAMETER["num_row", 3],
>   PARAMETER["num_col", 3]]
> 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Using interpolation
> javax.media.jai.InterpolationNearest@69ae9f
> 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
> 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
> 2009-02-13 10:23:35,195 DEBUG [geotools.rendering] - clonedFinalWorldToGrid
> AffineTransform[[1.055670103092791, 0.0, 143.99999999999272], [-0.0,
> 1.048155104660409, 97.84490151557839]]
> 2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Raster rendered
> 2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Style cache hit ratio:
> NaN , hits 0, requests 0
> 2009-02-13 10:23:36,319 DEBUG [renderer.shape] - Style cache hit ratio: NaN
> , hits 0, requests 0
> 2009-02-13 10:23:36,319 DEBUG [wms.responses] - asking delegate for write to
> org.geoserver.ows.DispatcherOutputStream@2aabf8
> 2009-02-13 10:23:36,319 DEBUG [map.png] - Writing png image ...
> 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Encoded input image for png
> writer
> 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Getting a writer
> 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Setting write parameters
> for this writer
> 2009-02-13 10:23:36,321 DEBUG [geotools.image] - Writer is NOT native
> 2009-02-13 10:23:36,321 DEBUG [geotools.image] - About to write png image
> 2009-02-13 10:23:36,721 DEBUG [map.png] - Writing png image ... done!
>
> 2) I'm sending you the files. I made them form the original tif/tfw files
> with gdal_transfrm using the -co "NBITS=8" parameter while the previous were
> produced with the "NBITS=1" value
>
>
>
> 2009/2/12 Simone Giannecchini <[hidden email]>
>>
>> Ciao Stefano,
>> two things:
>>
>> 1> you are requesting a JPEG transparency won't work anyway, try png
>> 2> can you send me this new dataset, just out of curiosity, I'd like
>> to play with it.
>>
>> Thanks for letting me use the other data as test case.
>>
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>>
>> On Thu, Feb 12, 2009 at 6:01 PM, Stefano Iacovella
>> <[hidden email]> wrote:
>> > Ciao Simone
>> >
>> > 2) yes you can upload the samples I sent you to jira
>> >
>> > 1)
>> > Meanwhile I transformed the tiff in RGB or at least I tried to do it :-)
>> >
>> > the gdalinfo of the new files is this:
>> >
>> > Driver: GTiff/GeoTIFF
>> > Files: 441130.tiff
>> > Size is 11654, 9901
>> > Coordinate System is:
>> > PROJCS["Monte Mario / Italy zone 1",
>> >     GEOGCS["Monte Mario",
>> >         DATUM["Monte_Mario",
>> >             SPHEROID["International 1924",6378388,297.000000000005,
>> >                 AUTHORITY["EPSG","7022"]],
>> >             AUTHORITY["EPSG","6265"]],
>> >         PRIMEM["Greenwich",0],
>> >         UNIT["degree",0.0174532925199433],
>> >         AUTHORITY["EPSG","4265"]],
>> >     PROJECTION["Transverse_Mercator"],
>> >     PARAMETER["latitude_of_origin",0],
>> >     PARAMETER["central_meridian",9],
>> >     PARAMETER["scale_factor",0.9996],
>> >     PARAMETER["false_easting",1500000],
>> >     PARAMETER["false_northing",0],
>> >     UNIT["metre",1,
>> >         AUTHORITY["EPSG","9001"]],
>> >     AUTHORITY["EPSG","3003"]]
>> > Origin = (1443709.606224609538913,4522902.623206349089742)
>> > Pixel Size = (0.634920634920640,-0.634920634920640)
>> > Metadata:
>> >   AREA_OR_POINT=Area
>> >   TIFFTAG_XRESOLUTION=0.015699999
>> >   TIFFTAG_YRESOLUTION=0.015699999
>> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> > Image Structure Metadata:
>> >   INTERLEAVE=BAND
>> > Corner Coordinates:
>> > Upper Left  ( 1443709.606, 4522902.623) (  8d19'55.86"E, 40d51'16.33"N)
>> > Lower Left  ( 1443709.606, 4516616.274) (  8d19'57.91"E, 40d47'52.48"N)
>> > Upper Right ( 1451108.971, 4522902.623) (  8d25'11.87"E, 40d51'18.04"N)
>> > Lower Right ( 1451108.971, 4516616.274) (  8d25'13.64"E, 40d47'54.19"N)
>> > Center      ( 1447409.289, 4519759.449) (  8d22'34.82"E, 40d49'35.29"N)
>> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >   NoData Value=255
>> >   Color Table (RGB with 256 entries)
>> >     0: 255,255,255,255
>> >     1: 0,0,0,255
>> >     2: 0,0,0,255
>> > ....
>> >   255: 0,0,0,255
>> >
>> > Now I have no more exception with InputTransparentColor set to #FFFFFF
>> > but I
>> > get a white map
>> > the geoserver.log contains the following lines
>> >
>> >
>> > 2009-02-12 17:57:40,180 DEBUG [wms.responses] - setting up map
>> > 2009-02-12 17:57:40,182 DEBUG [gce.imagemosaic] - Connected mosaic
>> > reader to
>> > its data store file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
>> > 2009-02-12 17:57:40,182 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> > org.geotools.data.shapefile.shp.ShapefileReader
>> > 2009-02-12 17:57:40,182 TRACE [data.shapefile] - Shapefile Reader has
>> > been
>> > opened. Number open: 1
>> > 2009-02-12 17:57:40,183 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> > 2009-02-12 17:57:40,183 TRACE [data.shapefile] - Dbase File Reader has
>> > been
>> > opened. Number open: 1
>> > 2009-02-12 17:57:40,184 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
>> > org.geotools.data.shapefile.prj.PrjFileReader
>> > 2009-02-12 17:57:40,184 TRACE [data.shapefile] - PRJ reader has been
>> > opened.
>> > Number open: 1
>> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
>> > org.geotools.data.shapefile.prj.PrjFileReader
>> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - PRJ reader has been
>> > closed.
>> > Number open: 0
>> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Dbase File Reader has
>> > been
>> > closed. Number open: 0
>> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> > org.geotools.data.shapefile.shp.ShapefileReader
>> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Shapefile Reader has
>> > been
>> > closed. Number open: 0
>> > 2009-02-12 17:57:40,190 DEBUG [gce.imagemosaic] - About to create index
>> > 2009-02-12 17:57:40,190 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> > org.geotools.data.shapefile.shp.ShapefileReader
>> > 2009-02-12 17:57:40,190 TRACE [data.shapefile] - Shapefile Reader has
>> > been
>> > opened. Number open: 1
>> > 2009-02-12 17:57:40,191 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> > 2009-02-12 17:57:40,191 TRACE [data.shapefile] - Dbase File Reader has
>> > been
>> > opened. Number open: 1
>> > 2009-02-12 17:57:40,193 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> > org.geotools.data.shapefile.shp.ShapefileReader
>> > 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Shapefile Reader has
>> > been
>> > closed. Number open: 0
>> > 2009-02-12 17:57:40,194 DEBUG [data.shapefile] - Read lock:
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> > 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Dbase File Reader has
>> > been
>> > closed. Number open: 0
>> > 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Created index
>> > 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
>> > 2009-02-12 17:57:40,196 DEBUG [wms.map] - setting up 800x616 image
>> > 2009-02-12 17:57:40,236 DEBUG [renderer.shape] - Affine Transform is
>> > AffineTransform[[0.035378100037628, 0.0, -50836.19000897012], [0.0,
>> > -0.035378100037629, 160058.54636575168]]
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.styling] - number of fts set 1
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - processing 1
>> > stylers
>> > for http://www.opengis.net/gmlGridCoverage
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - creating rules for
>> > scale denominator - 100,950.265
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute
>> > grid
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute
>> > params
>> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - Querying layer
>> > GridCoverage with bbox: ReferencedEnvelope[1436939.517806234 :
>> > 1459552.377149984, 4506814.842972493 : 4524226.74466718]
>> > 2009-02-12 17:57:40,238 DEBUG [geotools.rendering] - rendering Raster
>> > for
>> > feature org.geotools.feature.simple.SimpleFeatureImpl@5af4bcc4 -
>> > org.geotools.gce.imagemosaic.ImageMosaicReader@15960fd
>> > 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Reading mosaic from
>> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
>> > 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
>> > 2009-02-12 17:57:40,240 DEBUG [gce.imagemosaic] - Creating mosaic to
>> > comply
>> > with envelope GeneralEnvelope[(1436939.517806234, 4506814.842972493),
>> > (1459552.377149984, 4524226.74466718)] crs PROJCS["Monte Mario / Italy
>> > zone
>> > 1",
>> >   GEOGCS["Monte Mario",
>> >     DATUM["Monte_Mario",
>> >       SPHEROID["International 1924", 6378388.0, 297.000000000005,
>> > AUTHORITY["EPSG","7022"]],
>> >       AUTHORITY["EPSG","6265"]],
>> >     PRIMEM["Greenwich", 0.0],
>> >     UNIT["degree", 0.017453292519943295],
>> >     AXIS["Longitude", EAST],
>> >     AXIS["Latitude", NORTH],
>> >     AUTHORITY["EPSG","4265"]],
>> >   PROJECTION["Transverse_Mercator"],
>> >   PARAMETER["central_meridian", 9.0],
>> >   PARAMETER["latitude_of_origin", 0.0],
>> >   PARAMETER["scale_factor", 0.9996],
>> >   PARAMETER["false_easting", 1500000.0],
>> >   PARAMETER["false_northing", 0.0],
>> >   UNIT["m", 1.0],
>> >   AXIS["x", EAST],
>> >   AXIS["y", NORTH],
>> >   AUTHORITY["EPSG","3003"]] dim
>> > java.awt.Rectangle[x=0,y=0,width=800,height=616]
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - loading tile for
>> > envelope
>> > ReferencedEnvelope[1443666.843461 : 1458139.073441, 4511022.104 :
>> > 4522902.623206]
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Trying to  use the
>> > index...
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index does not need to
>> > be
>> > created...
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index Loaded
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - We have 4 tiles to
>> > load
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Loading level 0 with
>> > subsampling factors 47 47
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - About to read image
>> > number
>> > 0
>> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - File found
>> > 2009-02-12 17:57:40,242 DEBUG [gce.imagemosaic] - Just read image number
>> > 0
>> > 2009-02-12 17:57:40,258 DEBUG [gce.imagemosaic] - Adding to mosaic image
>> > number 0
>> > 2009-02-12 17:57:40,259 DEBUG [gce.imagemosaic] - Support for alpha on
>> > input
>> > image number 0
>> > 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - About to read image
>> > number
>> > 1
>> > 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - File found
>> > 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Just read image number
>> > 1
>> > 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Adding to mosaic image
>> > number 1
>> > 2009-02-12 17:57:40,292 DEBUG [gce.imagemosaic] - Support for alpha on
>> > input
>> > image number 1
>> > 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - About to read image
>> > number
>> > 2
>> > 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - File found
>> > 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Just read image number
>> > 2
>> > 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Adding to mosaic image
>> > number 2
>> > 2009-02-12 17:57:40,312 DEBUG [gce.imagemosaic] - Support for alpha on
>> > input
>> > image number 2
>> > 2009-02-12 17:57:40,315 DEBUG [gce.imagemosaic] - About to read image
>> > number
>> > 3
>> > 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - File found
>> > 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - Just read image number
>> > 3
>> > 2009-02-12 17:57:40,317 DEBUG [gce.imagemosaic] - Adding to mosaic image
>> > number 3
>> > 2009-02-12 17:57:40,333 DEBUG [gce.imagemosaic] - Support for alpha on
>> > input
>> > image number 3
>> > 2009-02-12 17:57:40,336 DEBUG [gce.imagemosaic] - Loaded bbox
>> > Env[1443666.843460616 : 1458139.0734409676, 4511022.103999999 :
>> > 4522902.623206349] while requested bbox
>> > GeneralEnvelope[(1436939.517806234,
>> > 4506814.842972493), (1459552.377149984, 4524226.74466718)]
>> > 2009-02-12 17:57:40,337 DEBUG [gce.imagemosaic] - Mosaic created
>> > 2009-02-12 17:57:41,035 INFO [coverage.grid] - Creates a photographic
>> > view
>> > of grid coverage "mos" using operation "Lookup".
>> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Drawing coverage
>> > GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
>> > (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario /
>> > Italy
>> > zone 1"]]
>> >    RenderedSampleDimension("mos":[0.0 ... 255.0])
>> >       Category("mos":[0...255])
>> >  Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED,
>> > GEOPHYSICS]
>> >
>> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Transforming
>> > coverage
>> > envelope with transform PARAM_MT["Affine",
>> >   PARAMETER["num_row", 3],
>> >   PARAMETER["num_col", 3]]
>> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Using interpolation
>> > javax.media.jai.InterpolationNearest@19dcf69
>> > 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
>> > 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster Symbolizer
>> > 2009-02-12 17:57:41,039 DEBUG [geotools.rendering] -
>> > clonedFinalWorldToGrid
>> > AffineTransform[[1.055670103092791, 0.0, 238.00000000000728], [-0.0,
>> > 1.048155104660409, 46.84490151560749]]
>> > 2009-02-12 17:57:43,084 DEBUG [geotools.rendering] - Raster rendered
>> > 2009-02-12 17:57:43,085 DEBUG [geotools.rendering] - Style cache hit
>> > ratio:
>> > NaN , hits 0, requests 0
>> > 2009-02-12 17:57:43,085 DEBUG [renderer.shape] - Style cache hit ratio:
>> > NaN
>> > , hits 0, requests 0
>> > 2009-02-12 17:57:43,085 DEBUG [wms.responses] - asking delegate for
>> > write to
>> > org.geoserver.ows.DispatcherOutputStream@8fd95d
>> > 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Encoding input image to
>> > write out as JPEG.
>> > 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Getting a JPEG writer
>> > and
>> > configuring it.
>> > 2009-02-12 17:57:43,100 DEBUG [geotools.image] - Writing out...
>> >
>> >
>> > I didn't specify LZW compression but I'll give it a try
>> >
>> >
>> >
>> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >>
>> >> Ciao Stefano,
>> >> I inspected a bit further and the problem is related to how the 1 bit
>> >> compression is managed by both imageio and geotools as well.
>> >> I will fix them both.
>> >>
>> >> Meanwhile:
>> >> 1> can you try to envode as plain RGB but using LZW compression to
>> >> have smaller files?
>> >> 2> can I use e of your sample images as sample dataa to open upa jira?
>> >>
>> >>
>> >> Simone.
>> >> -------------------------------------------------------
>> >> Ing. Simone Giannecchini
>> >> GeoSolutions S.A.S.
>> >> Owner - 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://simboss.blogspot.com/
>> >> http://www.linkedin.com/in/simonegiannecchini
>> >>
>> >> -------------------------------------------------------
>> >>
>> >>
>> >>
>> >> On Thu, Feb 12, 2009 at 11:25 AM, Stefano Iacovella
>> >> <[hidden email]> wrote:
>> >> > Ciao Simone
>> >> >
>> >> > thank you for the kindly support :-)
>> >> > It was my fault I replied directly to Simone's mailbox. We come back
>> >> > to
>> >> > the
>> >> > list hoping we'll find a solution and it may be useful to someone
>> >> > else.
>> >> >
>> >> > Coming to the topic I get the original tif+tfw file and transform
>> >> > them
>> >> > to
>> >> > the geotiff format. May be I made some errors in the transformation.
>> >> > this is
>> >> > the output of gdalinfo on the original file:
>> >> >
>> >> > Driver: GTiff/GeoTIFF
>> >> > Files: CTR_OLD/564090.tif
>> >> > Size is 11653, 8994
>> >> > Coordinate System is `'
>> >> > Origin = (1442261.101999999955297,4328093.219998572021723)
>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >> > Metadata:
>> >> >   TIFFTAG_XRESOLUTION=15.748
>> >> >   TIFFTAG_YRESOLUTION=15.748
>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> > Image Structure Metadata:
>> >> >   COMPRESSION=CCITTFAX4
>> >> >   INTERLEAVE=BAND
>> >> > Corner Coordinates:
>> >> > Upper Left  ( 1442261.102, 4328093.220)
>> >> > Lower Left  ( 1442261.102, 4322382.030)
>> >> > Upper Right ( 1449660.757, 4328093.220)
>> >> > Lower Right ( 1449660.757, 4322382.030)
>> >> > Center      ( 1445960.929, 4325237.625)
>> >> > Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
>> >> >   Overviews: 146x112
>> >> >   Image Structure Metadata:
>> >> >     NBITS=1
>> >> >   Color Table (RGB with 2 entries)
>> >> >     0: 255,255,255,255
>> >> >     1: 0,0,0,255
>> >> >
>> >> > I use this parameters to transform them in geotiff:
>> >> >
>> >> >  gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co
>> >> > "NBITS=1"
>> >> > -a_srs "EPSG:3003" $file $newfile
>> >> >
>> >> > May be of any help change any of this parameters?
>> >> >
>> >> > The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with
>> >> > GDAL
>> >> > plugin.
>> >> > Could it be useful if I disable the JAI support?
>> >> >
>> >> > Thanks again
>> >> >
>> >> >
>> >> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >> >>
>> >> >> Ciao Simone,
>> >> >> quick progress update (sono parecchio indaffarato sti giorni
>> >> >> purtroppo).
>> >> >>
>> >> >> Allora innanzitutto per tua sfortuna stai usando un tipo di dato che
>> >> >> attualmente manda in crash la pipeline di rendering del java2d su 2
>> >> >> delle
>> >> >> mie 3 macchine su cui ho testato. Stai usando  tiff black - white
>> >> >> che
>> >> >> sono
>> >> >> trasformate  in una palette a 1 bit e questo crea imbarazzi notevoli
>> >> >> alla
>> >> >> pipelina, Ho cmq trovato un workaround.
>> >> >> Se tu non sei incorso in questo problema ti sarei grato se tu
>> >> >> potessi
>> >> >> darmi qualche dettaglio sulla piattaforma di test (OS soprattutto) e
>> >> >> sulla
>> >> >> versione di java. La pipelina di rendering cambia a seconda di OS e
>> >> >> versione
>> >> >> di java (OGL, Direct3D, etc..).
>> >> >>
>> >> >> Per il secondo problema ho riprodotto, ma non ancora fixxato. Domani
>> >> >> dovrei dare un colpo definitivo.
>> >> >>
>> >> >>
>> >> >> ti tengo aggioranto,
>> >> >> Simone.
>> >> >> -------------------------------------------------------
>> >> >> Ing. Simone Giannecchini
>> >> >> GeoSolutions S.A.S.
>> >> >> Owner - 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://simboss.blogspot.com/
>> >> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >>
>> >> >> -------------------------------------------------------
>> >> >>
>> >> >>
>> >> >> On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella
>> >> >> <[hidden email]> wrote:
>> >> >>>
>> >> >>> Ciao Simone
>> >> >>>
>> >> >>> ti allego un archivio con i quattro fotogrammi ed i file con i
>> >> >>> metadati
>> >> >>> di costruzione del mosaico.
>> >> >>> Per i risultati ed eventuali altre prove ovviamente ci sentiamo
>> >> >>> sulla
>> >> >>> ml
>> >> >>> pubblica.
>> >> >>> Grazie mille per il supporto
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> 2009/2/8 Simone Giannecchini <[hidden email]>
>> >> >>>>
>> >> >>>> Ciao Stefano, mettila pure dove ti torna meglio.
>> >> >>>> L'importante è continuare la discussione sulla ml pubblica.
>> >> >>>>
>> >> >>>> Simone.
>> >> >>>> -------------------------------------------------------
>> >> >>>> Ing. Simone Giannecchini
>> >> >>>> GeoSolutions S.A.S.
>> >> >>>> Owner - 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://simboss.blogspot.com/
>> >> >>>> http://www.linkedin.com/in/simonegiannecchini
>> >> >>>>
>> >> >>>> -------------------------------------------------------
>> >> >>>>
>> >> >>>>
>> >> >>>>
>> >> >>>> On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
>> >> >>>> <[hidden email]> wrote:
>> >> >>>> > Ciao Simone
>> >> >>>> >
>> >> >>>> > I can email you a smaple of four files that should be enough for
>> >> >>>> > building a
>> >> >>>> > mosaic. If you prefer I can manage to make them availabe on a
>> >> >>>> > public
>> >> >>>> > url
>> >> >>>> > avoinding to fill your mailbox.
>> >> >>>> > Thanks a lot for the answer
>> >> >>>> >
>> >> >>>> > Stefano Iacovella
>> >> >>>> >
>> >> >>>> > 2009/2/8 Simone Giannecchini
>> >> >>>> > <[hidden email]>
>> >> >>>> >>
>> >> >>>> >> Ciao Stefano,
>> >> >>>> >> the correct way to obtain what you need would be using the
>> >> >>>> >> InputTransparentColor. However, there are various
>> >> >>>> >> bugs/limitations
>> >> >>>> >> in
>> >> >>>> >> JAI as far as managing transparency with mosaic which I tried
>> >> >>>> >> to
>> >> >>>> >> workaround (apparently with not much success :-) ).
>> >> >>>> >> Could you make available some sample data for testing?
>> >> >>>> >>
>> >> >>>> >> Simone.
>> >> >>>> >> -------------------------------------------------------
>> >> >>>> >> Ing. Simone Giannecchini
>> >> >>>> >> GeoSolutions S.A.S.
>> >> >>>> >> Owner - 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://simboss.blogspot.com/
>> >> >>>> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >>>> >>
>> >> >>>> >> -------------------------------------------------------
>> >> >>>> >>
>> >> >>>> >>
>> >> >>>> >>
>> >> >>>> >> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>> >> >>>> >> <[hidden email]> wrote:
>> >> >>>> >> > I've read a few post on the nabble archive about how to
>> >> >>>> >> > handle
>> >> >>>> >> > transparency
>> >> >>>> >> > with raster and also had a look at
>> >> >>>> >> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>> >> >>>> >> > Eventually it seems I've not understood how to render raster
>> >> >>>> >> > with
>> >> >>>> >> > transparency so I hope you can help me finding a solution.
>> >> >>>> >> >
>> >> >>>> >> > I prepared a mosaic with 1 bit Raster. I processed the image
>> >> >>>> >> > files
>> >> >>>> >> > with
>> >> >>>> >> > gdal
>> >> >>>> >> > utilities to transform it in geotiff. Here are the output of
>> >> >>>> >> > gdalinfo:
>> >> >>>> >> >
>> >> >>>> >> > Driver: GTiff/GeoTIFF
>> >> >>>> >> > Files: 459020.tiff
>> >> >>>> >> > Size is 11653, 9217
>> >> >>>> >> > Coordinate System is:
>> >> >>>> >> > PROJCS["Monte Mario / Italy zone 1",
>> >> >>>> >> >     GEOGCS["Monte Mario",
>> >> >>>> >> >         DATUM["Monte_Mario",
>> >> >>>> >> >             SPHEROID["International
>> >> >>>> >> > 1924",6378388,297.000000000005,
>> >> >>>> >> >                 AUTHORITY["EPSG","7022"]],
>> >> >>>> >> >             AUTHORITY["EPSG","6265"]],
>> >> >>>> >> >         PRIMEM["Greenwich",0],
>> >> >>>> >> >         UNIT["degree",0.0174532925199433],
>> >> >>>> >> >         AUTHORITY["EPSG","4265"]],
>> >> >>>> >> >     PROJECTION["Transverse_Mercator"],
>> >> >>>> >> >     PARAMETER["latitude_of_origin",0],
>> >> >>>> >> >     PARAMETER["central_meridian",9],
>> >> >>>> >> >     PARAMETER["scale_factor",0.9996],
>> >> >>>> >> >     PARAMETER["false_easting",1500000],
>> >> >>>> >> >     PARAMETER["false_northing",0],
>> >> >>>> >> >     UNIT["metre",1,
>> >> >>>> >> >         AUTHORITY["EPSG","9001"]],
>> >> >>>> >> >     AUTHORITY["EPSG","3003"]]
>> >> >>>> >> > Origin = (1450696.319000000134110,4516874.898998536169529)
>> >> >>>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >> >>>> >> > Metadata:
>> >> >>>> >> >   AREA_OR_POINT=Area
>> >> >>>> >> >   TIFFTAG_XRESOLUTION=15.748
>> >> >>>> >> >   TIFFTAG_YRESOLUTION=15.748
>> >> >>>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> >>>> >> > Image Structure Metadata:
>> >> >>>> >> >   INTERLEAVE=BAND
>> >> >>>> >> > Corner Coordinates:
>> >> >>>> >> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E,
>> >> >>>> >> > 40d48'2.48"N)
>> >> >>>> >> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E,
>> >> >>>> >> > 40d44'52.69"N)
>> >> >>>> >> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E,
>> >> >>>> >> > 40d48'3.96"N)
>> >> >>>> >> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E,
>> >> >>>> >> > 40d44'54.16"N)
>> >> >>>> >> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E,
>> >> >>>> >> > 40d46'28.35"N)
>> >> >>>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >> >>>> >> >   NoData Value=255
>> >> >>>> >> >   Image Structure Metadata:
>> >> >>>> >> >     NBITS=1
>> >> >>>> >> >   Color Table (RGB with 2 entries)
>> >> >>>> >> >     0: 255,255,255,255
>> >> >>>> >> >     1: 0,0,0,255
>> >> >>>> >> >
>> >> >>>> >> > I used the mosaic plugin to load them in geoserver 1.7.2. I
>> >> >>>> >> > can
>> >> >>>> >> > get
>> >> >>>> >> > a
>> >> >>>> >> > map
>> >> >>>> >> > with WMS request but there are some white strips at the
>> >> >>>> >> > borders
>> >> >>>> >> > of
>> >> >>>> >> > each
>> >> >>>> >> > file. Original files have overlapping areas that are white. I
>> >> >>>> >> > would
>> >> >>>> >> > like
>> >> >>>> >> > to
>> >> >>>> >> > set the white pixel to transparent and so eliminate the
>> >> >>>> >> > stripes.
>> >> >>>> >> > I set the OutputTransparentColor field in the config of
>> >> >>>> >> > coverage
>> >> >>>> >> > to
>> >> >>>> >> > #FFFFFF
>> >> >>>> >> > but had no result.
>> >> >>>> >> > I tried to set also the InputTransparentColor filed to
>> >> >>>> >> > #FFFFFF
>> >> >>>> >> > value but
>> >> >>>> >> > I
>> >> >>>> >> > got an exception:
>> >> >>>> >> >
>> >> >>>> >> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - - Unable
>> >> >>>> >> > to
>> >> >>>> >> > render
>> >> >>>> >> > RenderedOp for this operation.
>> >> >>>> >> > java.lang.RuntimeException: - Unable to render RenderedOp for
>> >> >>>> >> > this
>> >> >>>> >> > operation.
>> >> >>>> >> >         at
>> >> >>>> >> >
>> >> >>>> >> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>> >> >>>> >> >         at
>> >> >>>> >> >
>> >> >>>> >> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>> >> >>>> >> >         at
>> >> >>>> >> >
>> >> >>>> >> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>> >> >>>> >> > ...
>> >> >>>> >> >
>> >> >>>> >> > Should I use RasterSymbolizer?
>> >> >>>> >> > Thanks a lot for any hint
>> >> >>>> >> >
>> >> >>>> >> > Stefano Iacovella
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >> > ------------------------------------------------------------------------------
>> >> >>>> >> > Create and Deploy Rich Internet Apps outside the browser with
>> >> >>>> >> > Adobe(R)AIR(TM)
>> >> >>>> >> > software. With Adobe AIR, Ajax developers can use existing
>> >> >>>> >> > skills
>> >> >>>> >> > and
>> >> >>>> >> > code
>> >> >>>> >> > to
>> >> >>>> >> > build responsive, highly engaging applications that combine
>> >> >>>> >> > the
>> >> >>>> >> > power of
>> >> >>>> >> > local
>> >> >>>> >> > resources and data with the reach of the web. Download the
>> >> >>>> >> > Adobe
>> >> >>>> >> > AIR SDK
>> >> >>>> >> > and
>> >> >>>> >> > Ajax docs to start building applications
>> >> >>>> >> > today-http://p.sf.net/sfu/adobe-com
>> >> >>>> >> > _______________________________________________
>> >> >>>> >> > Geoserver-users mailing list
>> >> >>>> >> > [hidden email]
>> >> >>>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >>>> >> >
>> >> >>>> >> >
>> >> >>>> >
>> >> >>>> >
>> >> >>>
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > Create and Deploy Rich Internet Apps outside the browser with
>> >> > Adobe(R)AIR(TM)
>> >> > software. With Adobe AIR, Ajax developers can use existing skills and
>> >> > code
>> >> > to
>> >> > build responsive, highly engaging applications that combine the power
>> >> > of
>> >> > local
>> >> > resources and data with the reach of the web. Download the Adobe AIR
>> >> > SDK
>> >> > and
>> >> > Ajax docs to start building applications
>> >> > today-http://p.sf.net/sfu/adobe-com
>> >> > _______________________________________________
>> >> > Geoserver-users mailing list
>> >> > [hidden email]
>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >
>> >> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > Geoserver-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >
>> >
>
>


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Simone Giannecchini
Ciao Stefano,
an update:

1> your index was built incorrectly that's why your data does not
align. Please try to use the MosaicIndexBuilder as pointed ot here
(http://geoserver.org/display/GEOSDOC/Using+the+ImageMosaic+plugin)
2> I found and fixed a minot bug in geotools related to adding
transparency to grayscale indexed raster data which  I fixed
3> I found a bug inimageio related to 1 bit tiff data which I fixed

I'd need you to test this a bit more, tomorrow I will try to lay down
a plan to ship the fixes asap.

Ciao,
Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Fri, Feb 13, 2009 at 1:59 PM, Stefano Iacovella
<[hidden email]> wrote:

> Ciao Simone
>
> I made a few screen shots that should be more explicative, I hope :-)
>
> The first one is at this url
>
> http://s5.tinypic.com/jpbukn.jpg
>
> You can see what was the white strips I was writing about. The raster file
> displayed on the left side of the map has a overlapping area with the raster
> file displayed at the right side of the map. This area as no data and is
> rendered as white pixel. This map is what geoserver rendere the mosaic when
> in the coverage config section I don't insert a transparent color
>
> The second screen shot is here and shows the same map but with #FFFFFF
> setted as the InputTransparentColor
>
> http://i41.tinypic.com/4p7ib.png
>
> this is what I described as white map. I saved it as a png file on my client
> but it shows the same. All pixel white :-(
>
> Last I put a map obatined loading the two raster file on ArcGIS Desktop and
> that should be what I would like to rendere in geoserver
>
> http://i40.tinypic.com/t01et4.png
>
> Thanks
>
> 2009/2/13 Simone Giannecchini <[hidden email]>
>>
>> Ciao Stefano,
>> one thing, when you say "but I always got a white map" you are
>> referring to the OL preview?
>> Notice that the background color for OL is white therefore if you ask
>> for PNG and set the transparency color for the mosaic to white nothing
>> will apparently change, you need to save that file to check if it
>> really has transparent background.
>>
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>>
>> On Fri, Feb 13, 2009 at 10:29 AM, Stefano Iacovella
>> <[hidden email]> wrote:
>> > Ciao Simone
>> >
>> > 1) Oops! I'm usind the Ol preview built in in Geoserver demo and it
>> > defaulkt
>> > to jpg. I made a png (8 and 24 bit) request on the same mosaic but I
>> > always
>> > got a white map. The geoserver.log lists:
>> >
>> > 2009-02-13 10:23:34,787 DEBUG [gce.imagemosaic] - Mosaic created
>> > 2009-02-13 10:23:35,191 INFO [coverage.grid] - Creates a photographic
>> > view
>> > of grid coverage "mos" using operation "Lookup".
>> > 2009-02-13 10:23:35,192 DEBUG [geotools.rendering] - Drawing coverage
>> > GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
>> > (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario /
>> > Italy
>> > zone 1"]]
>> > ?   RenderedSampleDimension("mos":[0.0 ... 255.0])
>> > ?     ? Category("mos":[0...255])
>> > ? Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED,
>> > GEOPHYSICS]
>> >
>> > 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Transforming
>> > coverage
>> > envelope with transform PARAM_MT["Affine",
>> >   PARAMETER["num_row", 3],
>> >   PARAMETER["num_col", 3]]
>> > 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Using interpolation
>> > javax.media.jai.InterpolationNearest@69ae9f
>> > 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
>> > 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
>> > 2009-02-13 10:23:35,195 DEBUG [geotools.rendering] -
>> > clonedFinalWorldToGrid
>> > AffineTransform[[1.055670103092791, 0.0, 143.99999999999272], [-0.0,
>> > 1.048155104660409, 97.84490151557839]]
>> > 2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Raster rendered
>> > 2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Style cache hit
>> > ratio:
>> > NaN , hits 0, requests 0
>> > 2009-02-13 10:23:36,319 DEBUG [renderer.shape] - Style cache hit ratio:
>> > NaN
>> > , hits 0, requests 0
>> > 2009-02-13 10:23:36,319 DEBUG [wms.responses] - asking delegate for
>> > write to
>> > org.geoserver.ows.DispatcherOutputStream@2aabf8
>> > 2009-02-13 10:23:36,319 DEBUG [map.png] - Writing png image ...
>> > 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Encoded input image for
>> > png
>> > writer
>> > 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Getting a writer
>> > 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Setting write
>> > parameters
>> > for this writer
>> > 2009-02-13 10:23:36,321 DEBUG [geotools.image] - Writer is NOT native
>> > 2009-02-13 10:23:36,321 DEBUG [geotools.image] - About to write png
>> > image
>> > 2009-02-13 10:23:36,721 DEBUG [map.png] - Writing png image ... done!
>> >
>> > 2) I'm sending you the files. I made them form the original tif/tfw
>> > files
>> > with gdal_transfrm using the -co "NBITS=8" parameter while the previous
>> > were
>> > produced with the "NBITS=1" value
>> >
>> >
>> >
>> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >>
>> >> Ciao Stefano,
>> >> two things:
>> >>
>> >> 1> you are requesting a JPEG transparency won't work anyway, try png
>> >> 2> can you send me this new dataset, just out of curiosity, I'd like
>> >> to play with it.
>> >>
>> >> Thanks for letting me use the other data as test case.
>> >>
>> >> Simone.
>> >> -------------------------------------------------------
>> >> Ing. Simone Giannecchini
>> >> GeoSolutions S.A.S.
>> >> Owner - 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://simboss.blogspot.com/
>> >> http://www.linkedin.com/in/simonegiannecchini
>> >>
>> >> -------------------------------------------------------
>> >>
>> >>
>> >>
>> >> On Thu, Feb 12, 2009 at 6:01 PM, Stefano Iacovella
>> >> <[hidden email]> wrote:
>> >> > Ciao Simone
>> >> >
>> >> > 2) yes you can upload the samples I sent you to jira
>> >> >
>> >> > 1)
>> >> > Meanwhile I transformed the tiff in RGB or at least I tried to do it
>> >> > :-)
>> >> >
>> >> > the gdalinfo of the new files is this:
>> >> >
>> >> > Driver: GTiff/GeoTIFF
>> >> > Files: 441130.tiff
>> >> > Size is 11654, 9901
>> >> > Coordinate System is:
>> >> > PROJCS["Monte Mario / Italy zone 1",
>> >> >     GEOGCS["Monte Mario",
>> >> >         DATUM["Monte_Mario",
>> >> >             SPHEROID["International 1924",6378388,297.000000000005,
>> >> >                 AUTHORITY["EPSG","7022"]],
>> >> >             AUTHORITY["EPSG","6265"]],
>> >> >         PRIMEM["Greenwich",0],
>> >> >         UNIT["degree",0.0174532925199433],
>> >> >         AUTHORITY["EPSG","4265"]],
>> >> >     PROJECTION["Transverse_Mercator"],
>> >> >     PARAMETER["latitude_of_origin",0],
>> >> >     PARAMETER["central_meridian",9],
>> >> >     PARAMETER["scale_factor",0.9996],
>> >> >     PARAMETER["false_easting",1500000],
>> >> >     PARAMETER["false_northing",0],
>> >> >     UNIT["metre",1,
>> >> >         AUTHORITY["EPSG","9001"]],
>> >> >     AUTHORITY["EPSG","3003"]]
>> >> > Origin = (1443709.606224609538913,4522902.623206349089742)
>> >> > Pixel Size = (0.634920634920640,-0.634920634920640)
>> >> > Metadata:
>> >> >   AREA_OR_POINT=Area
>> >> >   TIFFTAG_XRESOLUTION=0.015699999
>> >> >   TIFFTAG_YRESOLUTION=0.015699999
>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> > Image Structure Metadata:
>> >> >   INTERLEAVE=BAND
>> >> > Corner Coordinates:
>> >> > Upper Left  ( 1443709.606, 4522902.623) (  8d19'55.86"E,
>> >> > 40d51'16.33"N)
>> >> > Lower Left  ( 1443709.606, 4516616.274) (  8d19'57.91"E,
>> >> > 40d47'52.48"N)
>> >> > Upper Right ( 1451108.971, 4522902.623) (  8d25'11.87"E,
>> >> > 40d51'18.04"N)
>> >> > Lower Right ( 1451108.971, 4516616.274) (  8d25'13.64"E,
>> >> > 40d47'54.19"N)
>> >> > Center      ( 1447409.289, 4519759.449) (  8d22'34.82"E,
>> >> > 40d49'35.29"N)
>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >> >   NoData Value=255
>> >> >   Color Table (RGB with 256 entries)
>> >> >     0: 255,255,255,255
>> >> >     1: 0,0,0,255
>> >> >     2: 0,0,0,255
>> >> > ....
>> >> >   255: 0,0,0,255
>> >> >
>> >> > Now I have no more exception with InputTransparentColor set to
>> >> > #FFFFFF
>> >> > but I
>> >> > get a white map
>> >> > the geoserver.log contains the following lines
>> >> >
>> >> >
>> >> > 2009-02-12 17:57:40,180 DEBUG [wms.responses] - setting up map
>> >> > 2009-02-12 17:57:40,182 DEBUG [gce.imagemosaic] - Connected mosaic
>> >> > reader to
>> >> > its data store
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
>> >> > 2009-02-12 17:57:40,182 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> >> > org.geotools.data.shapefile.shp.ShapefileReader
>> >> > 2009-02-12 17:57:40,182 TRACE [data.shapefile] - Shapefile Reader has
>> >> > been
>> >> > opened. Number open: 1
>> >> > 2009-02-12 17:57:40,183 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> >> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> >> > 2009-02-12 17:57:40,183 TRACE [data.shapefile] - Dbase File Reader
>> >> > has
>> >> > been
>> >> > opened. Number open: 1
>> >> > 2009-02-12 17:57:40,184 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
>> >> > org.geotools.data.shapefile.prj.PrjFileReader
>> >> > 2009-02-12 17:57:40,184 TRACE [data.shapefile] - PRJ reader has been
>> >> > opened.
>> >> > Number open: 1
>> >> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
>> >> > org.geotools.data.shapefile.prj.PrjFileReader
>> >> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - PRJ reader has been
>> >> > closed.
>> >> > Number open: 0
>> >> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> >> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> >> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Dbase File Reader
>> >> > has
>> >> > been
>> >> > closed. Number open: 0
>> >> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> >> > org.geotools.data.shapefile.shp.ShapefileReader
>> >> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Shapefile Reader has
>> >> > been
>> >> > closed. Number open: 0
>> >> > 2009-02-12 17:57:40,190 DEBUG [gce.imagemosaic] - About to create
>> >> > index
>> >> > 2009-02-12 17:57:40,190 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> >> > org.geotools.data.shapefile.shp.ShapefileReader
>> >> > 2009-02-12 17:57:40,190 TRACE [data.shapefile] - Shapefile Reader has
>> >> > been
>> >> > opened. Number open: 1
>> >> > 2009-02-12 17:57:40,191 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> >> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> >> > 2009-02-12 17:57:40,191 TRACE [data.shapefile] - Dbase File Reader
>> >> > has
>> >> > been
>> >> > opened. Number open: 1
>> >> > 2009-02-12 17:57:40,193 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> >> > org.geotools.data.shapefile.shp.ShapefileReader
>> >> > 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Shapefile Reader has
>> >> > been
>> >> > closed. Number open: 0
>> >> > 2009-02-12 17:57:40,194 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> >> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> >> > 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Dbase File Reader
>> >> > has
>> >> > been
>> >> > closed. Number open: 0
>> >> > 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Created index
>> >> > 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
>> >> > 2009-02-12 17:57:40,196 DEBUG [wms.map] - setting up 800x616 image
>> >> > 2009-02-12 17:57:40,236 DEBUG [renderer.shape] - Affine Transform is
>> >> > AffineTransform[[0.035378100037628, 0.0, -50836.19000897012], [0.0,
>> >> > -0.035378100037629, 160058.54636575168]]
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.styling] - number of fts set
>> >> > 1
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - processing 1
>> >> > stylers
>> >> > for http://www.opengis.net/gmlGridCoverage
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - creating rules
>> >> > for
>> >> > scale denominator - 100,950.265
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute
>> >> > grid
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute
>> >> > params
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - Querying layer
>> >> > GridCoverage with bbox: ReferencedEnvelope[1436939.517806234 :
>> >> > 1459552.377149984, 4506814.842972493 : 4524226.74466718]
>> >> > 2009-02-12 17:57:40,238 DEBUG [geotools.rendering] - rendering Raster
>> >> > for
>> >> > feature org.geotools.feature.simple.SimpleFeatureImpl@5af4bcc4 -
>> >> > org.geotools.gce.imagemosaic.ImageMosaicReader@15960fd
>> >> > 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Reading mosaic from
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
>> >> > 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
>> >> > 2009-02-12 17:57:40,240 DEBUG [gce.imagemosaic] - Creating mosaic to
>> >> > comply
>> >> > with envelope GeneralEnvelope[(1436939.517806234, 4506814.842972493),
>> >> > (1459552.377149984, 4524226.74466718)] crs PROJCS["Monte Mario /
>> >> > Italy
>> >> > zone
>> >> > 1",
>> >> >   GEOGCS["Monte Mario",
>> >> >     DATUM["Monte_Mario",
>> >> >       SPHEROID["International 1924", 6378388.0, 297.000000000005,
>> >> > AUTHORITY["EPSG","7022"]],
>> >> >       AUTHORITY["EPSG","6265"]],
>> >> >     PRIMEM["Greenwich", 0.0],
>> >> >     UNIT["degree", 0.017453292519943295],
>> >> >     AXIS["Longitude", EAST],
>> >> >     AXIS["Latitude", NORTH],
>> >> >     AUTHORITY["EPSG","4265"]],
>> >> >   PROJECTION["Transverse_Mercator"],
>> >> >   PARAMETER["central_meridian", 9.0],
>> >> >   PARAMETER["latitude_of_origin", 0.0],
>> >> >   PARAMETER["scale_factor", 0.9996],
>> >> >   PARAMETER["false_easting", 1500000.0],
>> >> >   PARAMETER["false_northing", 0.0],
>> >> >   UNIT["m", 1.0],
>> >> >   AXIS["x", EAST],
>> >> >   AXIS["y", NORTH],
>> >> >   AUTHORITY["EPSG","3003"]] dim
>> >> > java.awt.Rectangle[x=0,y=0,width=800,height=616]
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - loading tile for
>> >> > envelope
>> >> > ReferencedEnvelope[1443666.843461 : 1458139.073441, 4511022.104 :
>> >> > 4522902.623206]
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Trying to  use the
>> >> > index...
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index does not need
>> >> > to
>> >> > be
>> >> > created...
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index Loaded
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - We have 4 tiles to
>> >> > load
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Loading level 0
>> >> > with
>> >> > subsampling factors 47 47
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - About to read image
>> >> > number
>> >> > 0
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - File found
>> >> > 2009-02-12 17:57:40,242 DEBUG [gce.imagemosaic] - Just read image
>> >> > number
>> >> > 0
>> >> > 2009-02-12 17:57:40,258 DEBUG [gce.imagemosaic] - Adding to mosaic
>> >> > image
>> >> > number 0
>> >> > 2009-02-12 17:57:40,259 DEBUG [gce.imagemosaic] - Support for alpha
>> >> > on
>> >> > input
>> >> > image number 0
>> >> > 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - About to read image
>> >> > number
>> >> > 1
>> >> > 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - File found
>> >> > 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Just read image
>> >> > number
>> >> > 1
>> >> > 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Adding to mosaic
>> >> > image
>> >> > number 1
>> >> > 2009-02-12 17:57:40,292 DEBUG [gce.imagemosaic] - Support for alpha
>> >> > on
>> >> > input
>> >> > image number 1
>> >> > 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - About to read image
>> >> > number
>> >> > 2
>> >> > 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - File found
>> >> > 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Just read image
>> >> > number
>> >> > 2
>> >> > 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Adding to mosaic
>> >> > image
>> >> > number 2
>> >> > 2009-02-12 17:57:40,312 DEBUG [gce.imagemosaic] - Support for alpha
>> >> > on
>> >> > input
>> >> > image number 2
>> >> > 2009-02-12 17:57:40,315 DEBUG [gce.imagemosaic] - About to read image
>> >> > number
>> >> > 3
>> >> > 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - File found
>> >> > 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - Just read image
>> >> > number
>> >> > 3
>> >> > 2009-02-12 17:57:40,317 DEBUG [gce.imagemosaic] - Adding to mosaic
>> >> > image
>> >> > number 3
>> >> > 2009-02-12 17:57:40,333 DEBUG [gce.imagemosaic] - Support for alpha
>> >> > on
>> >> > input
>> >> > image number 3
>> >> > 2009-02-12 17:57:40,336 DEBUG [gce.imagemosaic] - Loaded bbox
>> >> > Env[1443666.843460616 : 1458139.0734409676, 4511022.103999999 :
>> >> > 4522902.623206349] while requested bbox
>> >> > GeneralEnvelope[(1436939.517806234,
>> >> > 4506814.842972493), (1459552.377149984, 4524226.74466718)]
>> >> > 2009-02-12 17:57:40,337 DEBUG [gce.imagemosaic] - Mosaic created
>> >> > 2009-02-12 17:57:41,035 INFO [coverage.grid] - Creates a photographic
>> >> > view
>> >> > of grid coverage "mos" using operation "Lookup".
>> >> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Drawing coverage
>> >> > GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
>> >> > (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario /
>> >> > Italy
>> >> > zone 1"]]
>> >> >    RenderedSampleDimension("mos":[0.0 ... 255.0])
>> >> >       Category("mos":[0...255])
>> >> >  Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED,
>> >> > GEOPHYSICS]
>> >> >
>> >> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Transforming
>> >> > coverage
>> >> > envelope with transform PARAM_MT["Affine",
>> >> >   PARAMETER["num_row", 3],
>> >> >   PARAMETER["num_col", 3]]
>> >> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Using
>> >> > interpolation
>> >> > javax.media.jai.InterpolationNearest@19dcf69
>> >> > 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster
>> >> > Symbolizer
>> >> > 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster
>> >> > Symbolizer
>> >> > 2009-02-12 17:57:41,039 DEBUG [geotools.rendering] -
>> >> > clonedFinalWorldToGrid
>> >> > AffineTransform[[1.055670103092791, 0.0, 238.00000000000728], [-0.0,
>> >> > 1.048155104660409, 46.84490151560749]]
>> >> > 2009-02-12 17:57:43,084 DEBUG [geotools.rendering] - Raster rendered
>> >> > 2009-02-12 17:57:43,085 DEBUG [geotools.rendering] - Style cache hit
>> >> > ratio:
>> >> > NaN , hits 0, requests 0
>> >> > 2009-02-12 17:57:43,085 DEBUG [renderer.shape] - Style cache hit
>> >> > ratio:
>> >> > NaN
>> >> > , hits 0, requests 0
>> >> > 2009-02-12 17:57:43,085 DEBUG [wms.responses] - asking delegate for
>> >> > write to
>> >> > org.geoserver.ows.DispatcherOutputStream@8fd95d
>> >> > 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Encoding input image
>> >> > to
>> >> > write out as JPEG.
>> >> > 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Getting a JPEG
>> >> > writer
>> >> > and
>> >> > configuring it.
>> >> > 2009-02-12 17:57:43,100 DEBUG [geotools.image] - Writing out...
>> >> >
>> >> >
>> >> > I didn't specify LZW compression but I'll give it a try
>> >> >
>> >> >
>> >> >
>> >> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >> >>
>> >> >> Ciao Stefano,
>> >> >> I inspected a bit further and the problem is related to how the 1
>> >> >> bit
>> >> >> compression is managed by both imageio and geotools as well.
>> >> >> I will fix them both.
>> >> >>
>> >> >> Meanwhile:
>> >> >> 1> can you try to envode as plain RGB but using LZW compression to
>> >> >> have smaller files?
>> >> >> 2> can I use e of your sample images as sample dataa to open upa
>> >> >> jira?
>> >> >>
>> >> >>
>> >> >> Simone.
>> >> >> -------------------------------------------------------
>> >> >> Ing. Simone Giannecchini
>> >> >> GeoSolutions S.A.S.
>> >> >> Owner - 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://simboss.blogspot.com/
>> >> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >>
>> >> >> -------------------------------------------------------
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Thu, Feb 12, 2009 at 11:25 AM, Stefano Iacovella
>> >> >> <[hidden email]> wrote:
>> >> >> > Ciao Simone
>> >> >> >
>> >> >> > thank you for the kindly support :-)
>> >> >> > It was my fault I replied directly to Simone's mailbox. We come
>> >> >> > back
>> >> >> > to
>> >> >> > the
>> >> >> > list hoping we'll find a solution and it may be useful to someone
>> >> >> > else.
>> >> >> >
>> >> >> > Coming to the topic I get the original tif+tfw file and transform
>> >> >> > them
>> >> >> > to
>> >> >> > the geotiff format. May be I made some errors in the
>> >> >> > transformation.
>> >> >> > this is
>> >> >> > the output of gdalinfo on the original file:
>> >> >> >
>> >> >> > Driver: GTiff/GeoTIFF
>> >> >> > Files: CTR_OLD/564090.tif
>> >> >> > Size is 11653, 8994
>> >> >> > Coordinate System is `'
>> >> >> > Origin = (1442261.101999999955297,4328093.219998572021723)
>> >> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >> >> > Metadata:
>> >> >> >   TIFFTAG_XRESOLUTION=15.748
>> >> >> >   TIFFTAG_YRESOLUTION=15.748
>> >> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> >> > Image Structure Metadata:
>> >> >> >   COMPRESSION=CCITTFAX4
>> >> >> >   INTERLEAVE=BAND
>> >> >> > Corner Coordinates:
>> >> >> > Upper Left  ( 1442261.102, 4328093.220)
>> >> >> > Lower Left  ( 1442261.102, 4322382.030)
>> >> >> > Upper Right ( 1449660.757, 4328093.220)
>> >> >> > Lower Right ( 1449660.757, 4322382.030)
>> >> >> > Center      ( 1445960.929, 4325237.625)
>> >> >> > Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
>> >> >> >   Overviews: 146x112
>> >> >> >   Image Structure Metadata:
>> >> >> >     NBITS=1
>> >> >> >   Color Table (RGB with 2 entries)
>> >> >> >     0: 255,255,255,255
>> >> >> >     1: 0,0,0,255
>> >> >> >
>> >> >> > I use this parameters to transform them in geotiff:
>> >> >> >
>> >> >> >  gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co
>> >> >> > "NBITS=1"
>> >> >> > -a_srs "EPSG:3003" $file $newfile
>> >> >> >
>> >> >> > May be of any help change any of this parameters?
>> >> >> >
>> >> >> > The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with
>> >> >> > GDAL
>> >> >> > plugin.
>> >> >> > Could it be useful if I disable the JAI support?
>> >> >> >
>> >> >> > Thanks again
>> >> >> >
>> >> >> >
>> >> >> > 2009/2/12 Simone Giannecchini
>> >> >> > <[hidden email]>
>> >> >> >>
>> >> >> >> Ciao Simone,
>> >> >> >> quick progress update (sono parecchio indaffarato sti giorni
>> >> >> >> purtroppo).
>> >> >> >>
>> >> >> >> Allora innanzitutto per tua sfortuna stai usando un tipo di dato
>> >> >> >> che
>> >> >> >> attualmente manda in crash la pipeline di rendering del java2d su
>> >> >> >> 2
>> >> >> >> delle
>> >> >> >> mie 3 macchine su cui ho testato. Stai usando  tiff black - white
>> >> >> >> che
>> >> >> >> sono
>> >> >> >> trasformate  in una palette a 1 bit e questo crea imbarazzi
>> >> >> >> notevoli
>> >> >> >> alla
>> >> >> >> pipelina, Ho cmq trovato un workaround.
>> >> >> >> Se tu non sei incorso in questo problema ti sarei grato se tu
>> >> >> >> potessi
>> >> >> >> darmi qualche dettaglio sulla piattaforma di test (OS
>> >> >> >> soprattutto) e
>> >> >> >> sulla
>> >> >> >> versione di java. La pipelina di rendering cambia a seconda di OS
>> >> >> >> e
>> >> >> >> versione
>> >> >> >> di java (OGL, Direct3D, etc..).
>> >> >> >>
>> >> >> >> Per il secondo problema ho riprodotto, ma non ancora fixxato.
>> >> >> >> Domani
>> >> >> >> dovrei dare un colpo definitivo.
>> >> >> >>
>> >> >> >>
>> >> >> >> ti tengo aggioranto,
>> >> >> >> Simone.
>> >> >> >> -------------------------------------------------------
>> >> >> >> Ing. Simone Giannecchini
>> >> >> >> GeoSolutions S.A.S.
>> >> >> >> Owner - 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://simboss.blogspot.com/
>> >> >> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >> >>
>> >> >> >> -------------------------------------------------------
>> >> >> >>
>> >> >> >>
>> >> >> >> On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella
>> >> >> >> <[hidden email]> wrote:
>> >> >> >>>
>> >> >> >>> Ciao Simone
>> >> >> >>>
>> >> >> >>> ti allego un archivio con i quattro fotogrammi ed i file con i
>> >> >> >>> metadati
>> >> >> >>> di costruzione del mosaico.
>> >> >> >>> Per i risultati ed eventuali altre prove ovviamente ci sentiamo
>> >> >> >>> sulla
>> >> >> >>> ml
>> >> >> >>> pubblica.
>> >> >> >>> Grazie mille per il supporto
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> 2009/2/8 Simone Giannecchini
>> >> >> >>> <[hidden email]>
>> >> >> >>>>
>> >> >> >>>> Ciao Stefano, mettila pure dove ti torna meglio.
>> >> >> >>>> L'importante è continuare la discussione sulla ml pubblica.
>> >> >> >>>>
>> >> >> >>>> Simone.
>> >> >> >>>> -------------------------------------------------------
>> >> >> >>>> Ing. Simone Giannecchini
>> >> >> >>>> GeoSolutions S.A.S.
>> >> >> >>>> Owner - 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://simboss.blogspot.com/
>> >> >> >>>> http://www.linkedin.com/in/simonegiannecchini
>> >> >> >>>>
>> >> >> >>>> -------------------------------------------------------
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
>> >> >> >>>> <[hidden email]> wrote:
>> >> >> >>>> > Ciao Simone
>> >> >> >>>> >
>> >> >> >>>> > I can email you a smaple of four files that should be enough
>> >> >> >>>> > for
>> >> >> >>>> > building a
>> >> >> >>>> > mosaic. If you prefer I can manage to make them availabe on a
>> >> >> >>>> > public
>> >> >> >>>> > url
>> >> >> >>>> > avoinding to fill your mailbox.
>> >> >> >>>> > Thanks a lot for the answer
>> >> >> >>>> >
>> >> >> >>>> > Stefano Iacovella
>> >> >> >>>> >
>> >> >> >>>> > 2009/2/8 Simone Giannecchini
>> >> >> >>>> > <[hidden email]>
>> >> >> >>>> >>
>> >> >> >>>> >> Ciao Stefano,
>> >> >> >>>> >> the correct way to obtain what you need would be using the
>> >> >> >>>> >> InputTransparentColor. However, there are various
>> >> >> >>>> >> bugs/limitations
>> >> >> >>>> >> in
>> >> >> >>>> >> JAI as far as managing transparency with mosaic which I
>> >> >> >>>> >> tried
>> >> >> >>>> >> to
>> >> >> >>>> >> workaround (apparently with not much success :-) ).
>> >> >> >>>> >> Could you make available some sample data for testing?
>> >> >> >>>> >>
>> >> >> >>>> >> Simone.
>> >> >> >>>> >> -------------------------------------------------------
>> >> >> >>>> >> Ing. Simone Giannecchini
>> >> >> >>>> >> GeoSolutions S.A.S.
>> >> >> >>>> >> Owner - 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://simboss.blogspot.com/
>> >> >> >>>> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >> >>>> >>
>> >> >> >>>> >> -------------------------------------------------------
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>> >> >> >>>> >> <[hidden email]> wrote:
>> >> >> >>>> >> > I've read a few post on the nabble archive about how to
>> >> >> >>>> >> > handle
>> >> >> >>>> >> > transparency
>> >> >> >>>> >> > with raster and also had a look at
>> >> >> >>>> >> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>> >> >> >>>> >> > Eventually it seems I've not understood how to render
>> >> >> >>>> >> > raster
>> >> >> >>>> >> > with
>> >> >> >>>> >> > transparency so I hope you can help me finding a solution.
>> >> >> >>>> >> >
>> >> >> >>>> >> > I prepared a mosaic with 1 bit Raster. I processed the
>> >> >> >>>> >> > image
>> >> >> >>>> >> > files
>> >> >> >>>> >> > with
>> >> >> >>>> >> > gdal
>> >> >> >>>> >> > utilities to transform it in geotiff. Here are the output
>> >> >> >>>> >> > of
>> >> >> >>>> >> > gdalinfo:
>> >> >> >>>> >> >
>> >> >> >>>> >> > Driver: GTiff/GeoTIFF
>> >> >> >>>> >> > Files: 459020.tiff
>> >> >> >>>> >> > Size is 11653, 9217
>> >> >> >>>> >> > Coordinate System is:
>> >> >> >>>> >> > PROJCS["Monte Mario / Italy zone 1",
>> >> >> >>>> >> >     GEOGCS["Monte Mario",
>> >> >> >>>> >> >         DATUM["Monte_Mario",
>> >> >> >>>> >> >             SPHEROID["International
>> >> >> >>>> >> > 1924",6378388,297.000000000005,
>> >> >> >>>> >> >                 AUTHORITY["EPSG","7022"]],
>> >> >> >>>> >> >             AUTHORITY["EPSG","6265"]],
>> >> >> >>>> >> >         PRIMEM["Greenwich",0],
>> >> >> >>>> >> >         UNIT["degree",0.0174532925199433],
>> >> >> >>>> >> >         AUTHORITY["EPSG","4265"]],
>> >> >> >>>> >> >     PROJECTION["Transverse_Mercator"],
>> >> >> >>>> >> >     PARAMETER["latitude_of_origin",0],
>> >> >> >>>> >> >     PARAMETER["central_meridian",9],
>> >> >> >>>> >> >     PARAMETER["scale_factor",0.9996],
>> >> >> >>>> >> >     PARAMETER["false_easting",1500000],
>> >> >> >>>> >> >     PARAMETER["false_northing",0],
>> >> >> >>>> >> >     UNIT["metre",1,
>> >> >> >>>> >> >         AUTHORITY["EPSG","9001"]],
>> >> >> >>>> >> >     AUTHORITY["EPSG","3003"]]
>> >> >> >>>> >> > Origin = (1450696.319000000134110,4516874.898998536169529)
>> >> >> >>>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >> >> >>>> >> > Metadata:
>> >> >> >>>> >> >   AREA_OR_POINT=Area
>> >> >> >>>> >> >   TIFFTAG_XRESOLUTION=15.748
>> >> >> >>>> >> >   TIFFTAG_YRESOLUTION=15.748
>> >> >> >>>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> >> >>>> >> > Image Structure Metadata:
>> >> >> >>>> >> >   INTERLEAVE=BAND
>> >> >> >>>> >> > Corner Coordinates:
>> >> >> >>>> >> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E,
>> >> >> >>>> >> > 40d48'2.48"N)
>> >> >> >>>> >> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E,
>> >> >> >>>> >> > 40d44'52.69"N)
>> >> >> >>>> >> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E,
>> >> >> >>>> >> > 40d48'3.96"N)
>> >> >> >>>> >> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E,
>> >> >> >>>> >> > 40d44'54.16"N)
>> >> >> >>>> >> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E,
>> >> >> >>>> >> > 40d46'28.35"N)
>> >> >> >>>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >> >> >>>> >> >   NoData Value=255
>> >> >> >>>> >> >   Image Structure Metadata:
>> >> >> >>>> >> >     NBITS=1
>> >> >> >>>> >> >   Color Table (RGB with 2 entries)
>> >> >> >>>> >> >     0: 255,255,255,255
>> >> >> >>>> >> >     1: 0,0,0,255
>> >> >> >>>> >> >
>> >> >> >>>> >> > I used the mosaic plugin to load them in geoserver 1.7.2.
>> >> >> >>>> >> > I
>> >> >> >>>> >> > can
>> >> >> >>>> >> > get
>> >> >> >>>> >> > a
>> >> >> >>>> >> > map
>> >> >> >>>> >> > with WMS request but there are some white strips at the
>> >> >> >>>> >> > borders
>> >> >> >>>> >> > of
>> >> >> >>>> >> > each
>> >> >> >>>> >> > file. Original files have overlapping areas that are
>> >> >> >>>> >> > white. I
>> >> >> >>>> >> > would
>> >> >> >>>> >> > like
>> >> >> >>>> >> > to
>> >> >> >>>> >> > set the white pixel to transparent and so eliminate the
>> >> >> >>>> >> > stripes.
>> >> >> >>>> >> > I set the OutputTransparentColor field in the config of
>> >> >> >>>> >> > coverage
>> >> >> >>>> >> > to
>> >> >> >>>> >> > #FFFFFF
>> >> >> >>>> >> > but had no result.
>> >> >> >>>> >> > I tried to set also the InputTransparentColor filed to
>> >> >> >>>> >> > #FFFFFF
>> >> >> >>>> >> > value but
>> >> >> >>>> >> > I
>> >> >> >>>> >> > got an exception:
>> >> >> >>>> >> >
>> >> >> >>>> >> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - -
>> >> >> >>>> >> > Unable
>> >> >> >>>> >> > to
>> >> >> >>>> >> > render
>> >> >> >>>> >> > RenderedOp for this operation.
>> >> >> >>>> >> > java.lang.RuntimeException: - Unable to render RenderedOp
>> >> >> >>>> >> > for
>> >> >> >>>> >> > this
>> >> >> >>>> >> > operation.
>> >> >> >>>> >> >         at
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>> >> >> >>>> >> >         at
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>> >> >> >>>> >> >         at
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>> >> >> >>>> >> > ...
>> >> >> >>>> >> >
>> >> >> >>>> >> > Should I use RasterSymbolizer?
>> >> >> >>>> >> > Thanks a lot for any hint
>> >> >> >>>> >> >
>> >> >> >>>> >> > Stefano Iacovella
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > ------------------------------------------------------------------------------
>> >> >> >>>> >> > Create and Deploy Rich Internet Apps outside the browser
>> >> >> >>>> >> > with
>> >> >> >>>> >> > Adobe(R)AIR(TM)
>> >> >> >>>> >> > software. With Adobe AIR, Ajax developers can use existing
>> >> >> >>>> >> > skills
>> >> >> >>>> >> > and
>> >> >> >>>> >> > code
>> >> >> >>>> >> > to
>> >> >> >>>> >> > build responsive, highly engaging applications that
>> >> >> >>>> >> > combine
>> >> >> >>>> >> > the
>> >> >> >>>> >> > power of
>> >> >> >>>> >> > local
>> >> >> >>>> >> > resources and data with the reach of the web. Download the
>> >> >> >>>> >> > Adobe
>> >> >> >>>> >> > AIR SDK
>> >> >> >>>> >> > and
>> >> >> >>>> >> > Ajax docs to start building applications
>> >> >> >>>> >> > today-http://p.sf.net/sfu/adobe-com
>> >> >> >>>> >> > _______________________________________________
>> >> >> >>>> >> > Geoserver-users mailing list
>> >> >> >>>> >> > [hidden email]
>> >> >> >>>> >> >
>> >> >> >>>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >
>> >> >> >>>> >
>> >> >> >>>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > ------------------------------------------------------------------------------
>> >> >> > Create and Deploy Rich Internet Apps outside the browser with
>> >> >> > Adobe(R)AIR(TM)
>> >> >> > software. With Adobe AIR, Ajax developers can use existing skills
>> >> >> > and
>> >> >> > code
>> >> >> > to
>> >> >> > build responsive, highly engaging applications that combine the
>> >> >> > power
>> >> >> > of
>> >> >> > local
>> >> >> > resources and data with the reach of the web. Download the Adobe
>> >> >> > AIR
>> >> >> > SDK
>> >> >> > and
>> >> >> > Ajax docs to start building applications
>> >> >> > today-http://p.sf.net/sfu/adobe-com
>> >> >> > _______________________________________________
>> >> >> > Geoserver-users mailing list
>> >> >> > [hidden email]
>> >> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> >
>> >> > _______________________________________________
>> >> > Geoserver-users mailing list
>> >> > [hidden email]
>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >
>> >> >
>> >
>> >
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: 1bit Raster Transparency

Stefano Iacovella
Ciao Simone

1) The data are not aligned natively unfortunately. The original file was produced with a scanner from paper maps. I didn't made them myself and I don't know why there are those strange envelopes and the overlapping areas. Anyway I checked the shapefile against the raster and it seems they fit. The white stripes I was talking about are dued to the overlapping area and you can see them also just loading the raster in a Desktop GIS like ArcMap or gvSig, unless you set the white pixel to no colour.

For the fixes I would be glad to made any test you need.
Thanks again

2009/2/17 Simone Giannecchini <[hidden email]>
Ciao Stefano,
an update:

1> your index was built incorrectly that's why your data does not
align. Please try to use the MosaicIndexBuilder as pointed ot here
(http://geoserver.org/display/GEOSDOC/Using+the+ImageMosaic+plugin)
2> I found and fixed a minot bug in geotools related to adding
transparency to grayscale indexed raster data which  I fixed
3> I found a bug inimageio related to 1 bit tiff data which I fixed

I'd need you to test this a bit more, tomorrow I will try to lay down
a plan to ship the fixes asap.

Ciao,
Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Fri, Feb 13, 2009 at 1:59 PM, Stefano Iacovella
<[hidden email]> wrote:
> Ciao Simone
>
> I made a few screen shots that should be more explicative, I hope :-)
>
> The first one is at this url
>
> http://s5.tinypic.com/jpbukn.jpg
>
> You can see what was the white strips I was writing about. The raster file
> displayed on the left side of the map has a overlapping area with the raster
> file displayed at the right side of the map. This area as no data and is
> rendered as white pixel. This map is what geoserver rendere the mosaic when
> in the coverage config section I don't insert a transparent color
>
> The second screen shot is here and shows the same map but with #FFFFFF
> setted as the InputTransparentColor
>
> http://i41.tinypic.com/4p7ib.png
>
> this is what I described as white map. I saved it as a png file on my client
> but it shows the same. All pixel white :-(
>
> Last I put a map obatined loading the two raster file on ArcGIS Desktop and
> that should be what I would like to rendere in geoserver
>
> http://i40.tinypic.com/t01et4.png
>
> Thanks
>
> 2009/2/13 Simone Giannecchini <[hidden email]>
>>
>> Ciao Stefano,
>> one thing, when you say "but I always got a white map" you are
>> referring to the OL preview?
>> Notice that the background color for OL is white therefore if you ask
>> for PNG and set the transparency color for the mosaic to white nothing
>> will apparently change, you need to save that file to check if it
>> really has transparent background.
>>
>> Simone.
>> -------------------------------------------------------
>> Ing. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - 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://simboss.blogspot.com/
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>>
>>
>>
>> On Fri, Feb 13, 2009 at 10:29 AM, Stefano Iacovella
>> <[hidden email]> wrote:
>> > Ciao Simone
>> >
>> > 1) Oops! I'm usind the Ol preview built in in Geoserver demo and it
>> > defaulkt
>> > to jpg. I made a png (8 and 24 bit) request on the same mosaic but I
>> > always
>> > got a white map. The geoserver.log lists:
>> >
>> > 2009-02-13 10:23:34,787 DEBUG [gce.imagemosaic] - Mosaic created
>> > 2009-02-13 10:23:35,191 INFO [coverage.grid] - Creates a photographic
>> > view
>> > of grid coverage "mos" using operation "Lookup".
>> > 2009-02-13 10:23:35,192 DEBUG [geotools.rendering] - Drawing coverage
>> > GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
>> > (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario /
>> > Italy
>> > zone 1"]]
>> > ?   RenderedSampleDimension("mos":[0.0 ... 255.0])
>> > ?     ? Category("mos":[0...255])
>> > ? Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED,
>> > GEOPHYSICS]
>> >
>> > 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Transforming
>> > coverage
>> > envelope with transform PARAM_MT["Affine",
>> >   PARAMETER["num_row", 3],
>> >   PARAMETER["num_col", 3]]
>> > 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Using interpolation
>> > javax.media.jai.InterpolationNearest@69ae9f
>> > 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
>> > 2009-02-13 10:23:35,193 DEBUG [geotools.rendering] - Raster Symbolizer
>> > 2009-02-13 10:23:35,195 DEBUG [geotools.rendering] -
>> > clonedFinalWorldToGrid
>> > AffineTransform[[1.055670103092791, 0.0, 143.99999999999272], [-0.0,
>> > 1.048155104660409, 97.84490151557839]]
>> > 2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Raster rendered
>> > 2009-02-13 10:23:36,318 DEBUG [geotools.rendering] - Style cache hit
>> > ratio:
>> > NaN , hits 0, requests 0
>> > 2009-02-13 10:23:36,319 DEBUG [renderer.shape] - Style cache hit ratio:
>> > NaN
>> > , hits 0, requests 0
>> > 2009-02-13 10:23:36,319 DEBUG [wms.responses] - asking delegate for
>> > write to
>> > org.geoserver.ows.DispatcherOutputStream@2aabf8
>> > 2009-02-13 10:23:36,319 DEBUG [map.png] - Writing png image ...
>> > 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Encoded input image for
>> > png
>> > writer
>> > 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Getting a writer
>> > 2009-02-13 10:23:36,320 DEBUG [geotools.image] - Setting write
>> > parameters
>> > for this writer
>> > 2009-02-13 10:23:36,321 DEBUG [geotools.image] - Writer is NOT native
>> > 2009-02-13 10:23:36,321 DEBUG [geotools.image] - About to write png
>> > image
>> > 2009-02-13 10:23:36,721 DEBUG [map.png] - Writing png image ... done!
>> >
>> > 2) I'm sending you the files. I made them form the original tif/tfw
>> > files
>> > with gdal_transfrm using the -co "NBITS=8" parameter while the previous
>> > were
>> > produced with the "NBITS=1" value
>> >
>> >
>> >
>> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >>
>> >> Ciao Stefano,
>> >> two things:
>> >>
>> >> 1> you are requesting a JPEG transparency won't work anyway, try png
>> >> 2> can you send me this new dataset, just out of curiosity, I'd like
>> >> to play with it.
>> >>
>> >> Thanks for letting me use the other data as test case.
>> >>
>> >> Simone.
>> >> -------------------------------------------------------
>> >> Ing. Simone Giannecchini
>> >> GeoSolutions S.A.S.
>> >> Owner - 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://simboss.blogspot.com/
>> >> http://www.linkedin.com/in/simonegiannecchini
>> >>
>> >> -------------------------------------------------------
>> >>
>> >>
>> >>
>> >> On Thu, Feb 12, 2009 at 6:01 PM, Stefano Iacovella
>> >> <[hidden email]> wrote:
>> >> > Ciao Simone
>> >> >
>> >> > 2) yes you can upload the samples I sent you to jira
>> >> >
>> >> > 1)
>> >> > Meanwhile I transformed the tiff in RGB or at least I tried to do it
>> >> > :-)
>> >> >
>> >> > the gdalinfo of the new files is this:
>> >> >
>> >> > Driver: GTiff/GeoTIFF
>> >> > Files: 441130.tiff
>> >> > Size is 11654, 9901
>> >> > Coordinate System is:
>> >> > PROJCS["Monte Mario / Italy zone 1",
>> >> >     GEOGCS["Monte Mario",
>> >> >         DATUM["Monte_Mario",
>> >> >             SPHEROID["International 1924",6378388,297.000000000005,
>> >> >                 AUTHORITY["EPSG","7022"]],
>> >> >             AUTHORITY["EPSG","6265"]],
>> >> >         PRIMEM["Greenwich",0],
>> >> >         UNIT["degree",0.0174532925199433],
>> >> >         AUTHORITY["EPSG","4265"]],
>> >> >     PROJECTION["Transverse_Mercator"],
>> >> >     PARAMETER["latitude_of_origin",0],
>> >> >     PARAMETER["central_meridian",9],
>> >> >     PARAMETER["scale_factor",0.9996],
>> >> >     PARAMETER["false_easting",1500000],
>> >> >     PARAMETER["false_northing",0],
>> >> >     UNIT["metre",1,
>> >> >         AUTHORITY["EPSG","9001"]],
>> >> >     AUTHORITY["EPSG","3003"]]
>> >> > Origin = (1443709.606224609538913,4522902.623206349089742)
>> >> > Pixel Size = (0.634920634920640,-0.634920634920640)
>> >> > Metadata:
>> >> >   AREA_OR_POINT=Area
>> >> >   TIFFTAG_XRESOLUTION=0.015699999
>> >> >   TIFFTAG_YRESOLUTION=0.015699999
>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> > Image Structure Metadata:
>> >> >   INTERLEAVE=BAND
>> >> > Corner Coordinates:
>> >> > Upper Left  ( 1443709.606, 4522902.623) (  8d19'55.86"E,
>> >> > 40d51'16.33"N)
>> >> > Lower Left  ( 1443709.606, 4516616.274) (  8d19'57.91"E,
>> >> > 40d47'52.48"N)
>> >> > Upper Right ( 1451108.971, 4522902.623) (  8d25'11.87"E,
>> >> > 40d51'18.04"N)
>> >> > Lower Right ( 1451108.971, 4516616.274) (  8d25'13.64"E,
>> >> > 40d47'54.19"N)
>> >> > Center      ( 1447409.289, 4519759.449) (  8d22'34.82"E,
>> >> > 40d49'35.29"N)
>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >> >   NoData Value=255
>> >> >   Color Table (RGB with 256 entries)
>> >> >     0: 255,255,255,255
>> >> >     1: 0,0,0,255
>> >> >     2: 0,0,0,255
>> >> > ....
>> >> >   255: 0,0,0,255
>> >> >
>> >> > Now I have no more exception with InputTransparentColor set to
>> >> > #FFFFFF
>> >> > but I
>> >> > get a white map
>> >> > the geoserver.log contains the following lines
>> >> >
>> >> >
>> >> > 2009-02-12 17:57:40,180 DEBUG [wms.responses] - setting up map
>> >> > 2009-02-12 17:57:40,182 DEBUG [gce.imagemosaic] - Connected mosaic
>> >> > reader to
>> >> > its data store
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
>> >> > 2009-02-12 17:57:40,182 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> >> > org.geotools.data.shapefile.shp.ShapefileReader
>> >> > 2009-02-12 17:57:40,182 TRACE [data.shapefile] - Shapefile Reader has
>> >> > been
>> >> > opened. Number open: 1
>> >> > 2009-02-12 17:57:40,183 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> >> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> >> > 2009-02-12 17:57:40,183 TRACE [data.shapefile] - Dbase File Reader
>> >> > has
>> >> > been
>> >> > opened. Number open: 1
>> >> > 2009-02-12 17:57:40,184 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
>> >> > org.geotools.data.shapefile.prj.PrjFileReader
>> >> > 2009-02-12 17:57:40,184 TRACE [data.shapefile] - PRJ reader has been
>> >> > opened.
>> >> > Number open: 1
>> >> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.prj by
>> >> > org.geotools.data.shapefile.prj.PrjFileReader
>> >> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - PRJ reader has been
>> >> > closed.
>> >> > Number open: 0
>> >> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> >> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> >> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Dbase File Reader
>> >> > has
>> >> > been
>> >> > closed. Number open: 0
>> >> > 2009-02-12 17:57:40,189 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> >> > org.geotools.data.shapefile.shp.ShapefileReader
>> >> > 2009-02-12 17:57:40,189 TRACE [data.shapefile] - Shapefile Reader has
>> >> > been
>> >> > closed. Number open: 0
>> >> > 2009-02-12 17:57:40,190 DEBUG [gce.imagemosaic] - About to create
>> >> > index
>> >> > 2009-02-12 17:57:40,190 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> >> > org.geotools.data.shapefile.shp.ShapefileReader
>> >> > 2009-02-12 17:57:40,190 TRACE [data.shapefile] - Shapefile Reader has
>> >> > been
>> >> > opened. Number open: 1
>> >> > 2009-02-12 17:57:40,191 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> >> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> >> > 2009-02-12 17:57:40,191 TRACE [data.shapefile] - Dbase File Reader
>> >> > has
>> >> > been
>> >> > opened. Number open: 1
>> >> > 2009-02-12 17:57:40,193 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp by
>> >> > org.geotools.data.shapefile.shp.ShapefileReader
>> >> > 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Shapefile Reader has
>> >> > been
>> >> > closed. Number open: 0
>> >> > 2009-02-12 17:57:40,194 DEBUG [data.shapefile] - Read lock:
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.dbf by
>> >> > org.geotools.data.shapefile.dbf.DbaseFileReader
>> >> > 2009-02-12 17:57:40,194 TRACE [data.shapefile] - Dbase File Reader
>> >> > has
>> >> > been
>> >> > closed. Number open: 0
>> >> > 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Created index
>> >> > 2009-02-12 17:57:40,194 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
>> >> > 2009-02-12 17:57:40,196 DEBUG [wms.map] - setting up 800x616 image
>> >> > 2009-02-12 17:57:40,236 DEBUG [renderer.shape] - Affine Transform is
>> >> > AffineTransform[[0.035378100037628, 0.0, -50836.19000897012], [0.0,
>> >> > -0.035378100037629, 160058.54636575168]]
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.styling] - number of fts set
>> >> > 1
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - processing 1
>> >> > stylers
>> >> > for http://www.opengis.net/gmlGridCoverage
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - creating rules
>> >> > for
>> >> > scale denominator - 100,950.265
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute
>> >> > grid
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - added attribute
>> >> > params
>> >> > 2009-02-12 17:57:40,237 DEBUG [geotools.rendering] - Querying layer
>> >> > GridCoverage with bbox: ReferencedEnvelope[1436939.517806234 :
>> >> > 1459552.377149984, 4506814.842972493 : 4524226.74466718]
>> >> > 2009-02-12 17:57:40,238 DEBUG [geotools.rendering] - rendering Raster
>> >> > for
>> >> > feature org.geotools.feature.simple.SimpleFeatureImpl@5af4bcc4 -
>> >> > org.geotools.gce.imagemosaic.ImageMosaicReader@15960fd
>> >> > 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Reading mosaic from
>> >> > file:/home/stefano/Scrivania/CTR_RAS/MINI_MOSAICO/mos.shp
>> >> > 2009-02-12 17:57:40,239 DEBUG [gce.imagemosaic] - Highest res 0.6 0.6
>> >> > 2009-02-12 17:57:40,240 DEBUG [gce.imagemosaic] - Creating mosaic to
>> >> > comply
>> >> > with envelope GeneralEnvelope[(1436939.517806234, 4506814.842972493),
>> >> > (1459552.377149984, 4524226.74466718)] crs PROJCS["Monte Mario /
>> >> > Italy
>> >> > zone
>> >> > 1",
>> >> >   GEOGCS["Monte Mario",
>> >> >     DATUM["Monte_Mario",
>> >> >       SPHEROID["International 1924", 6378388.0, 297.000000000005,
>> >> > AUTHORITY["EPSG","7022"]],
>> >> >       AUTHORITY["EPSG","6265"]],
>> >> >     PRIMEM["Greenwich", 0.0],
>> >> >     UNIT["degree", 0.017453292519943295],
>> >> >     AXIS["Longitude", EAST],
>> >> >     AXIS["Latitude", NORTH],
>> >> >     AUTHORITY["EPSG","4265"]],
>> >> >   PROJECTION["Transverse_Mercator"],
>> >> >   PARAMETER["central_meridian", 9.0],
>> >> >   PARAMETER["latitude_of_origin", 0.0],
>> >> >   PARAMETER["scale_factor", 0.9996],
>> >> >   PARAMETER["false_easting", 1500000.0],
>> >> >   PARAMETER["false_northing", 0.0],
>> >> >   UNIT["m", 1.0],
>> >> >   AXIS["x", EAST],
>> >> >   AXIS["y", NORTH],
>> >> >   AUTHORITY["EPSG","3003"]] dim
>> >> > java.awt.Rectangle[x=0,y=0,width=800,height=616]
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - loading tile for
>> >> > envelope
>> >> > ReferencedEnvelope[1443666.843461 : 1458139.073441, 4511022.104 :
>> >> > 4522902.623206]
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Trying to  use the
>> >> > index...
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index does not need
>> >> > to
>> >> > be
>> >> > created...
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Index Loaded
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - We have 4 tiles to
>> >> > load
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - Loading level 0
>> >> > with
>> >> > subsampling factors 47 47
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - About to read image
>> >> > number
>> >> > 0
>> >> > 2009-02-12 17:57:40,241 DEBUG [gce.imagemosaic] - File found
>> >> > 2009-02-12 17:57:40,242 DEBUG [gce.imagemosaic] - Just read image
>> >> > number
>> >> > 0
>> >> > 2009-02-12 17:57:40,258 DEBUG [gce.imagemosaic] - Adding to mosaic
>> >> > image
>> >> > number 0
>> >> > 2009-02-12 17:57:40,259 DEBUG [gce.imagemosaic] - Support for alpha
>> >> > on
>> >> > input
>> >> > image number 0
>> >> > 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - About to read image
>> >> > number
>> >> > 1
>> >> > 2009-02-12 17:57:40,275 DEBUG [gce.imagemosaic] - File found
>> >> > 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Just read image
>> >> > number
>> >> > 1
>> >> > 2009-02-12 17:57:40,276 DEBUG [gce.imagemosaic] - Adding to mosaic
>> >> > image
>> >> > number 1
>> >> > 2009-02-12 17:57:40,292 DEBUG [gce.imagemosaic] - Support for alpha
>> >> > on
>> >> > input
>> >> > image number 1
>> >> > 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - About to read image
>> >> > number
>> >> > 2
>> >> > 2009-02-12 17:57:40,295 DEBUG [gce.imagemosaic] - File found
>> >> > 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Just read image
>> >> > number
>> >> > 2
>> >> > 2009-02-12 17:57:40,296 DEBUG [gce.imagemosaic] - Adding to mosaic
>> >> > image
>> >> > number 2
>> >> > 2009-02-12 17:57:40,312 DEBUG [gce.imagemosaic] - Support for alpha
>> >> > on
>> >> > input
>> >> > image number 2
>> >> > 2009-02-12 17:57:40,315 DEBUG [gce.imagemosaic] - About to read image
>> >> > number
>> >> > 3
>> >> > 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - File found
>> >> > 2009-02-12 17:57:40,316 DEBUG [gce.imagemosaic] - Just read image
>> >> > number
>> >> > 3
>> >> > 2009-02-12 17:57:40,317 DEBUG [gce.imagemosaic] - Adding to mosaic
>> >> > image
>> >> > number 3
>> >> > 2009-02-12 17:57:40,333 DEBUG [gce.imagemosaic] - Support for alpha
>> >> > on
>> >> > input
>> >> > image number 3
>> >> > 2009-02-12 17:57:40,336 DEBUG [gce.imagemosaic] - Loaded bbox
>> >> > Env[1443666.843460616 : 1458139.0734409676, 4511022.103999999 :
>> >> > 4522902.623206349] while requested bbox
>> >> > GeneralEnvelope[(1436939.517806234,
>> >> > 4506814.842972493), (1459552.377149984, 4524226.74466718)]
>> >> > 2009-02-12 17:57:40,337 DEBUG [gce.imagemosaic] - Mosaic created
>> >> > 2009-02-12 17:57:41,035 INFO [coverage.grid] - Creates a photographic
>> >> > view
>> >> > of grid coverage "mos" using operation "Lookup".
>> >> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Drawing coverage
>> >> > GridCoverage2D["mos", GeneralEnvelope[(1443666.843461, 4511022.104),
>> >> > (1458139.073441, 4522902.623206)], DefaultProjectedCRS["Monte Mario /
>> >> > Italy
>> >> > zone 1"]]
>> >> >    RenderedSampleDimension("mos":[0.0 ... 255.0])
>> >> >       Category("mos":[0...255])
>> >> >  Image=RenderedOp["Mosaic"] as views [NATIVE, PACKED, RENDERED,
>> >> > GEOPHYSICS]
>> >> >
>> >> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Transforming
>> >> > coverage
>> >> > envelope with transform PARAM_MT["Affine",
>> >> >   PARAMETER["num_row", 3],
>> >> >   PARAMETER["num_col", 3]]
>> >> > 2009-02-12 17:57:41,037 DEBUG [geotools.rendering] - Using
>> >> > interpolation
>> >> > javax.media.jai.InterpolationNearest@19dcf69
>> >> > 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster
>> >> > Symbolizer
>> >> > 2009-02-12 17:57:41,038 DEBUG [geotools.rendering] - Raster
>> >> > Symbolizer
>> >> > 2009-02-12 17:57:41,039 DEBUG [geotools.rendering] -
>> >> > clonedFinalWorldToGrid
>> >> > AffineTransform[[1.055670103092791, 0.0, 238.00000000000728], [-0.0,
>> >> > 1.048155104660409, 46.84490151560749]]
>> >> > 2009-02-12 17:57:43,084 DEBUG [geotools.rendering] - Raster rendered
>> >> > 2009-02-12 17:57:43,085 DEBUG [geotools.rendering] - Style cache hit
>> >> > ratio:
>> >> > NaN , hits 0, requests 0
>> >> > 2009-02-12 17:57:43,085 DEBUG [renderer.shape] - Style cache hit
>> >> > ratio:
>> >> > NaN
>> >> > , hits 0, requests 0
>> >> > 2009-02-12 17:57:43,085 DEBUG [wms.responses] - asking delegate for
>> >> > write to
>> >> > org.geoserver.ows.DispatcherOutputStream@8fd95d
>> >> > 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Encoding input image
>> >> > to
>> >> > write out as JPEG.
>> >> > 2009-02-12 17:57:43,099 DEBUG [geotools.image] - Getting a JPEG
>> >> > writer
>> >> > and
>> >> > configuring it.
>> >> > 2009-02-12 17:57:43,100 DEBUG [geotools.image] - Writing out...
>> >> >
>> >> >
>> >> > I didn't specify LZW compression but I'll give it a try
>> >> >
>> >> >
>> >> >
>> >> > 2009/2/12 Simone Giannecchini <[hidden email]>
>> >> >>
>> >> >> Ciao Stefano,
>> >> >> I inspected a bit further and the problem is related to how the 1
>> >> >> bit
>> >> >> compression is managed by both imageio and geotools as well.
>> >> >> I will fix them both.
>> >> >>
>> >> >> Meanwhile:
>> >> >> 1> can you try to envode as plain RGB but using LZW compression to
>> >> >> have smaller files?
>> >> >> 2> can I use e of your sample images as sample dataa to open upa
>> >> >> jira?
>> >> >>
>> >> >>
>> >> >> Simone.
>> >> >> -------------------------------------------------------
>> >> >> Ing. Simone Giannecchini
>> >> >> GeoSolutions S.A.S.
>> >> >> Owner - 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://simboss.blogspot.com/
>> >> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >>
>> >> >> -------------------------------------------------------
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Thu, Feb 12, 2009 at 11:25 AM, Stefano Iacovella
>> >> >> <[hidden email]> wrote:
>> >> >> > Ciao Simone
>> >> >> >
>> >> >> > thank you for the kindly support :-)
>> >> >> > It was my fault I replied directly to Simone's mailbox. We come
>> >> >> > back
>> >> >> > to
>> >> >> > the
>> >> >> > list hoping we'll find a solution and it may be useful to someone
>> >> >> > else.
>> >> >> >
>> >> >> > Coming to the topic I get the original tif+tfw file and transform
>> >> >> > them
>> >> >> > to
>> >> >> > the geotiff format. May be I made some errors in the
>> >> >> > transformation.
>> >> >> > this is
>> >> >> > the output of gdalinfo on the original file:
>> >> >> >
>> >> >> > Driver: GTiff/GeoTIFF
>> >> >> > Files: CTR_OLD/564090.tif
>> >> >> > Size is 11653, 8994
>> >> >> > Coordinate System is `'
>> >> >> > Origin = (1442261.101999999955297,4328093.219998572021723)
>> >> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >> >> > Metadata:
>> >> >> >   TIFFTAG_XRESOLUTION=15.748
>> >> >> >   TIFFTAG_YRESOLUTION=15.748
>> >> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> >> > Image Structure Metadata:
>> >> >> >   COMPRESSION=CCITTFAX4
>> >> >> >   INTERLEAVE=BAND
>> >> >> > Corner Coordinates:
>> >> >> > Upper Left  ( 1442261.102, 4328093.220)
>> >> >> > Lower Left  ( 1442261.102, 4322382.030)
>> >> >> > Upper Right ( 1449660.757, 4328093.220)
>> >> >> > Lower Right ( 1449660.757, 4322382.030)
>> >> >> > Center      ( 1445960.929, 4325237.625)
>> >> >> > Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
>> >> >> >   Overviews: 146x112
>> >> >> >   Image Structure Metadata:
>> >> >> >     NBITS=1
>> >> >> >   Color Table (RGB with 2 entries)
>> >> >> >     0: 255,255,255,255
>> >> >> >     1: 0,0,0,255
>> >> >> >
>> >> >> > I use this parameters to transform them in geotiff:
>> >> >> >
>> >> >> >  gdal_translate -of Gtiff -co "COMPRESS=NONE" -co "TILED=YES" -co
>> >> >> > "NBITS=1"
>> >> >> > -a_srs "EPSG:3003" $file $newfile
>> >> >> >
>> >> >> > May be of any help change any of this parameters?
>> >> >> >
>> >> >> > The o.s. is UBUNTU 8.10, JDK 1.6.0_10-b33. Geoserver is 1.7.2 with
>> >> >> > GDAL
>> >> >> > plugin.
>> >> >> > Could it be useful if I disable the JAI support?
>> >> >> >
>> >> >> > Thanks again
>> >> >> >
>> >> >> >
>> >> >> > 2009/2/12 Simone Giannecchini
>> >> >> > <[hidden email]>
>> >> >> >>
>> >> >> >> Ciao Simone,
>> >> >> >> quick progress update (sono parecchio indaffarato sti giorni
>> >> >> >> purtroppo).
>> >> >> >>
>> >> >> >> Allora innanzitutto per tua sfortuna stai usando un tipo di dato
>> >> >> >> che
>> >> >> >> attualmente manda in crash la pipeline di rendering del java2d su
>> >> >> >> 2
>> >> >> >> delle
>> >> >> >> mie 3 macchine su cui ho testato. Stai usando  tiff black - white
>> >> >> >> che
>> >> >> >> sono
>> >> >> >> trasformate  in una palette a 1 bit e questo crea imbarazzi
>> >> >> >> notevoli
>> >> >> >> alla
>> >> >> >> pipelina, Ho cmq trovato un workaround.
>> >> >> >> Se tu non sei incorso in questo problema ti sarei grato se tu
>> >> >> >> potessi
>> >> >> >> darmi qualche dettaglio sulla piattaforma di test (OS
>> >> >> >> soprattutto) e
>> >> >> >> sulla
>> >> >> >> versione di java. La pipelina di rendering cambia a seconda di OS
>> >> >> >> e
>> >> >> >> versione
>> >> >> >> di java (OGL, Direct3D, etc..).
>> >> >> >>
>> >> >> >> Per il secondo problema ho riprodotto, ma non ancora fixxato.
>> >> >> >> Domani
>> >> >> >> dovrei dare un colpo definitivo.
>> >> >> >>
>> >> >> >>
>> >> >> >> ti tengo aggioranto,
>> >> >> >> Simone.
>> >> >> >> -------------------------------------------------------
>> >> >> >> Ing. Simone Giannecchini
>> >> >> >> GeoSolutions S.A.S.
>> >> >> >> Owner - 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://simboss.blogspot.com/
>> >> >> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >> >>
>> >> >> >> -------------------------------------------------------
>> >> >> >>
>> >> >> >>
>> >> >> >> On Mon, Feb 9, 2009 at 9:13 AM, Stefano Iacovella
>> >> >> >> <[hidden email]> wrote:
>> >> >> >>>
>> >> >> >>> Ciao Simone
>> >> >> >>>
>> >> >> >>> ti allego un archivio con i quattro fotogrammi ed i file con i
>> >> >> >>> metadati
>> >> >> >>> di costruzione del mosaico.
>> >> >> >>> Per i risultati ed eventuali altre prove ovviamente ci sentiamo
>> >> >> >>> sulla
>> >> >> >>> ml
>> >> >> >>> pubblica.
>> >> >> >>> Grazie mille per il supporto
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>> 2009/2/8 Simone Giannecchini
>> >> >> >>> <[hidden email]>
>> >> >> >>>>
>> >> >> >>>> Ciao Stefano, mettila pure dove ti torna meglio.
>> >> >> >>>> L'importante è continuare la discussione sulla ml pubblica.
>> >> >> >>>>
>> >> >> >>>> Simone.
>> >> >> >>>> -------------------------------------------------------
>> >> >> >>>> Ing. Simone Giannecchini
>> >> >> >>>> GeoSolutions S.A.S.
>> >> >> >>>> Owner - 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://simboss.blogspot.com/
>> >> >> >>>> http://www.linkedin.com/in/simonegiannecchini
>> >> >> >>>>
>> >> >> >>>> -------------------------------------------------------
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>>
>> >> >> >>>> On Sun, Feb 8, 2009 at 10:11 PM, Stefano Iacovella
>> >> >> >>>> <[hidden email]> wrote:
>> >> >> >>>> > Ciao Simone
>> >> >> >>>> >
>> >> >> >>>> > I can email you a smaple of four files that should be enough
>> >> >> >>>> > for
>> >> >> >>>> > building a
>> >> >> >>>> > mosaic. If you prefer I can manage to make them availabe on a
>> >> >> >>>> > public
>> >> >> >>>> > url
>> >> >> >>>> > avoinding to fill your mailbox.
>> >> >> >>>> > Thanks a lot for the answer
>> >> >> >>>> >
>> >> >> >>>> > Stefano Iacovella
>> >> >> >>>> >
>> >> >> >>>> > 2009/2/8 Simone Giannecchini
>> >> >> >>>> > <[hidden email]>
>> >> >> >>>> >>
>> >> >> >>>> >> Ciao Stefano,
>> >> >> >>>> >> the correct way to obtain what you need would be using the
>> >> >> >>>> >> InputTransparentColor. However, there are various
>> >> >> >>>> >> bugs/limitations
>> >> >> >>>> >> in
>> >> >> >>>> >> JAI as far as managing transparency with mosaic which I
>> >> >> >>>> >> tried
>> >> >> >>>> >> to
>> >> >> >>>> >> workaround (apparently with not much success :-) ).
>> >> >> >>>> >> Could you make available some sample data for testing?
>> >> >> >>>> >>
>> >> >> >>>> >> Simone.
>> >> >> >>>> >> -------------------------------------------------------
>> >> >> >>>> >> Ing. Simone Giannecchini
>> >> >> >>>> >> GeoSolutions S.A.S.
>> >> >> >>>> >> Owner - 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://simboss.blogspot.com/
>> >> >> >>>> >> http://www.linkedin.com/in/simonegiannecchini
>> >> >> >>>> >>
>> >> >> >>>> >> -------------------------------------------------------
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >>
>> >> >> >>>> >> On Fri, Feb 6, 2009 at 5:11 PM, Stefano Iacovella
>> >> >> >>>> >> <[hidden email]> wrote:
>> >> >> >>>> >> > I've read a few post on the nabble archive about how to
>> >> >> >>>> >> > handle
>> >> >> >>>> >> > transparency
>> >> >> >>>> >> > with raster and also had a look at
>> >> >> >>>> >> > http://geoserver.org/display/GEOSDOC/RasterSymbolizer.
>> >> >> >>>> >> > Eventually it seems I've not understood how to render
>> >> >> >>>> >> > raster
>> >> >> >>>> >> > with
>> >> >> >>>> >> > transparency so I hope you can help me finding a solution.
>> >> >> >>>> >> >
>> >> >> >>>> >> > I prepared a mosaic with 1 bit Raster. I processed the
>> >> >> >>>> >> > image
>> >> >> >>>> >> > files
>> >> >> >>>> >> > with
>> >> >> >>>> >> > gdal
>> >> >> >>>> >> > utilities to transform it in geotiff. Here are the output
>> >> >> >>>> >> > of
>> >> >> >>>> >> > gdalinfo:
>> >> >> >>>> >> >
>> >> >> >>>> >> > Driver: GTiff/GeoTIFF
>> >> >> >>>> >> > Files: 459020.tiff
>> >> >> >>>> >> > Size is 11653, 9217
>> >> >> >>>> >> > Coordinate System is:
>> >> >> >>>> >> > PROJCS["Monte Mario / Italy zone 1",
>> >> >> >>>> >> >     GEOGCS["Monte Mario",
>> >> >> >>>> >> >         DATUM["Monte_Mario",
>> >> >> >>>> >> >             SPHEROID["International
>> >> >> >>>> >> > 1924",6378388,297.000000000005,
>> >> >> >>>> >> >                 AUTHORITY["EPSG","7022"]],
>> >> >> >>>> >> >             AUTHORITY["EPSG","6265"]],
>> >> >> >>>> >> >         PRIMEM["Greenwich",0],
>> >> >> >>>> >> >         UNIT["degree",0.0174532925199433],
>> >> >> >>>> >> >         AUTHORITY["EPSG","4265"]],
>> >> >> >>>> >> >     PROJECTION["Transverse_Mercator"],
>> >> >> >>>> >> >     PARAMETER["latitude_of_origin",0],
>> >> >> >>>> >> >     PARAMETER["central_meridian",9],
>> >> >> >>>> >> >     PARAMETER["scale_factor",0.9996],
>> >> >> >>>> >> >     PARAMETER["false_easting",1500000],
>> >> >> >>>> >> >     PARAMETER["false_northing",0],
>> >> >> >>>> >> >     UNIT["metre",1,
>> >> >> >>>> >> >         AUTHORITY["EPSG","9001"]],
>> >> >> >>>> >> >     AUTHORITY["EPSG","3003"]]
>> >> >> >>>> >> > Origin = (1450696.319000000134110,4516874.898998536169529)
>> >> >> >>>> >> > Pixel Size = (0.634999999841250,-0.634999999841250)
>> >> >> >>>> >> > Metadata:
>> >> >> >>>> >> >   AREA_OR_POINT=Area
>> >> >> >>>> >> >   TIFFTAG_XRESOLUTION=15.748
>> >> >> >>>> >> >   TIFFTAG_YRESOLUTION=15.748
>> >> >> >>>> >> >   TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
>> >> >> >>>> >> > Image Structure Metadata:
>> >> >> >>>> >> >   INTERLEAVE=BAND
>> >> >> >>>> >> > Corner Coordinates:
>> >> >> >>>> >> > Upper Left  ( 1450696.319, 4516874.899) (  8d24'55.96"E,
>> >> >> >>>> >> > 40d48'2.48"N)
>> >> >> >>>> >> > Lower Left  ( 1450696.319, 4511022.104) (  8d24'57.63"E,
>> >> >> >>>> >> > 40d44'52.69"N)
>> >> >> >>>> >> > Upper Right ( 1458095.974, 4516874.899) (  8d30'11.73"E,
>> >> >> >>>> >> > 40d48'3.96"N)
>> >> >> >>>> >> > Lower Right ( 1458095.974, 4511022.104) (  8d30'13.14"E,
>> >> >> >>>> >> > 40d44'54.16"N)
>> >> >> >>>> >> > Center      ( 1454396.146, 4513948.501) (  8d27'34.62"E,
>> >> >> >>>> >> > 40d46'28.35"N)
>> >> >> >>>> >> > Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
>> >> >> >>>> >> >   NoData Value=255
>> >> >> >>>> >> >   Image Structure Metadata:
>> >> >> >>>> >> >     NBITS=1
>> >> >> >>>> >> >   Color Table (RGB with 2 entries)
>> >> >> >>>> >> >     0: 255,255,255,255
>> >> >> >>>> >> >     1: 0,0,0,255
>> >> >> >>>> >> >
>> >> >> >>>> >> > I used the mosaic plugin to load them in geoserver 1.7.2.
>> >> >> >>>> >> > I
>> >> >> >>>> >> > can
>> >> >> >>>> >> > get
>> >> >> >>>> >> > a
>> >> >> >>>> >> > map
>> >> >> >>>> >> > with WMS request but there are some white strips at the
>> >> >> >>>> >> > borders
>> >> >> >>>> >> > of
>> >> >> >>>> >> > each
>> >> >> >>>> >> > file. Original files have overlapping areas that are
>> >> >> >>>> >> > white. I
>> >> >> >>>> >> > would
>> >> >> >>>> >> > like
>> >> >> >>>> >> > to
>> >> >> >>>> >> > set the white pixel to transparent and so eliminate the
>> >> >> >>>> >> > stripes.
>> >> >> >>>> >> > I set the OutputTransparentColor field in the config of
>> >> >> >>>> >> > coverage
>> >> >> >>>> >> > to
>> >> >> >>>> >> > #FFFFFF
>> >> >> >>>> >> > but had no result.
>> >> >> >>>> >> > I tried to set also the InputTransparentColor filed to
>> >> >> >>>> >> > #FFFFFF
>> >> >> >>>> >> > value but
>> >> >> >>>> >> > I
>> >> >> >>>> >> > got an exception:
>> >> >> >>>> >> >
>> >> >> >>>> >> > 2009-02-06 17:09:16,335 ERROR [geotools.rendering] - -
>> >> >> >>>> >> > Unable
>> >> >> >>>> >> > to
>> >> >> >>>> >> > render
>> >> >> >>>> >> > RenderedOp for this operation.
>> >> >> >>>> >> > java.lang.RuntimeException: - Unable to render RenderedOp
>> >> >> >>>> >> > for
>> >> >> >>>> >> > this
>> >> >> >>>> >> > operation.
>> >> >> >>>> >> >         at
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
>> >> >> >>>> >> >         at
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
>> >> >> >>>> >> >         at
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > javax.media.jai.RenderedOp.getColorModel(RenderedOp.java:2242)
>> >> >> >>>> >> > ...
>> >> >> >>>> >> >
>> >> >> >>>> >> > Should I use RasterSymbolizer?
>> >> >> >>>> >> > Thanks a lot for any hint
>> >> >> >>>> >> >
>> >> >> >>>> >> > Stefano Iacovella
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >> > ------------------------------------------------------------------------------
>> >> >> >>>> >> > Create and Deploy Rich Internet Apps outside the browser
>> >> >> >>>> >> > with
>> >> >> >>>> >> > Adobe(R)AIR(TM)
>> >> >> >>>> >> > software. With Adobe AIR, Ajax developers can use existing
>> >> >> >>>> >> > skills
>> >> >> >>>> >> > and
>> >> >> >>>> >> > code
>> >> >> >>>> >> > to
>> >> >> >>>> >> > build responsive, highly engaging applications that
>> >> >> >>>> >> > combine
>> >> >> >>>> >> > the
>> >> >> >>>> >> > power of
>> >> >> >>>> >> > local
>> >> >> >>>> >> > resources and data with the reach of the web. Download the
>> >> >> >>>> >> > Adobe
>> >> >> >>>> >> > AIR SDK
>> >> >> >>>> >> > and
>> >> >> >>>> >> > Ajax docs to start building applications
>> >> >> >>>> >> > today-http://p.sf.net/sfu/adobe-com
>> >> >> >>>> >> > _______________________________________________
>> >> >> >>>> >> > Geoserver-users mailing list
>> >> >> >>>> >> > [hidden email]
>> >> >> >>>> >> >
>> >> >> >>>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >> >>>> >> >
>> >> >> >>>> >> >
>> >> >> >>>> >
>> >> >> >>>> >
>> >> >> >>>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > ------------------------------------------------------------------------------
>> >> >> > Create and Deploy Rich Internet Apps outside the browser with
>> >> >> > Adobe(R)AIR(TM)
>> >> >> > software. With Adobe AIR, Ajax developers can use existing skills
>> >> >> > and
>> >> >> > code
>> >> >> > to
>> >> >> > build responsive, highly engaging applications that combine the
>> >> >> > power
>> >> >> > of
>> >> >> > local
>> >> >> > resources and data with the reach of the web. Download the Adobe
>> >> >> > AIR
>> >> >> > SDK
>> >> >> > and
>> >> >> > Ajax docs to start building applications
>> >> >> > today-http://p.sf.net/sfu/adobe-com
>> >> >> > _______________________________________________
>> >> >> > Geoserver-users mailing list
>> >> >> > [hidden email]
>> >> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >> >
>> >> >> >
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> >
>> >> > _______________________________________________
>> >> > Geoserver-users mailing list
>> >> > [hidden email]
>> >> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >> >
>> >> >
>> >
>> >
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users