<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Jeff,
<div class=""><br class="">
</div>
<div class="">PHP = Yucky!!</div>
<div class=""><br class="">
</div>
<div class="">I was trying to go the route of all OGC calls.  The idea is to possibly expand on the options for configuring GeoMOOSE, where you would be able to configure a filtering process on a layer by layer basis.  I know I can make it all work by hardcoding
 things.  It’s just that the data is variable from the database (as it should be) and I wanted to be able to populate the distinct list upon query vs hardcoding it.</div>
<div class=""><br class="">
</div>
<div class="">The SLD path might be the best “OGC” based approach, but it end up as a two stage query this way.  I’m still investigating things.  Maybe I should just hardcode for the first pass and try some different approaches after the fact.  Hmm, a thought,
 I could use a Template populated from a SQL call for the list, but it’s not OGC anymore . . .</div>
<div class=""><br class="">
</div>
<div class="">I have many potential uses for this on a layer by layer basis.</div>
<div class=""><br class="">
</div>
<div class="">Thanks for the response.</div>
<div class=""><br class="">
</div>
<div class="">bobb</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jan 10, 2017, at 10:50 AM, Jeff McKenna <<a href="mailto:jmckenna@gatewaygeomatics.com" class="">jmckenna@gatewaygeomatics.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hi Bob,<br class="">
<br class="">
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.<br class="">
<br class="">
That's the easiest way.<br class="">
<br class="">
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
<a href="http://mapserver.org/ogc/mapscript.html" class="">http://mapserver.org/ogc/mapscript.html</a>).<br class="">
<br class="">
But if this was me I would create a short pg_query script.<br class="">
<br class="">
-jeff<br class="">
<br class="">
<br class="">
-- <br class="">
Jeff McKenna<br class="">
MapServer Consulting and Training Services<br class="">
<a href="http://www.gatewaygeomatics.com/" class="">http://www.gatewaygeomatics.com/</a><br class="">
<br class="">
<br class="">
<br class="">
On 2017-01-10 11:52 AM, Basques, Bob (CI-StPaul) wrote:<br class="">
<blockquote type="cite" class="">All,<br class="">
<br class="">
Anyone have an example of how to set up a postgres call in mapfile that<br class="">
is used to output a GetCapabilities attribute listing?  I think I said<br class="">
that correctly.  :c)<br class="">
<br class="">
I have a layer set up as a WMS service from Postgres, I want to provide<br class="">
a GetCapabilities result for a “select distinct column” call to populate<br class="">
a layering filtering form.  Is this even a WMS thing?<br class="">
<br class="">
I anticipate that this particular set of unqiue values will be added to<br class="">
over time in the database and thus without my knowing it.  I think I<br class="">
could generate a SLD on the fly with the list as a call result, but that<br class="">
seems overly complicated for some reason.<br class="">
<br class="">
Maybe this is a DescribeLayer function??  Or do I need to move to a WFS<br class="">
service?<br class="">
<br class="">
Thanks<br class="">
<br class="">
bobb<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</blockquote>
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
mapserver-users mailing list<br class="">
mapserver-users@lists.osgeo.org<br class="">
http://lists.osgeo.org/mailman/listinfo/mapserver-users</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: 'Comic Sans MS'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br class="Apple-interchange-newline">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); font-family: 'Comic Sans MS'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<dt class="">"Not everything that can be counted counts, and not everything that counts can be counted."</dt><dd class="">- Albert Einstein
<div class=""><br class="">
</div>
</dd></div>
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>