[Geoserver-users] Union function

All,

I'm trying to see the union of two layers via wms. When I try SLD_BODY=

<StyledLayerDescriptor>
  <NamedLayer>
  <Name>cei:breeding</Name>
    <UserStyle>
      <Name>myUnion</Name>
        <FeatureTypeStyle>
          <Rule>
            <Filter>
              <Function
name="union">
  
<PropertyIsEqualTo>
  
<PropertyName>sci_name</PropertyName>
  
<Literal>Accipiter cooperii</Literal>
  
</PropertyIsEqualTo>
  
<PropertyIsEqualTo>
  
<PropertyName>sci_name</PropertyName>
  
<Literal>Buteo jamaicensis</Literal>
  
</PropertyIsEqualTo>
              </Function>
            </Filter>
            <PolygonSymbolizer>
              <Fill>
  
<CssParameter name="fill">#fe9929</CssParameter>
  
<CssParameter name="fill-opacity">1</CssParameter>
              </Fill>
            </PolygonSymbolizer>
          </Rule>
        </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

I get the union of ALL the features in the layer; I just want to get the
union the polys where sci_name=species1 and sci_name=species2. Any ideas on
how I should write this query?

Thanks,
Steve

Stephen Crawford
Center for Environmental Informatics
GeoVISTA Center
The Pennsylvania State University
814.865.9905
src176@anonymised.com

I don't believe that function is built for unioning layers. It's just for doing a union of a geometry, I believe, from the JTS library. I could be wrong, but I just don't think you can call two layers at once for it.

I think that WMS is limited in this front, to do it in the OGC way I think would be to get a Web Processing Service to do the union, and then WMS of the results.

Chris

Stephen Crawford wrote:

All,

I'm trying to see the union of two layers via wms. When I try SLD_BODY=

<StyledLayerDescriptor>
  <NamedLayer>
  <Name>cei:breeding</Name> <UserStyle>
      <Name>myUnion</Name>
        <FeatureTypeStyle>
          <Rule> <Filter>
              <Function
name="union">
  
<PropertyIsEqualTo>
  
<PropertyName>sci_name</PropertyName>
  
<Literal>Accipiter cooperii</Literal>
  
</PropertyIsEqualTo>
  
<PropertyIsEqualTo>
  
<PropertyName>sci_name</PropertyName>
  
<Literal>Buteo jamaicensis</Literal>
  
</PropertyIsEqualTo>
              </Function> </Filter>
            <PolygonSymbolizer>
              <Fill>
  
<CssParameter name="fill">#fe9929</CssParameter>
  
<CssParameter name="fill-opacity">1</CssParameter> </Fill>
            </PolygonSymbolizer>
          </Rule> </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

I get the union of ALL the features in the layer; I just want to get the
union the polys where sci_name=species1 and sci_name=species2. Any ideas on
how I should write this query?

Thanks,
Steve

Stephen Crawford
Center for Environmental Informatics
GeoVISTA Center
The Pennsylvania State University
814.865.9905
src176@anonymised.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:1003,45f4526a7651804284693!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org