[Geoserver-users] Unwanted black background for partial mosaic raster coverage

Hi,

I have a shapefile that only partially covers its BBOX with raster tiles.
The rest is rendered black by Geoserver, and I need it white.

I tried to play with input/output transparent colors, WMS BGCOLOR, it works
only if the WMS BBOX contains some data, otherwise Geoserver still returns
black.

This black color becomes a problem when trying to superpose layers.

How can one change this "no data" color ?

Best regards,

Guillaume
--
View this message in context: http://www.nabble.com/Unwanted-black-background-for-partial-mosaic-raster-coverage-tp20620083p20620083.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao Guillame,
in the coverageeditor page for the mosaic there should be at the end
various parameters.
Put #000000 in the output transparency box.

Simone.
-------------------------------------------------------
Eng. 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, Nov 21, 2008 at 1:21 PM, G. Lathoud <glathoud@anonymised.com> wrote:

Hi,

I have a shapefile that only partially covers its BBOX with raster tiles.
The rest is rendered black by Geoserver, and I need it white.

I tried to play with input/output transparent colors, WMS BGCOLOR, it works
only if the WMS BBOX contains some data, otherwise Geoserver still returns
black.

This black color becomes a problem when trying to superpose layers.

How can one change this "no data" color ?

Best regards,

Guillaume
--
View this message in context: http://www.nabble.com/Unwanted-black-background-for-partial-mosaic-raster-coverage-tp20620083p20620083.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Well, it was working fine a few days ago.

I have a geoserver with two layers in it. GetFeatureInfo was working
fine a couple of days back, but now it fails on one of the layers. The
layer that is working ok, when I ask for feature info (in response to a
mouse click), returns a chunk of JavaScript that looks like this:

{
  "features":
  [
    {
      "fid":"imcra4_pb_wgs_1984.22",
      "fname":"imcra4_pb_wgs_1984",
      "fdesc":"IMCRA",
      "data":
      {
        "name":"Central Western Province",
        "code":"6",
        "code_field":"PB_NUM"
      }
    },
    {
      "fid":"imcra4_pb_wgs_1984.27",
      "fname":"imcra4_pb_wgs_1984",
      "fdesc":"IMCRA",
      "data": {
        "name":"Southwest Shelf Transition",
        "code":"30",
        "code_field":"PB_NUM"
      }
    }
  ]
}

We do a javascript "eval" and determine that the user has selected IMCRA
regions 6 and 30. No worries.

But when I send a nearly identical request, executed by the same code,
for the IBRA layer, this stuff that used to work before is now returning
an HTML page with a table. Is there any reason why the two responses
should be so different?

------
If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments.

Please consider the environment before printing this email.

------

Hi Simone,

thanks for the answer. This works great as long as the WMS BBOX contains
raster data:
*
http://www.nabble.com/file/p20656901/Geoserver-1.7.0-incomplete-raster-bug.jpg
Geoserver-1.7.0-incomplete-raster-bug.jpg
*
http://www.nabble.com/file/p20656901/Geoserver-1.7.0-incomplete-raster-bug-2.jpg
Geoserver-1.7.0-incomplete-raster-bug-2.jpg

But as soon as you have no raster data, the result is all black (it should
be all white):
http://www.nabble.com/file/p20656901/Geoserver-1.7.0-incomplete-raster-bug-3.jpg
Geoserver-1.7.0-incomplete-raster-bug-3.jpg

That may be a bug, or did I miss something?

Thanks,

Guillaume

Simone Giannecchini wrote:

Ciao Guillame,
in the coverageeditor page for the mosaic there should be at the end
various parameters.
Put #000000 in the output transparency box.

Simone.
-------------------------------------------------------
Eng. 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, Nov 21, 2008 at 1:21 PM, G. Lathoud <glathoud@anonymised.com> wrote:

Hi,

I have a shapefile that only partially covers its BBOX with raster tiles.
The rest is rendered black by Geoserver, and I need it white.

I tried to play with input/output transparent colors, WMS BGCOLOR, it
works
only if the WMS BBOX contains some data, otherwise Geoserver still
returns
black.

This black color becomes a problem when trying to superpose layers.

How can one change this "no data" color ?

Best regards,

Guillaume
--
View this message in context:
http://www.nabble.com/Unwanted-black-background-for-partial-mosaic-raster-coverage-tp20620083p20620083.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Unwanted-black-background-for-partial-mosaic-raster-coverage-tp20620083p20656901.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Murray, Paul ha scritto:

Well, it was working fine a few days ago.

I have a geoserver with two layers in it. GetFeatureInfo was working
fine a couple of days back, but now it fails on one of the layers. The
layer that is working ok, when I ask for feature info (in response to a
mouse click), returns a chunk of JavaScript that looks like this:

{
  "features":
  [ {
      "fid":"imcra4_pb_wgs_1984.22", "fname":"imcra4_pb_wgs_1984", "fdesc":"IMCRA", "data": { "name":"Central Western Province", "code":"6", "code_field":"PB_NUM" } }, {
      "fid":"imcra4_pb_wgs_1984.27", "fname":"imcra4_pb_wgs_1984", "fdesc":"IMCRA", "data": { "name":"Southwest Shelf Transition", "code":"30", "code_field":"PB_NUM" } } ]
}

We do a javascript "eval" and determine that the user has selected IMCRA
regions 6 and 30. No worries.

But when I send a nearly identical request, executed by the same code,
for the IBRA layer, this stuff that used to work before is now returning
an HTML page with a table. Is there any reason why the two responses
should be so different?

