<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.Shkpostityyli18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1628388475;
        mso-list-template-ids:-680635544;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">About ows_* from
<a href="https://www.mapserver.org/ogc/wms_server.html">https://www.mapserver.org/ogc/wms_server.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#3E4349;background:white">(Note that each of the metadata below can also be referred to as ‘ows_*’ instead of ‘wms_*’. MapServer tries the ‘wms_*’ metadata first,
 and if not found it tries the corresponding ‘ows_*’ name. Using this reduces the amount of duplication in mapfiles that support multiple OGC interfaces since “ows_*” metadata can be used almost everywhere for common metadata items shared by multiple OGC interfaces.)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#3E4349;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.5pt;font-family:"Arial",sans-serif;color:#3E4349;background:white">-Jukka Rahkonen-</span><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>Puolesta </b>Sander Pukk<br>
<b>Lähetetty:</b> keskiviikko 9. helmikuuta 2022 11.26<br>
<b>Vastaanottaja:</b> Jason Snyder <mapserver-users@lists.osgeo.org><br>
<b>Aihe:</b> [mapserver-users] Mapserver URL request layer<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi there!<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Trying to use a geojson output from API directly in Mapserver layer.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Geojson is per standard, 4326, but my Mapserver and OL (the client) is configured to 3301.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">We have hundreds of layers (mostly from Postgres) at the same time and the system works.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">No other direct API ones.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The current MAP file's WEB part looks like this:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">  WEB<br>
      METADATA<br>
        "wfs_title"                     "title"<br>
        "wfs_enable_request"            "*"<br>
        "wms_enable_request"            "*"<br>
        "wfs_encoding"                  "UTF-8"<br>
        "wms_title"                     "title"<br>
        "wms_encoding"                  "UTF-8"<br>
        "wms_onlineresource"            "url/mapserv?map=/app/gis/infokihid/infolayers_other.map&"<br>
        "wfs_onlineresource"            "url/mapserv?map=/app/gis/infokihid/infolayers_other.map&"<br>
        "ows_srs"                            "EPSG:3301 EPSG:3857 EPSG:4326"<br>
        "ows_enable_request"            "*"<br>
        "wfs_getfeature_formatlist"     "gml,geojson"<br>
        "wms_feature_info_mime_type"    "application/json,application/json; subtype=geojson,application/vnd.ogc.gml,text/plain"<br>
      END<br>
  END<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">  PROJECTION<br>
      "init=epsg:3301"<br>
  END<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">And the layer:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">    PROJECTION<br>
        "init=epsg:4326"<br>
    END<br>
   <br>
    METADATA<br>
        "wfs_srs"               "EPSG:3301"<br>
        "gml_msGeometry_type" "line" <o:p></o:p></p>
</blockquote>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"><i>         #"ows_extent" "40500 5993000 1064500 7017000" copy paste lon and lat from these 3301 coordinates from other layer's capabilites</i><br>
        "ows_extent" "14.9318705986602 53.7681633673032 35.1060366818735 63.2747817924556"       <br>
        "wfs_extent"        "14.9318705986602 53.7681633673032 35.1060366818735 63.2747817924556"<br>
        "wms_extent"        "14.9318705986602 53.7681633673032 35.1060366818735 63.2747817924556"<br>
        "ows_title" "road_restrictions"<br>
        "ows_abstract" "road_restrictions"<br>
        "ows_keywordlist" "road_restrictions"<br>
        "ows_include_items" "all"<br>
        "gml_include_items" "all"<br>
        "ows_featureid" "id"<br>
        "gml_exclude_items"         "edges,geometry"<br>
        "ows_exclude_items"         "edges,geometry"<br>
    END   <o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> Couple of questions I have which I didnt really find answers for:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
Had issues with 4326 to 3301 transformation,the extent and all that. (OpenLayers could manage but QGIS couldnt). Previously only had ows_extent. <br>
Is ows_extent even a thing? This only shows wms_extent <a href="https://mapserver.org/ogc/wms_server.html#layer-object-metadata">https://mapserver.org/ogc/wms_server.html#layer-object-metadata</a><br>
Should you use wfs_extent and wms_extent instead?<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
My layer is doing an OGR connection directly to the API URL. Works fine. My question is, the API renews itself every 2 minutes (new data).<br>
How does Mapserver handle the request with that connection? I move the map (openlayers), there's a new Mapserver request - does Mapserver make a new request to the API endpoint and get a new json?<br>
Or is there some sort of cache?<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;mso-list:l0 level1 lfo1">
Am I missing something else from the Metadata that I should consider? <o:p></o:p></li></ol>
<div>
<p class="MsoNormal">With kind regards,<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">Sander<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>