ok, i'm stumped. i can't figure out how to get parameters in a geoserver wms getmap URL pushed down into my ContentDataStore.
here is the URL i've been using.
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=us-woot&styles=&bbox=-124.731,24.956,-66.97,49.372&width=780&height=330&srs=EPSG:4326&format=application/openlayers&env=foobar:baz&namespace=fred.com&format_options=rabbit:cat
as you can see i've tried putting my own values at the end of the URL in env, namespace, and format_options, but i think i need to some how hint that i want this information passed into my store.
i suspect that if i did things properly, i could have some those values present int the query when:
ContentFeatureSource.getReaderInternal(Query query)
is called. looking at the Hints class it's not clear to me how i might signal interest in say the "env" values from my ContentDataStoreFactory. any ideas?
-trebor
ps - as you can see Jody Garnett had some clues, but i appear to be thick enough to be unable to work it out non-the-less.
On Jun 29, 2011, at 8:23 PM, Robert Harris wrote:
i'm digging through doc and code now on hints, and vender options. if i get stuck i'll head over towards geoserver-devel (which i've added back onto this thread).
you've been a huge help. thank you!
-trebor
On Jun 29, 2011, at 8:00 PM, Jody Garnett wrote:
Okay that is what the hints are for; but you need to look into the geoserver-devel mailing list and source code to see how the hints are handled.
From the geotools side of things:
a) I would view the "feature generalized" work as a good example of this where some explicit hints were defined; and the rendering system taught to use them in order to control the function of the the datastore.
b) GeoServer may also have some way to explicitly handle "vendor options" which it could pass down into the datastore as hints. As a client author I like to ask that vendor options are actually defined up front in the get capabilities document but this rarely happens).
Jody
On Thu, Jun 30, 2011 at 12:32 PM, Robert Harris <trebor@anonymised.com> wrote:
my setup:
i'm running an instance of geoserver into which i have installed my custom ContentDataStore. that store provides a layer of features which is composited together with other layers to produce a lovely map - which i can view by hitting that url (way down near the bottom of this thread). my custom store actually makes a call out to yet other service, which provides feature data to me in a very non-standard form. i also have a custom client which can add parameters, as needed, to the map url. in my particular case the client needs to indicate which feature data the backing service emits (as well as some authentication data).
i can't figure out how to get ahold of the parameters in the url (which i can see geoserver has, as it reports them in it's log) in my data store. would a hint help geoserver pass specific parameters down to my code?
-trebor
On Jun 29, 2011, at 7:02 PM, Jody Garnett wrote:
Well the client code is mostly in those initial connection parameters; and also when they make a Query.
Perhaps you could talk a bit more about what you are trying to accompish; right now the conversation is difficult for me as you are asking about ContentDataStore; but trying to use a GetMap request.
Perhaps you are asking GetMap to produce a small shapefile or sqlite database or something crazy which you can work with offline?
There is a Query "hint" map that can be used to pass random information in - but if is something that *all* code has to do then you would be in trouble. The rendering system won't know to pass in some magic hints that you always require for example.
Jody
On Thu, Jun 30, 2011 at 11:58 AM, Robert Harris <trebor@anonymised.com> wrote:
i assume this would happen in my implementation of DataStoreFactorySpi as that is what constructs my data store. two problems:
1. i can't figure out how to get a hold of the url data to parse up. do you know how i would get that data?
2. i think doing this in the factory is too early for my needs. my goal is to be able to pass parameters to my data store from the client. do you know if that is possible?
thanks for the help so far,
-trebor
On Jun 29, 2011, at 5:52 PM, Jody Garnett wrote:
Normally you would parse the "key value pairs" into a map and pass that into your datastore constructor. (Or in your constructor do the parsing).
On Thu, Jun 30, 2011 at 9:44 AM, Robert Harris <trebor@anonymised.com> wrote:
i have a good functioning data store derived from org.geotools.data.store.ContentDataStore. i can put features on a map in geoserver. woot! thanks for the help getting here.
now i'm trying to get access to parameters on the http get for the map from URLS like this:
http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=us-woot&styles=&bbox=-124.731,24.956,-66.97,49.372&width=780&height=330&srs=EPSG:4326&format=application/openlayers&foooooooo=baaaaaaaaaaar
is it possible to get access to "foooooooo"/"baaaaaaaaaaar" values way down in ContentDataStore?
thanks,
-trebor
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel