1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Added WMS map type description

Updated WMTS info
This commit is contained in:
Martin Tůma 2018-04-08 23:54:24 +02:00
parent 129d6a53cb
commit 896010642c

View File

@ -97,28 +97,34 @@
<p>The map directory is recursively searched when loading the maps, so it
may contain an arbitrary directory structure.</p>
<h3 id="online">Online maps</h3>
<h4 id="TS">OSM/Google tiles</h4>
<p>The mapsource definition file format is based on XML and is fairly simple.
For the formal map source file syntax see the <a href="map/1/map.xsd">mapsource
XSD file</a>. The paragraphs below are a "human-readable" summary of the XSD
syntax/semantics divided by map type.</p>
<h4 id="OSM">OSM/Google tiles</h4>
<p>GPXSee supports most tile server based online maps out there, but the
<a href="https://github.com/tumic0/GPXSee/tree/master/pkg/maps">list
of maps</a> distributed with the official packages is limited to those
that are "freely distributable". You may however easily extend (or change)
the default map list with your own map sources definitions.</p>
<p>The mapsource definition file format is based on XML and is fairly simple.
The root <i>map</i> element contains two mandatory elements - <i>name</i>
<p>The root <i>map</i> element contains two mandatory elements - <i>name</i>
and <i>url</i>, and two optional elements - <i>zoom</i> and <i>bounds</i>.
The tile X and Y coordinates are replaced with <code>$x</code> and
<code>$y</code> in the URL and the zoom level is replaced with
<code>$z</code>. An example map source definition file could look like:</p>
<code>$z</code>. An example map source definition file can look like:</p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;map&gt;
&lt;name&gt;Czech Republic&lt;/name&gt;
&lt;url&gt;http://tile.server.cz/map/$z/$x/$y.png&lt;/url&gt;
&lt;map xmlns="http://www.gpxsee.org/map/1" type="OSM"&gt;
&lt;name&gt;USGS Imagery&lt;/name&gt;
&lt;url&gt;https://navigator.er.usgs.gov/tiles/aerial_Imagery.cgi/$z/$x/$y&lt;/url&gt;
&lt;zoom min="2" max="15"/&gt;
&lt;bounds left="12.3" bottom="48.6" right="18.9" top="51.2"/&gt;
&lt;bounds bottom="0" top="74"/&gt;
&lt;/map&gt;
</pre>
@ -131,33 +137,30 @@
<i>map</i> element to <code>WMTS</code>. Both the KVP and REST access methods
are supported.</p>
<p>For KVP, the <i>url</i> element represents the WMTS base URL and three
additional elements are required - <i>layer</i>, <i>style</i> and <i>set</i>
(TileMatrixSet in WMTS). An optional <i>format</i> element may be specified
defining the desired image format. If not set, <code>image/png</code> is
used.</p>
<p>For KVP, the <i>url</i> element represents the WMTS base URL and two
additional elements are required - <i>layer</i> and <i>set</i>
(TileMatrixSet in WMTS). Optional <i>format</i> and <i>style</i> elements may
be specified defining the desired image format and layer style. If not set,
<code>image/png</code> is used for <i>format</i> and the default style for
<i>style</i>.</p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;map type="WMTS"&gt;
&lt;map xmlns="http://www.gpxsee.org/map/1" type="WMTS"&gt;
&lt;name&gt;CUZK&lt;/name&gt;
&lt;url&gt;http://geoportal.cuzk.cz/WMTS_ZM_900913/WMTService.aspx&lt;/url&gt;
&lt;format&gt;image/png&lt;/format&gt;
&lt;layer&gt;zm&lt;/layer&gt;
&lt;style&gt;default&lt;/style&gt;
&lt;set axis="yx"&gt;ogc:1.0:globalcrs84pixel&lt;/set&gt;
&lt;/map&gt;
</pre>
<p>For REST access, the <i>url</i> element's <i>type</i> attribute must be set
to <code>REST</code>. The URL then represents the URL of the capabilities XML
document. The three mandatory elements - <i>layer</i>, <i>style</i> and
<i>set</i> - must be present like in the KVP case. Defining the format has no
relevance for the REST access method.</p>
document. Defining the format has no relevance for the REST access method.</p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;map type="WMTS"&gt;
&lt;map xmlns="http://www.gpxsee.org/map/1" type="WMTS"&gt;
&lt;name&gt;Wien - Ortho&lt;/name&gt;
&lt;url type="REST"&gt;http://maps1.wien.gv.at/wmts/1.0.0/WMTSCapabilities.xml&lt;/url&gt;
&lt;layer&gt;lb&lt;/layer&gt;
@ -166,21 +169,39 @@
&lt;/map&gt;
</pre>
<p>There is one more important attribute - the <i>axis</i> attribute of the
<i>set</i> element. It specifies the axis order for the CRS used for the
tile matrix set. Technically the order should be obtainable from the CRS definition,
but in praxis many servers use the wrong order. This is why GPXSee uses <b>x,y
(lon,lat) as default</b> and if the set uses the reverse order, the <i>axis</i>
attribute must be set to <code>yx</code> in the map definition.</p>
<i>set</i> element. It specifies the axis order of the CRS used for the
tile matrix set. The default order is obtained from the CRS definition like
specified in the standard, but in praxis many servers use a wrong order. This
is why GPXSee enables overriding the default axis order using the <i>axis</i>
attribute. Possible values are <code>xy</code> and <code>yx</code>.</p>
<p>For the formal mapsource file syntax see the
<a href="map/1/map.xsd">mapsource XSD file</a>.</p>
<p>Finally, one can define additional dimensions like <code>Time</code> using
the <i>dimension</i> element. Use a separate entry for every additional dimension.</p>
<h4 id="WMS">WMS</h4>
<p>WMS maps are distinguished by setting the <i>type</i> attribute of the
<i>map</i> element to <code>WMS</code>. WMS map definitions are very similar to
WMTS map definitions, the main difference is that you must specify the map
CRS using the <i>crs</i> element instead of specifying the tile set. Like in the
case of the <i>set</i> element, you may specify the <i>axis</i> attribute to
override the default axis order.</p>
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;map xmlns="http://www.gpxsee.org/map/1" type="WMS"&gt;
&lt;name&gt;CUZK-WMS&lt;/name&gt;
&lt;url&gt;http://geoportal.cuzk.cz/WMS_ZM50_PUB/WMService.aspx&lt;/url&gt;
&lt;layer&gt;GR_ZM50&lt;/layer&gt;
&lt;crs&gt;EPSG:3035&lt;/crs&gt;
&lt;/map&gt;
</pre>
<h3 id="offline">Offline maps</h3>
<p>OziExplorer maps, TrekBuddy maps/atlases and GeoTIFF images are supported by
GPXSee. Supported map projections are Web Mercator, Transverse Mercator (including UTM),
Lambert Conformal Conic, Albers Equal Area, Lambert Azimuthal Equal Area and
Latitude/Longitude (2D geographic). For list of supported datums and PCSs see
the <a href="https://github.com/tumic0/GPXSee/blob/master/pkg/csv/ellipsoids.csv">ellipsoids.csv</a>,
GPXSee. Supported map projections are Web Mercator, Transverse Mercator
(including UTM), Lambert Conformal Conic, Albers Equal Area, Lambert Azimuthal
Equal Area and Latitude/Longitude (2D geographic). For list of supported datums
and PCSs see the <a href="https://github.com/tumic0/GPXSee/blob/master/pkg/csv/ellipsoids.csv">ellipsoids.csv</a>,
<a href="https://github.com/tumic0/GPXSee/blob/master/pkg/csv/gcs.csv">GCS.csv</a>
and <a href="https://github.com/tumic0/GPXSee/blob/master/pkg/csv/pcs.csv">PCS.csv</a>
configuration files (can be modified or overridden by user files like the map