Hi Norm You could do good use of org.geoserver.ows.Dispatcher and KVP API on geoserver codebase. For example if you want to get a parameter with name STUFF you could get it doing: Request req = Dispatcher.REQUEST.get(); Map<?, ?> kvp = req.getKvp(); String user = (String)kvp.get("STUFF"); This is the simplest example getting parameters as String and handling data type parsing by manual code without parameter standardization. Note that Dispatcher request is a threadlocal so you need to execute it in http request thread boundary.
Regards, Fernando Mino == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Fernando Mino Software Engineer GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail. From "normanbobroff" bobr...@us.ibm.com To geoserver-users@lists.sourceforge.net Cc Date Tue, 15 Jan 2019 08:21:19 -0700 (MST) Subject [Geoserver-users] Enable Geoserver extension to receive a custom query parameter from WMS frontend URL request Hi, We are developing a Geoserver extension to provide real time raster image data from IBM PAIRS (ibmpairs.mybluemix.net) repository. My extension/plugin registers an implementation of org.geotools.coverage.grid.io.GridFormatFactorySpi and provides a customized extension of org.geotools.coverage.grid.io.AbstractGridCoverage2DReader. I can create a Geoserver store and publish a create a layer. Using a front end (e.g. Geoserver 'Layer preview-> openlayers' a WMS request is sent to Geoserver which ends up invoking my plugins @Override public GridCoverage2D read(GeneralParameterValue[] params) { .......}. ( For example: .../geoserver/pairs/wms?service=WMS&version=1.1.0&request=GetMap&layers=pairs%3Apairspluginlayer&bbox=-80%2C30%2C-70%2C40.0&width=768&height=384&srs=EPSG%3A4326&format=application/openlayers I return a GridCoverage2D and the image is rendered. Where I need help is that for our application we need to add an extra query parameter to the WMS Geoserver request that makes it into the method GridCoverage2D read(GeneralParameterValue[] params). For example with a query parameter IBMPAIRS: ....&width=768&height=384&srs=EPSG%3A4326&format=application/openlayers&IBMPAIRS={"timerange":[...],"aggregation":"min"} I need to get the value of IBMPAIRS from the query string as a param in read(). But when read(GeneralParameterValue[] params) is invoked I can't get the original (rawkvp) query string, and its not in the params argument. Also, the bottom of the call stack on entry to read(....params) has a some method like WebMap run(GetMapRequest request), but when I examine the request object it seems you have already preprocessed all the known or expected query parameters off the original query. So how do we add a new parameter, or do you have an existing parameter I could set in the query string that would make it through? Thanks, Norm (bobr...@us.ibm.com) -- 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: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html 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
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html 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