<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 Jukka,
<div class=""><br class="">
</div>
<div class="">Yeah, I was just reading up on WFS stuff when this came in.
<div class=""><br class="">
</div>
<div class="">Actually, we’re all set up with WFS already, we set up both WMS and WFS by default, but the WMS is a more generic config that encompasses all our layers, where the WFS config, are set up per layer.  Just a little bit more painful to do.</div>
<div class=""><br class="">
</div>
<div class="">Most of this question is just me trying to do things the hard way.  While the WFS configuration isn’t as generic, maybe that’s not as bad as I’m thinking it might be.</div>
<div class=""><br class="">
</div>
<div class="">bobb</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jan 10, 2017, at 11:29 AM, Rahkonen Jukka (MML) <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" class="">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta content="text/html; charset=utf-8" class="">
<div class="" style="word-wrap:break-word">
<div class="">
<div style="font-family:Calibri,sans-serif; font-size:11pt" class="">I would activate WFS and send DescribeFeatureType for reading the schema. No need to support other WFS request. All you need is less than ten new metadata lines in your mapfile and you can
 make Mapserver to publish both the column names and their data types.<br class="">
<br class="">
-Jukka Rahkonen-</div>
</div>
<div dir="ltr" class="">
<hr class="">
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold" class="">Lähettäjä:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt" class=""><a href="mailto:bob.basques@ci.stpaul.mn.us" class="">Basques, Bob (CI-StPaul)</a></span><br class="">
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold" class="">Lähetetty:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt" class="">‎10.‎1.‎2017 19:11</span><br class="">
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold" class="">Vastaanottaja:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt" class=""><a href="mailto:jmckenna@gatewaygeomatics.com" class="">Jeff McKenna</a></span><br class="">
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold" class="">Kopio:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt" class=""><a href="mailto:mapserver-users@lists.osgeo.org" class="">mapserver-users@lists.osgeo.org</a></span><br class="">
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold" class="">Aihe:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt" class="">Re: [mapserver-users] Postgres call 2 GetCapabilities attribute listing.</span><br class="">
<br class="">
</div>
<div 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 class="">
<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="">
<a href="mailto:mapserver-users@lists.osgeo.org" class="">mapserver-users@lists.osgeo.org</a><br class="">
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" class="">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div class="" style="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;">
<br class="Apple-interchange-newline">
<br class="">
</div>
<div class="" style="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;">
<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>
</div>
</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="">"Give me chastity and continence, but not yet."</dt><dd class="">- Saint Augustine
<div class=""><br class="">
</div>
</dd></div>
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
</body>
</html>