[mapserver-users] Postgres call 2 GetCapabilities attribute listing.

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Jan 10 08:50:57 PST 2017


Hi Bob,

I personally think you are over-complicating this: if you have full 
access to the PG instance, it's easiest to have your form submit a short 
PHP script (mapscript isn't even needed) that executes a "pg_query" 
returning your distinct column names.

That's the easiest way.

If you must stick with WMS etc, you could use a mapscript wrapper to 
capture something like a GetFeatureInfo request (that lists all 
attributes) and populate your form (see wrapper doc 
http://mapserver.org/ogc/mapscript.html).

But if this was me I would create a short pg_query script.

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2017-01-10 11:52 AM, Basques, Bob (CI-StPaul) wrote:
> All,
>
> Anyone have an example of how to set up a postgres call in mapfile that
> is used to output a GetCapabilities attribute listing?  I think I said
> that correctly.  :c)
>
> I have a layer set up as a WMS service from Postgres, I want to provide
> a GetCapabilities result for a “select distinct column” call to populate
> a layering filtering form.  Is this even a WMS thing?
>
> I anticipate that this particular set of unqiue values will be added to
> over time in the database and thus without my knowing it.  I think I
> could generate a SLD on the fly with the list as a call result, but that
> seems overly complicated for some reason.
>
> Maybe this is a DescribeLayer function??  Or do I need to move to a WFS
> service?
>
> Thanks
>
> bobb
>
>
>
>








More information about the mapserver-users mailing list