[Geoserver-users] Getcapabilities parameters from layers and from features

Hi all!
is it possible to make a get capabilities request and get only one parameter like the bounding box?
I was thinking in something like:
http://localhost:8080/geoserver/UTM/ows?service=WFS&version=1.0.0&request=GetCapabilities&layers=mylayer&ask here for the bounding box

And is it possible to make this same request to a feature in a WFS service? I would like to get only the bounding box of a certain feature in a layer

http://localhost:8080/geoserver/UTM/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=MYLAYER&FEATURE_ID=ID& ask here for the bounding box

Thank you very much for your help!

xrayo,

look at the bounds function from WPS. You can perform your WFS query and
chain that call to the bounds function.

Thanks

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

Hi!
thanks for your answer! I have checked and installed the WPS extension and it looks that it does exactly what I need!
I have used the demo request builder and can get the XML and the values of the bounds but still don’t know how to construct the proper URL. Do you know if that is possible?
I have tried with this one but still not working. I must be missing something.

http://localhost:8080/geoserver/UTM/ows?service=WPS&version=1.0.0&request=GetCapabilities&identifier=gs:bounds&typeName=UTM:CSR

When I use the request builder I get this xml as request:

<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)" xmlns="[http://www.opengis.net/wps/1.0.0](http://www.opengis.net/wps/1.0.0)" xmlns:wfs="[http://www.opengis.net/wfs](http://www.opengis.net/wfs)" xmlns:wps="[http://www.opengis.net/wps/1.0.0](http://www.opengis.net/wps/1.0.0)" xmlns:ows="[http://www.opengis.net/ows/1.1](http://www.opengis.net/ows/1.1)" xmlns:gml="[http://www.opengis.net/gml](http://www.opengis.net/gml)" xmlns:ogc="[http://www.opengis.net/ogc](http://www.opengis.net/ogc)" xmlns:wcs="[http://www.opengis.net/wcs/1.1.1](http://www.opengis.net/wcs/1.1.1)" xmlns:xlink="[http://www.w3.org/1999/xlink](http://www.w3.org/1999/xlink)" xsi:schemaLocation="[http://www.opengis.net/wps/1.0.0](http://www.opengis.net/wps/1.0.0) [http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd](http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd)">
  <ows:Identifier>vec:Bounds</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>features</ows:Identifier>
      <wps:Reference mimeType="text/xml" xlink:href="[http://geoserver/wfs](http://geoserver/wfs)" method="POST">
        <wps:Body>
          <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:UTM="UTM">
            <wfs:Query typeName="UTM:HES_CRUISES"/>
          </wfs:GetFeature>
        </wps:Body>
      </wps:Reference>
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
    <wps:RawDataOutput>
      <ows:Identifier>bounds</ows:Identifier>
    </wps:RawDataOutput>
  </wps:ResponseForm>
</wps:Execute>
Thank you very much!

El mar., 26 may. 2020 a las 19:34, Olyster (<gagnon_olivier@anonymised.com>) escribió:

xrayo,

look at the bounds function from WPS. You can perform your WFS query and
chain that call to the bounds function.

Thanks


Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

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

Hi,

you have to post the XML to the geoserver's wps endpoint
(http://server:8080/geoserver/wps)

In the WPS query builder, choose REFERENCE and type your WFS.

Have alook at the WFS documentation to find the parameters you need.

Almost there ! Good luck !

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

Hi Oliver!
tahnks for your help but I still haven’t make it work. I can’t find how to declare the input features.

http://localhost:8080/geoserver/UTM/ows?Request=Execute&service=WPS&version=1.0.0&Identifier=gs:Bounds&Typename=“UTM:CSR”

When I execute the bounds process, I get this xml:

<wps:ExecuteResponse xmlns:xs=“http://www.w3.org/2001/XMLSchema” xmlns:ows=“http://www.opengis.net/ows/1.1” xmlns:wps=“http://www.opengis.net/wps/1.0.0” xmlns:xlink=“http://www.w3.org/1999/xlink” xml:lang=“en” service=“WPS” serviceInstance=“http://localhost:8080/geoserver/UTM/ows?” version=“1.0.0”>

<wps:Process wps:processVersion=“1.0.0”>

ows:Identifiergs:Bounds</ows:Identifier>
ows:TitleBounds</ows:Title>
ows:AbstractComputes the bounding box of the input features.</ows:Abstract>

</wps:Process>

<wps:Status creationTime=“2020-05-28T07:37:33.009Z”>

wps:ProcessFailed

<ows:ExceptionReport version=“1.1.0”>

<ows:Exception exceptionCode=“NoApplicableCode”>

ows:ExceptionTextProcess failed during execution Parameter features is missing but has min multiplicity > 0</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

</wps:ProcessFailed>

</wps:Status>

</wps:ExecuteResponse>

I guess it’s something with the declaration of the layer but I have tried it in many different way and still can’t find it.

Any idea?

thanks!

El mié., 27 may. 2020 a las 17:24, Olyster (<gagnon_olivier@anonymised.com>) escribió:

Hi,

you have to post the XML to the geoserver’s wps endpoint
(http://server:8080/geoserver/wps)

In the WPS query builder, choose REFERENCE and type your WFS.

Have alook at the WFS documentation to find the parameters you need.

Almost there ! Good luck !


Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

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

First:

gs:bounds is deprecated
Maybe you’re looking for vec:bounds?

Second:
You should use a POST request with XML body and not a GET url because it’s juts not practical…
https://docs.geoserver.org/stable/en/user/services/wps/operations.html#execute

Check “WPS Request Builder” page on your geoserver GUI

chrome-capture (14).jpg

you can generate example WPS POST requests with features from vector layers, geojson, etc…just click “generate XML from process inputs/outputs”

XAVIER RAYO SARRIAS <xrayo@anonymised.com> escreveu no dia quinta, 28/05/2020 à(s) 08:41:

···

www.vfonsecaz.pt

xrayo,

here it is all done for you.

modify this to your environment :

<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0"
service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns="http://www.opengis.net/wps/1.0.0&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:wps="http://www.opengis.net/wps/1.0.0&quot;
xmlns:ows="http://www.opengis.net/ows/1.1&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:wcs="http://www.opengis.net/wcs/1.1.1&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd&quot;&gt;
  <ows:Identifier>gs:Bounds</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>features</ows:Identifier>
      <wps:Reference mimeType=&quot;application/json&quot;
xlink:href=&quot;http://&lt;b>SERVER*:8080/geoserver/*WORKSPACE*/ows?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typeName=*WORKSPACE:LAYERNAME*&amp;outputFormat=application%2Fjson&amp;"
method="GET"/>
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
    <wps:RawDataOutput>
      <ows:Identifier>bounds</ows:Identifier>
    </wps:RawDataOutput>
  </wps:ResponseForm>
</wps:Execute>

and post this to wps endpoint (http://localhost:8080/geoserver/wps)

not to :

http://localhost:8080/geoserver/UTM/ows?Request=Execute&service=WPS&version=1.0.0&Identifier=gs:Bounds&Typename=&quot;UTM:CSR&quot;

--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html