<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Thanks Tom - that pygeoapi pull request is good timing!<br></div><div><br></div><div>After reviewing and reading some of the associated documents, I'm planning to update the RFC with the notes below.<br></div><div><br></div><div>pygeoapi has implemented a JSON service for their homepage at [1] (pull request at [2].<br></div><div>This implements the api-catalog, a draft IETF (Internet Engineering Task Force) standard [3]. <br style="max-width:100%;height:auto;"></div><div>The Link Set format is described at [4]. It is proposed this approach is used to generate JSON for a MapServer "homepage". <br></div><div>The generated JSON format can be seen at <a href="https://demo.pygeoapi.io/api-catalog.json">https://demo.pygeoapi.io/api-catalog.json</a>, with an extract below:<br></div><div><br style="max-width:100%;height:auto;"></div><div>{<br style="max-width:100%;height:auto;"></div><div> "linkset": [<br style="max-width:100%;height:auto;"></div><div> {<br style="max-width:100%;height:auto;"></div><div> "anchor": "<a href="https://demo.pygeoapi.io/master">https://demo.pygeoapi.io/master</a>", <br style="max-width:100%;height:auto;"></div><div> "service-desc": [<br style="max-width:100%;height:auto;"></div><div> {<br style="max-width:100%;height:auto;"></div><div> "href": "<a href="https://demo.pygeoapi.io/master/openapi?f=json">https://demo.pygeoapi.io/master/openapi?f=json</a>", <br style="max-width:100%;height:auto;"></div><div> "title": "pygeoapi - latest GitHub 'master' version (JSON)", <br style="max-width:100%;height:auto;"></div><div> "type": "application/vnd.oai.openapi+json"<br style="max-width:100%;height:auto;"></div><div> }<br style="max-width:100%;height:auto;"></div><div> ], <br style="max-width:100%;height:auto;"></div><div> "service-doc": [<br style="max-width:100%;height:auto;"></div><div> {<br style="max-width:100%;height:auto;"></div><div> "href": "<a href="https://demo.pygeoapi.io/master/openapi?f=html">https://demo.pygeoapi.io/master/openapi?f=html</a>", <br style="max-width:100%;height:auto;"></div><div> "title": "pygeoapi - latest GitHub 'master' version (HTML)", <br style="max-width:100%;height:auto;"></div><div> "type": "text/html"<br style="max-width:100%;height:auto;"></div><div> }<br style="max-width:100%;height:auto;"></div><div> ]<br style="max-width:100%;height:auto;"></div><div> }, <br style="max-width:100%;height:auto;"></div><div><br style="max-width:100%;height:auto;"></div><div>The spec allows for an additional "service-meta" property "used to link to additional metadata about the API, <br style="max-width:100%;height:auto;"></div><div>and is primarily intended for machine consumption." I think this can be used to add any additional properties from Mapfiles<br style="max-width:100%;height:auto;"></div><div>we'd need to generate a MapServer homepage.<br style="max-width:100%;height:auto;"></div><div>"service-doc" isn't mandatory, so WxS service links can ignore this. An example of the proposed JSON and metadata is shown below:<br style="max-width:100%;height:auto;"></div><div><br style="max-width:100%;height:auto;"></div><div>{<br style="max-width:100%;height:auto;"></div><div> "linkset": [<br style="max-width:100%;height:auto;"></div><div> {<br style="max-width:100%;height:auto;"></div><div> "anchor": "<a href="https://demo.mapserver.org/">https://demo.mapserver.org/</a>", <br style="max-width:100%;height:auto;"></div><div> "service-desc": [<br style="max-width:100%;height:auto;"></div><div> {<br style="max-width:100%;height:auto;"></div><div> "href": "<a href="https://demo.mapserver.org/cgi-bin/msautotest?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities">https://demo.mapserver.org/cgi-bin/msautotest?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities</a>", <br style="max-width:100%;height:auto;"></div><div> "title": "World WMS service", <br style="max-width:100%;height:auto;"></div><div> "type": "text/xml"<br style="max-width:100%;height:auto;"></div><div> }<br style="max-width:100%;height:auto;"></div><div> ], <br style="max-width:100%;height:auto;"></div><div> "service-meta": {<br style="max-width:100%;height:auto;"></div><div> {<br style="max-width:100%;height:auto;"></div><div> "type": "wms",<br style="max-width:100%;height:auto;"></div><div> "title": "WMS demo server for MapServer, used in the msautotest suite",<br style="max-width:100%;height:auto;"></div><div> "keywords": ["layers", "list"],<br style="max-width:100%;height:auto;"></div><div> "mapfile": "msautotest.map",<br style="max-width:100%;height:auto;"></div><div> }<br style="max-width:100%;height:auto;"></div><div> }<br style="max-width:100%;height:auto;"></div><div> }, <br style="max-width:100%;height:auto;"></div><div><br style="max-width:100%;height:auto;"></div><div>Seth<br></div><div><br style="max-width:100%;height:auto;"></div><div>[1] <a href="https://demo.pygeoapi.io/">https://demo.pygeoapi.io/</a><br style="max-width:100%;height:auto;"></div><div>[2] <a href="https://github.com/geopython/demo.pygeoapi.io/pull/60/files">https://github.com/geopython/demo.pygeoapi.io/pull/60/files</a><br style="max-width:100%;height:auto;"></div><div>[3] <a href="https://datatracker.ietf.org/doc/draft-ietf-httpapi-api-catalog/08/">https://datatracker.ietf.org/doc/draft-ietf-httpapi-api-catalog/08/</a><br style="max-width:100%;height:auto;"></div><div>[4] <a href="https://www.rfc-editor.org/rfc/rfc9264.html">https://www.rfc-editor.org/rfc/rfc9264.html</a><br style="max-width:100%;height:auto;"></div><div><br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><br></div><div class="signature">mastodon: @<a href="mailto:geographika@mastodon.social">geographika@mastodon.social</a><br></div></div><div><br></div><div>On Sun, Jan 19, 2025, at 5:10 PM, Tom Kralidis wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Seth: thanks for this RFC. IETF has api-catalog (draft, [1]) which I think would be a good candidate for this RFC. This is also an item for review in the OGC API - Records SWG [2].<br></div><div><br></div><div>Overall it looks pretty close to the RFC proposal. We can consider using api-catalog as a baseline and we can extend the JSON accordingly as needed for anything specific to our needs.<br></div><div><br></div><div>Cheers<br></div><div><br></div><div>..Tom<br></div><div><br></div><div>[1] <a href="https://datatracker.ietf.org/doc/draft-ietf-httpapi-api-catalog">https://datatracker.ietf.org/doc/draft-ietf-httpapi-api-catalog</a><br></div><div dir="ltr">[2] <a href="https://github.com/opengeospatial/ogcapi-records/issues/355">https://github.com/opengeospatial/ogcapi-records/issues/355</a><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div class="qt-gmail_quote qt-gmail_quote_container"><div dir="ltr" class="qt-gmail_attr">On Sat, Jan 18, 2025 at 5:39 PM Seth G via MapServer-dev <<a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div>Looking again at the landing page JSON at <a href="https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi?f=json" rel="noreferrer" target="_blank">https://demo.mapserver.org/cgi-bin/mapserv/localdemo/ogcapi?f=json</a> it is in the same format, so as you suggested could simply be expanded with links to WxS services, or even CGI generated responses. This would also more easily allow template reuse. <br></div><div> <br></div><div> Seth<br></div><div> <br></div><div> --<br></div><div> web:<a href="https://geographika.net" rel="noreferrer" target="_blank">https://geographika.net</a> & <a href="https://mapserverstudio.net" rel="noreferrer" target="_blank">https://mapserverstudio.net</a><br></div><div> mastodon: @geographika@mastodon.social<br></div><div> <br></div><div> On Sat, Jan 18, 2025, at 11:33 PM, Seth G via MapServer-dev wrote:<br></div><div> > Hi Even,<br></div><div> ><br></div><div> > Thanks for your valuable feedback. <br></div><div> ><br></div><div> > The homepage would be a "superset" of all available Mapfiles in a <br></div><div> > MapServer deployment, as listed in the CONFIG file. Each individual <br></div><div> > Mapfile would still have its own OGC API landing page, so the homepage <br></div><div> > is best described as a directory of all landing pages. <br></div><div> ><br></div><div> > As most MapServer deployments will likely be serving out a combination <br></div><div> > of WxS and new OGC API services for some time to come, it will allow <br></div><div> > both types to be listed together (I'm unaware of a OGC API spec that <br></div><div> > would cover this). <br></div><div> ><br></div><div> > In regard to the JSON used for links, I was modelling it as closely as <br></div><div> > possible to OGC API conventions. Looking at the pygeoapi demo home <br></div><div> > page, it provides a set of links in a common format, so I'll likely <br></div><div> > switch to this format/approach:<br></div><div> ><br></div><div> > <a href="https://demo.pygeoapi.io/stable?f=json" rel="noreferrer" target="_blank">https://demo.pygeoapi.io/stable?f=json</a><br></div><div> ><br></div><div> > A few of the "rel" values are defined as below, and can be reused:<br></div><div> ><br></div><div> > alternate Provides an alternate representation (e.g., HTML version of a <br></div><div> > resource).<br></div><div> > service-desc Links to the machine-readable API description (e.g., <br></div><div> > OpenAPI JSON).<br></div><div> > service-doc Links to the human-readable API documentation (e.g., <br></div><div> > OpenAPI HTML).<br></div><div> > conformance Lists the standards and conformance classes supported by <br></div><div> > the API.<br></div><div> ><br></div><div> > I'll update the RFC with the above,<br></div><div> ><br></div><div> > Seth<br></div><div> ><br></div><div> > --<br></div><div> > web:<a href="https://geographika.net" rel="noreferrer" target="_blank">https://geographika.net</a> & <a href="https://mapserverstudio.net" rel="noreferrer" target="_blank">https://mapserverstudio.net</a><br></div><div> > mastodon: @geographika@mastodon.social<br></div><div> ><br></div><div> > On Sat, Jan 18, 2025, at 12:39 PM, Even Rouault wrote:<br></div><div> >> Seth,<br></div><div> >><br></div><div> >> Thanks for putting this together. I'm wondering how much your proposal <br></div><div> >> relates/intersects with the concept of the landing page of OGC API <br></div><div> >> services ? You mention some connection with it, but it is not <br></div><div> >> immediately clear to me the exact nature of the connection. Perhaps it <br></div><div> >> is just a matter of clarifying. I have put zero thoughts in it, but it <br></div><div> >> would feel weird to invent a MapServer specific thing, so I'm naively <br></div><div> >> wondering if we can't we just adopt the landing page formalism (for the <br></div><div> >> JSON part), and potentially extend it by exposing old WxS services as <br></div><div> >> well in the links as you suggest? I'm also wondering if there's some <br></div><div> >> best practice used by other projects on how to expose for things like<br></div><div> >><br></div><div> >> {<br></div><div> >> "href": <br></div><div> >> "<a href="https://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities" rel="noreferrer" target="_blank">https://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities</a>",<br></div><div> >> "title": "GetCapabilities",<br></div><div> >> "type": "WMS"<br></div><div> >> },<br></div><div> >><br></div><div> >> so they can be interoperably consumed.<br></div><div> >><br></div><div> >> Even<br></div><div> >><br></div><div> >> Le 18/01/2025 à 09:11, Seth G via MapServer-dev a écrit :<br></div><div> >>> Hi devs,<br></div><div> >>><br></div><div> >>> I've drafted an RFC with an approach of creating a MapServer homepage based on the MAPs referenced in a mapserver.conf file. This will allow MapServer installations to easily advertise available services, dynamically.<br></div><div> >>><br></div><div> >>> Text available in pull request at <a href="https://github.com/MapServer/MapServer-documentation/pull/996" rel="noreferrer" target="_blank">https://github.com/MapServer/MapServer-documentation/pull/996</a><br></div><div> >>><br></div><div> >>> Comments and thoughts appreciated,<br></div><div> >>> Thanks,<br></div><div> >>><br></div><div> >>> Seth<br></div><div> >>><br></div><div> >>> --<br></div><div> >>> web:<a href="https://geographika.net" rel="noreferrer" target="_blank">https://geographika.net</a> & <a href="https://mapserverstudio.net" rel="noreferrer" target="_blank">https://mapserverstudio.net</a><br></div><div> >>> mastodon: @geographika@mastodon.social<br></div><div> >>> _______________________________________________<br></div><div> >>> MapServer-dev mailing list<br></div><div> >>> <a href="mailto:MapServer-dev@lists.osgeo.org" target="_blank">MapServer-dev@lists.osgeo.org</a><br></div><div> >>> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br></div><div> >><br></div><div> >> -- <br></div><div> >> <a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br></div><div> >> My software is free, but my time generally not.<br></div><div> >> Butcher of all kinds of standards, open or closed formats. At the end, <br></div><div> >> this is just about bytes.<br></div><div> > _______________________________________________<br></div><div> > MapServer-dev mailing list<br></div><div> > <a href="mailto:MapServer-dev@lists.osgeo.org" target="_blank">MapServer-dev@lists.osgeo.org</a><br></div><div> > <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br></div><div> _______________________________________________<br></div><div> MapServer-dev mailing list<br></div><div> <a href="mailto:MapServer-dev@lists.osgeo.org" target="_blank">MapServer-dev@lists.osgeo.org</a><br></div><div> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br></div></blockquote></div></div></blockquote><div><br></div></body></html>