Well, the first response is JSON, the second is 'text/html' proper...
I'm really wondering how can you get the first, we don't have
a GetFeatureInfo JSON output that I know of?
The HTML table is the only proper answer that I know of for output
format 'text/html', the other is something new to me... what you get
in that json output is not even simple features... Are you using
a non official GeoServer release with custom tweaks?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Well, the first response is JSON, the second is 'text/html' proper...
I'm really wondering how can you get the first, we don't have a

GetFeatureInfo JSON output that I know of?

The HTML table is the only proper answer that I know of for output

format 'text/html', the other is something new to me... what you get in
that json output is not >even simple features... Are you using a non
official GeoServer release with custom tweaks?

It's entirely possible. I don't want to have to ferret about in the
internals of the geoserver - I thik the way forward at this point is to
ask for plain text and parse it with a regular expression.

------
If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments.

Please consider the environment before printing this email.

------

Hey Paul,

If someone else set up your first layer, it might be that someone used GetFeatureInfo templates to generate JSON from a layer.

Here’s a general reference:
http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates

If you look in your installation, it’s possible that there’s a header.ftl like this:

{
“features”:
[

and a footer.ftl like this:

]
}

and a content.ftl that defines each of the individual feature javascript objects. I’d poke around and see if something like that has been created. I’ve used this concept to generate JSON responses to a GetFeatureInfo request in MapServer, but never using GeoServer – but I’d assume it would work just fine.

–j

On Sun, Nov 23, 2008 at 11:44 PM, Murray, Paul <Paul.Murray@anonymised.com> wrote:

Well, it was working fine a few days ago.

I have a geoserver with two layers in it. GetFeatureInfo was working
fine a couple of days back, but now it fails on one of the layers. The
layer that is working ok, when I ask for feature info (in response to a
mouse click), returns a chunk of JavaScript that looks like this:

{
“features”:
[
{
“fid”:“imcra4_pb_wgs_1984.22”,
“fname”:“imcra4_pb_wgs_1984”,
“fdesc”:“IMCRA”,
“data”:
{
“name”:“Central Western Province”,
“code”:“6”,
“code_field”:“PB_NUM”
}
},
{
“fid”:“imcra4_pb_wgs_1984.27”,
“fname”:“imcra4_pb_wgs_1984”,
“fdesc”:“IMCRA”,
“data”: {
“name”:“Southwest Shelf Transition”,
“code”:“30”,
“code_field”:“PB_NUM”
}
}
]
}

We do a javascript “eval” and determine that the user has selected IMCRA
regions 6 and 30. No worries.

But when I send a nearly identical request, executed by the same code,
for the IBRA layer, this stuff that used to work before is now returning
an HTML page with a table. Is there any reason why the two responses
should be so different?


If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments.

Please consider the environment before printing this email.



This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


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

Thanks all - I have a solution now (after freaking out breifly) and it’s fine. I even managed to fix a couple of outstanding bugs in the app, seeing as I was poking around in that area.


From: josh.marcus@anonymised.com [mailto:josh.marcus@anonymised.com] On Behalf Of Josh Marcus
Sent: Tuesday, 25 November 2008 2:44 PM
To: Murray, Paul
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] GetFeatureInfo - INFO_FORMAT: ‘text/html’ [SEC=UNCLASSIFIED]

Hey Paul,

If someone else set up your first layer, it might be that someone used GetFeatureInfo templates to generate JSON from a layer.

Here’s a general reference:
http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates

If you look in your installation, it’s possible that there’s a header.ftl like this:

{
“features”:
[

and a footer.ftl like this:

]
}

and a content.ftl that defines each of the individual feature javascript objects. I’d poke around and see if something like that has been created. I’ve used this concept to generate JSON responses to a GetFeatureInfo request in MapServer, but never using GeoServer – but I’d assume it would work just fine.

–j

On Sun, Nov 23, 2008 at 11:44 PM, Murray, Paul <Paul.Murray@anonymised.com> wrote:

Well, it was working fine a few days ago.

I have a geoserver with two layers in it. GetFeatureInfo was working
fine a couple of days back, but now it fails on one of the layers. The
layer that is working ok, when I ask for feature info (in response to a
mouse click), returns a chunk of JavaScript that looks like this:

{
“features”:
[
{
“fid”:“imcra4_pb_wgs_1984.22”,
“fname”:“imcra4_pb_wgs_1984”,
“fdesc”:“IMCRA”,
“data”:
{
“name”:“Central Western Province”,
“code”:“6”,
“code_field”:“PB_NUM”
}
},
{
“fid”:“imcra4_pb_wgs_1984.27”,
“fname”:“imcra4_pb_wgs_1984”,
“fdesc”:“IMCRA”,
“data”: {
“name”:“Southwest Shelf Transition”,
“code”:“30”,
“code_field”:“PB_NUM”
}
}
]
}

We do a javascript “eval” and determine that the user has selected IMCRA
regions 6 and 30. No worries.

But when I send a nearly identical request, executed by the same code,
for the IBRA layer, this stuff that used to work before is now returning
an HTML page with a table. Is there any reason why the two responses
should be so different?


If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments.

Please consider the environment before printing this email.



This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


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


If you have received this transmission in error please notify us immediately by return e-mail and delete all copies. If this e-mail or any attachments have been sent to you in error, that error does not constitute waiver of any confidentiality, privilege or copyright in respect of information in the e-mail or attachments.

Please consider the environment before printing this email.

Josh Marcus ha scritto:

Hey Paul,
If someone else set up your first layer, it might be that someone used GetFeatureInfo templates to generate JSON from a layer.

Aaah, right, did not think about this option. Yeah, it would have
the wrong mime type but with those you can generate basically whatever
text format you want (and an ajax request from the browser won't probably mind about the mime type anyways).

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.