[Geoserver-users] Looking for some cookbook info [SEC=UNCLASSIFIED]

I’m having a bit of trouble navigating the geoserver documentation, and I was hoping someone could point me at the right spot.

Our geoserver has two map layers: topp:AUS1, containing australian states, and topp:ibra61_reg_shape, containing ibra (Interim Biographical Regionalisation of Australia) regions. These each contain a bunch of polygons, with properties containing codes.

At present, we have xml that works just fine for selecting a set if IBRA regions and producing a map. Let’s say a species occurs in IBRA regions FOO and BAR. The XML in the request looks like this:

topp:ibra61_reg_shape UserSelection REG_CODE FOO REG_CODE BAR etc

Now, our problem is that in our data, this species occurs in IBRA regions FOO and BAR, but I want these regions clipped by Australian state NSW.

It seems to me that the construct above won’t work - I need to work with two layers, not just one namedlayer. I think I need to make a UserLayer, and then compose it from the polygons in the named layers using intersections. I saw the “Intersects” spatial op - but that’s not what I’m after: it’s job seems to be to return a boolean indicating whther two regions intersect or not. I can’t find the stuff tha composites polygons at all, in fact: I searched the schemas for the word “union” but it wasn’t anywhere that looked like anything to do with polygons.

* *

I think what happens now is that I use the feature collection to specify features - which in my case are IBRA regions, potentially intersected with states. The feature constraints is not really needed at all. (The other way to do it would be to generate a list of all IBRA regions intersected with each state in my feature collection, and specify which ones I want in my feature constraints - but that’s not needed here.)

Or maybe I shouldn’t be using InlineFeature - maybe that’s for specifying polygons by listing the points in them. Maybe I Need to use RemoteOWS, but to somehow state that the remote OWS is actually local, but pull it from the combination of the two local layers. Or something.

In any case - I get a bit lost at this point, trying to work out how to specify that a feature is an intersection of two other features, each being a particular region from a particular layer. Frankly, the xsd is a little beyond me - it uses some stuff (substitution groups) that I am unfamilar with.

Is there a cookbook or something for building GetMap XML?


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.

Murray, Paul ha scritto:

I'm having a bit of trouble navigating the geoserver documentation, and I was hoping someone could point me at the right spot.

Our geoserver has two map layers: topp:AUS1, containing australian states, and topp:ibra61_reg_shape, containing ibra (Interim Biographical Regionalisation of Australia) regions. These each contain a bunch of polygons, with properties containing codes.

At present, we have xml that works just fine for selecting a set if IBRA regions and producing a map. Let's say a species occurs in IBRA regions FOO and BAR. The XML in the request looks like this:

<GetMap>
  <StyledLayerDescriptor>
    <NamedLayer>
      <Name>topp:ibra61_reg_shape</Name>
        <UserStyle>
          <Name>UserSelection</Name>
          <FeatureTypeStyle>
            <Rule>
              <Filter xmlns:gml=\"http://www.opengis.net/gml\\&quot;&gt;
                <Or>
                  <PropertyIsEqualTo>
                    <PropertyName>REG_CODE</PropertyName>
                    <Literal>FOO</Literal>
                  </PropertyIsEqualTo>
                  <PropertyIsEqualTo>
                    <PropertyName>REG_CODE</PropertyName>
                    <Literal>BAR</Literal>
                  </PropertyIsEqualTo>
                </Or>
              </Filter>
              <PolygonSymbolizer>
etc

Now, our problem is that in our data, this species occurs in IBRA regions FOO and BAR, but I want these regions clipped by Australian state NSW.

This is simply not possible. SLD only decides how to color the geometries, never changes the geometry. No matter what you do,
you won't be able to get that out of WMS.
The only OGC protocol that can do data transformations is WPS,
but we don't have a working implementation of it right now.

If you need that I suggest you precompute the clipping of all the IBRA
regions with the Australian state of choice (provided it's always the same) or build a view that does it on the fly and performs the clipping
of all IBRA regions against all states, and then you use a filter
against it to choose the state and the regions.
You can register database views as if they were normal tables, so this
is doable.

Hope this helps
Cheers
Andrea

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

Ok, thatks for all the replies.

As far as I can make out, the geoserver does not do this. The way to go is to prepare a map with regions sliced up as I am going to need them, and then to select those regions according to properties I add to them.


From: Murray, Paul [mailto:Paul.Murray@anonymised.com]
Sent: Tuesday, 18 November 2008 11:40 AM
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] Looking for some cookbook info [SEC=UNCLASSIFIED]

I’m having a bit of trouble navigating the geoserver documentation, and I was hoping someone could point me at the right spot.

Our geoserver has two map layers: topp:AUS1, containing australian states, and topp:ibra61_reg_shape, containing ibra (Interim Biographical Regionalisation of Australia) regions. These each contain a bunch of polygons, with properties containing codes.

At present, we have xml that works just fine for selecting a set if IBRA regions and producing a map. Let’s say a species occurs in IBRA regions FOO and BAR. The XML in the request looks like this:

topp:ibra61_reg_shape UserSelection REG_CODE FOO REG_CODE BAR etc

Now, our problem is that in our data, this species occurs in IBRA regions FOO and BAR, but I want these regions clipped by Australian state NSW.

It seems to me that the construct above won’t work - I need to work with two layers, not just one namedlayer. I think I need to make a UserLayer, and then compose it from the polygons in the named layers using intersections. I saw the “Intersects” spatial op - but that’s not what I’m after: it’s job seems to be to return a boolean indicating whther two regions intersect or not. I can’t find the stuff tha composites polygons at all, in fact: I searched the schemas for the word “union” but it wasn’t anywhere that looked like anything to do with polygons.

* *

I think what happens now is that I use the feature collection to specify features - which in my case are IBRA regions, potentially intersected with states. The feature constraints is not really needed at all. (The other way to do it would be to generate a list of all IBRA regions intersected with each state in my feature collection, and specify which ones I want in my feature constraints - but that’s not needed here.)

Or maybe I shouldn’t be using InlineFeature - maybe that’s for specifying polygons by listing the points in them. Maybe I Need to use RemoteOWS, but to somehow state that the remote OWS is actually local, but pull it from the combination of the two local layers. Or something.

In any case - I get a bit lost at this point, trying to work out how to specify that a feature is an intersection of two other features, each being a particular region from a particular layer. Frankly, the xsd is a little beyond me - it uses some stuff (substitution groups) that I am unfamilar with.

Is there a cookbook or something for building GetMap XML?


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.


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.

Murray, Paul ha scritto:

Ok, thatks for all the replies.
As far as I can make out, the geoserver does not do this.

True. Actually the statement is a little broader, standard WMS
and SLD implementations do not do that, if any server has that kind of
functionality, it's got to be a custom extension (I'm not aware of any)
over the OGC protocols (or not using the OGC protocols at all).

The way to go is to prepare a map with regions sliced up as I am going to need them, and then to select those regions according to properties I add to them.

Correct.
Cheers
Andrea

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