Dear all,

 

I am new to this developers list. Hopefully, this question fits and you don’t 
ban me right away.

 

For OGC Testbed 17, I’d like to extend the existing OGC API Features community 
module to return an additional encoding. I’ve already figures out how to do 
that:

public class DCSGeoJSONGetFeatureResponse extends WFSGetFeatureOutputFormat {…}

and created a Bean for it.

 

But, the implementation needs additional parameters that are not part of the 
OGC API Features implementation. Now, I am scratching my head how to read the 
additional query parameters and process them…

 

The processing of the DCS specific response is done via the 

    @Override

    protected void write(

            FeatureCollectionResponse featureCollection, OutputStream output, 
Operation operation)

            throws IOException {…}

function. But the operation points to the GetFeatureRequest class created via 
the GetFeatureRequest class. And that class does not hold extra parameters ☹

 

So, I’ve tried to inject an APIDispatch class, but could not figure out how to 
link it to my Response processing. 

 

Also, I’ve tried to override the FeatureService with my own controller. The 
code for the FeatureService is the following:

    @GetMapping(path = "collections/{collectionId}/items", name = "getFeatures")

    @ResponseBody

    @DefaultContentType(RFCGeoJSONFeaturesResponse.MIME)

    public FeaturesResponse items(

            @PathVariable(name = "collectionId") String collectionId,

            @RequestParam(name = "startIndex", required = false, defaultValue = 
"0")

                    BigInteger startIndex,

            @RequestParam(name = "limit", required = false) BigInteger limit,

            @RequestParam(name = "bbox", required = false) String bbox,

            @RequestParam(name = "bbox-crs", required = false) String bboxCRS,

            @RequestParam(name = "datetime", required = false) String datetime,

            @RequestParam(name = "filter", required = false) String filter,

            @RequestParam(name = "filter-lang", required = false) String 
filterLanguage,

            @RequestParam(name = "crs", required = false) String crs,

            String itemId)

            throws Exception {

 

I’ve extended that in my own controller with adding additional parameters. But 
it seems that overriding the 

@GetMapping(path = "collections/{collectionId}/items", name = "getFeatures")

in my own controller is not allowed as MVC only allows one Controller at a 
given path…

 

Please help! How could the override of the FeatureCollectionResponse.write() 
function read additional parameters (“key_challenge” and “key_challenge_method” 
in my case) from the request? Example URL:

http://localhost:8000/geoserver/ogc/features/collections/topp:states/items?key_challenge=foobar&key_challenge_method=plain&f=application%2Fdcs%2Bgeo&limit=1

 

Any help or pointers would be greatly appreciated!

 

Thank you,

Andreas

_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to