[Geoserver-users] Average of pixel values within a bounded region

Hi,

I have a map with a coverage layer, and feature layer (national boundaries from a shape file). I can display this map using OpenLayers. I need to be able to click on a country, and get back the average of the pixel values in the coverage within the national boundary. How would I go about this? I've been goolgling around, and looking at the GeoServer docs and the GeoTools javadocs, but I haven't been able to find the right starting point.

Thanks for any suggestions!

Greg

--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| greg@anonymised.com
| 360.774.6848
|

Greg Ederer ha scritto:

Hi,

I have a map with a coverage layer, and feature layer (national boundaries from a shape file). I can display this map using OpenLayers. I need to be able to click on a country, and get back the average of the pixel values in the coverage within the national boundary. How would I go about this? I've been goolgling around, and looking at the GeoServer docs and the GeoTools javadocs, but I haven't been able to find the right starting point.

Well, hard to find an answer when there is none :slight_smile:
What you're trying to do is processing, which in OGC is handled by
the WPS specification. I'm looking into it right not, and some time
in the future we might have the functionality you're looking for,
but I have no idea when that will be available, as my work on WPS
is strictly on personal time. What I can tell with good confidence
is that we won't have any such functionality for at least a couple
of month, probably more.

Cheers
Andrea

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

Hi Andrea,

That's interesting. The WPS specification is on my reading list.

In the mean time, I suppose that I will have to come up with some kind of temporary solution. Though it's a bit off topic, do you have any suggestions as to how I might use GeoTools to get the pixel values within a geometry? I was thinking that org.opengis.coverage.Coverage.select() might be a way to go. Or, perhaps I will need to use JAI to do this. I would be grateful for any suggestions you might have.

Thanks!

Greg

Andrea Aime wrote:

Greg Ederer ha scritto:

Hi,

I have a map with a coverage layer, and feature layer (national boundaries from a shape file). I can display this map using OpenLayers. I need to be able to click on a country, and get back the average of the pixel values in the coverage within the national boundary. How would I go about this? I've been goolgling around, and looking at the GeoServer docs and the GeoTools javadocs, but I haven't been able to find the right starting point.

Well, hard to find an answer when there is none :slight_smile:
What you're trying to do is processing, which in OGC is handled by
the WPS specification. I'm looking into it right not, and some time
in the future we might have the functionality you're looking for,
but I have no idea when that will be available, as my work on WPS
is strictly on personal time. What I can tell with good confidence
is that we won't have any such functionality for at least a couple
of month, probably more.

Cheers
Andrea

--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| greg@anonymised.com
| 360.774.6848
|

Hi Andrea,

That's interesting. The WPS specification is on my reading list.

In the mean time, I suppose that I will have to come up with some kind
of temporary solution. Though it's a bit off topic, do you have any
suggestions as to how I might use GeoTools to get the pixel values
within a geometry? I was thinking that
org.opengis.coverage.Coverage.select() might be a way to go. Or,
perhaps I will need to use JAI to do this. I would be grateful for any
suggestions you might have.

Thanks!

Greg

Andrea Aime wrote:

Greg Ederer ha scritto:

Hi,

I have a map with a coverage layer, and feature layer (national boundaries from a shape file). I can display this map using OpenLayers. I need to be able to click on a country, and get back the average of the pixel values in the coverage within the national boundary. How would I go about this? I've been goolgling around, and looking at the GeoServer docs and the GeoTools javadocs, but I haven't been able to find the right starting point.

Well, hard to find an answer when there is none :slight_smile:
What you're trying to do is processing, which in OGC is handled by
the WPS specification. I'm looking into it right not, and some time
in the future we might have the functionality you're looking for,
but I have no idea when that will be available, as my work on WPS
is strictly on personal time. What I can tell with good confidence
is that we won't have any such functionality for at least a couple
of month, probably more.

Cheers
Andrea

--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| greg@anonymised.com
| 360.774.6848
|