Both sides previous revisionPrevious revisionNext revision | Previous revision |
en:help:v2:maps:on-demand-create [2025/05/01 13:48] – psyberia | en:help:v2:maps:on-demand-create [2025/06/24 18:24] (current) – new function as of 2.4.0 psyberia |
---|
\\ | \\ |
| |
===== WMTS server ===== | ===== WMTS and custom projection server ===== |
\\ | \\ |
To access WMTS servers, you need to manually configure each levels: | To access WMTS servers, you need to manually configure each levels: |
</code> | </code> |
| |
To get the ''**<projection-resolution>**'' from a ''**ScaleDenominator**'', just multiply this value by ''**0.00028**'' (which is the "standardized rendering pixel size", in meters). | The application will transform a coordinate on Earth (in degrees) to an image tile (in pixels) as follow:\\ |
| |
| - Project the coordinate in degrees into a coordinate in meters, using a map projection. The map projection can be defined by one of the following method, depending on which tags are provided: |
| * By using the ''**<projection-code>**'' tag to specify the EPSG code of a //projected// coordinate system (PROJCS). The application will use the true and false origins as defined by the PROJCS. Exemple: \\ <code> |
| <projection-code>EPSG:28992</projection-code></code> |
| * By using the ''**<projection-code>**'' tag to specify the EPSG code of a //geodetic// coordinate system (GEOCS). Such GEOCS do not define true and false origins. The true origin (which can be seen as an offset applied before calling the map projection) can be applied using the ''**<projection-true-origin-x>**'' and ''**<projection-true-origin-y>**'' tags (usually in degrees). Exemple: \\ <code> |
| <projection-code>EPSG:4326</projection-code> |
| <projection-true-origin-x>-125.0</projection-true-origin-x> |
| <projection-true-origin-y>15.0</projection-true-origin-y></code> |
| * By using the ''**<projection-name>**'' and ''**<projection-geoid>**'' tags to specify the name of a map projection. In this case too, the ''**<projection-true-origin-x>**'' and ''**<projection-true-origin-y>**'' tags are taken into account. Exemple: \\ <code><projection-name>mercator</projection-name> |
| <projection-geoid>WGS 84</projection-geoid></code> |
| - Apply an optional false origin (which can be seen as an offset applied after calling the map projection), by using the ''**<projection-false-origin-x>**'' and ''**<projection-false-origin-y>**'' tags (usually in meters). Exemple: \\ <code><projection-false-origin-x>-285400.00</projection-false-origin-x> |
| <projection-false-origin-y>903400.0</projection-false-origin-y></code> |
| - Convert the coordinate in meters to a coordinate in tiles, using one of the following method depending on which tags are provided: |
| * By using the ''**<projection-factor-x>**'' and ''**<projection-factor-y>**'' tags (in tiles/m) and the ''**<projection-offset-x>**'' and ''**<projection-offset-y>**'' tags (in tiles). |
| * By using the ''**<projection-resolution>**'' tag (in m/px). If the tiles are not 256px in size, this one must be defined by the ''**<tiles-size>**'' or ''**<tiles-size-x>**'' and ''**<tiles-size-y>**'' tags (in px). The application will compute the correct factor to apply using the formula ''projection-factor-x = ( 1.0 / ( projection-resolution * tiles-size-x ) )'' and ''projection-factor-y = ( 1.0 / ( projection-resolution * tiles-size-y ) )''. |
| * By using the ''**<projection-scale-denominator>**'' tag (ratio, no units). The application will compute the projection resolution using the formula ''projection-resolution = ( projection-scale-denominator * 0.00028 )'', and then proceed as above using the computed projection-resolution. Note that ''0.00028'' is the standardized rendering pixel size. |
| * By computing automatically the projection factor and offset, if none of the above tags are provided. In this case the application uses the standard OpenStreetMap zoom levels scales. |
| |
If you want to use a projection which is not natively supported by the application, you need to import its definition using the ''**<import-ogc-wkt-def>**'' tag. You can find the OGC WKT definition of almost all projections here: [[http://www.spatialreference.org/]]. | If you want to use a projection which is not natively supported by the application, you need to import its definition using the ''**<import-ogc-wkt-def>**'' tag. You can find the OGC WKT definition of almost all projections here: [[http://www.spatialreference.org/]]. |
| |
===== Appendices ===== | ===== Appendices ===== |
| |
| \\ |
| |
| ==== Supported map projections ==== |
| |
| ^ EPSG Code ^ Names ^ |
| | 1024 | Popular Visualisation Pseudo Mercator, Mercator Auxiliary Sphere | |
| | 1026 | Mercator Spherical | |
| | 1028 | Equidistant Cylindrical, Equirectangular | |
| | 1029 | Equidistant Cylindrical (Spherical) | |
| | 9801 | Lambert Conic Conformal (1SP) | |
| | 9802 | Lambert Conic Conformal (2SP) | |
| | 9803 | Lambert Conic Conformal (2SP Belgium) | |
| | 9804 | Mercator (1SP), Mercator (Variant A) | |
| | 9805 | Mercator (2SP), Mercator (Variant B) | |
| | 9806 | Cassini Soldner | |
| | 9807 | Transverse Mercator, Gauss Boaga, Gass Kruger | |
| | 9808 | Transverse Mercator (South Orientated) | |
| | 9809 | Stereographic, Oblique Stereographic, Double Stereographic, Roussilhe | |
| | 9810 | Polar Stereographic (Variant A) | |
| | 9812 | Hotine Oblique Mercator, Hotine Oblique Mercator (Variant A) | |
| | 9815 | Oblique Mercator, Hotine Oblique Mercator (Variant B), Hotine Oblique Mercator Azimuth Center | |
| | 9817 | Lambert Conic Near Conformal | |
| | 9823 | C.f. 1029 | |
| | 9825 | Pseudo Plate Carree | |
| | 9826 | Lambert Conic Conformal (West Orientated) | |
| | 9827 | Bonne | |
| | 9828 | Bonne (South Orientated) | |
| | 9829 | Polar Stereographic (Variant B) | |
| | 9842 | C.f. 1028 | |
| |
| \\ |
| |
==== Inline expressions ==== | ==== Inline expressions ==== |
| ''**^**'' | Power operator. | | | ''**^**'' | Power operator. | |
| ''**==**'' | Equal to operator (also used for string). | | | ''**==**'' | Equal to operator (also used for string). | |
| ''**!=**'' <sup>1</sup> | Not equal to operator (also used for string). | | | ''**!=**'' | Not equal to operator (also used for string). | |
| ''**>**'' | Greater than operator. | | | ''**>**'' | Greater than operator. | |
| ''**> =**'' | Greater than or equal to operator. | | | ''**> =**'' | Greater than or equal to operator. | |
| ''**< <**'' | Signed left shift operator. | | | ''**< <**'' | Signed left shift operator. | |
| ''**> >**'' | Signed right shift operator. | | | ''**> >**'' | Signed right shift operator. | |
<sup>1. Available from AQ 2.2.8c</sup> | |
| |
| |
| ''**hypot**(double,double)'' | ''double'' | Returns ''sqrt(x²+y²)'' without intermediate overflow or underflow. | | | ''**hypot**(double,double)'' | ''double'' | Returns ''sqrt(x²+y²)'' without intermediate overflow or underflow. | |
| ''**iif**(double,mixed,mixed)'' | ''mixed'' | If the first parameter is different from ''0.0'', return the second parameter, else the third one. | | | ''**iif**(double,mixed,mixed)'' | ''mixed'' | If the first parameter is different from ''0.0'', return the second parameter, else the third one. | |
| | ''**indexOf**(string,string)'' | ''long'' | Returns the position of the first occurrence of the second parameter inside the first parameter. | |
| | ''**lastIndexOf**(string,string)'' | ''long'' | Returns the position of the last occurrence of the second parameter inside the first parameter. | |
| ''**len**(string), **length**(string)'' | ''long'' | Returns the length of a string. | | | ''**len**(string), **length**(string)'' | ''long'' | Returns the length of a string. | |
| ''**ln**(double)'' | ''double'' | Returns the natural logarithm (base ''e'') of a double value. | | | ''**ln**(double)'' | ''double'' | Returns the natural logarithm (base ''e'') of a double value. | |
| ''**log**(double)'' | ''double'' | Returns the base 10 logarithm of a double value. | | | ''**log**(double)'' | ''double'' | Returns the base 10 logarithm of a double value. | |
| | ''**lower**(string)'' | ''string'' | Returns parameter as lower case. | |
| ''**md5**(string)'' | ''string'' | Returns the [[https://en.wikipedia.org/wiki/MD5|MD5 hash]] of the string parameter. | | | ''**md5**(string)'' | ''string'' | Returns the [[https://en.wikipedia.org/wiki/MD5|MD5 hash]] of the string parameter. | |
| ''**not**(double)'' | ''long'' | If the parameter is different from ''0.0'', return ''0'', else return ''1''. | | | ''**not**(double)'' | ''long'' | If the parameter is different from ''0.0'', return ''0'', else return ''1''. | |
| ''**round**(double)'' | ''long'' | Returns the closest long to the argument, with ties rounding to positive infinity. | | | ''**round**(double)'' | ''long'' | Returns the closest long to the argument, with ties rounding to positive infinity. | |
| ''**sha1**(string)'' | ''string'' | Returns the [[https://en.wikipedia.org/wiki/SHA-1|SHA-1 hash]] of the string parameter. | | | ''**sha1**(string)'' | ''string'' | Returns the [[https://en.wikipedia.org/wiki/SHA-1|SHA-1 hash]] of the string parameter. | |
| ''**sin**(double)'' <sup>1</sup> | ''double'' | Returns the trigonometric sine of an angle. | | | ''**sin**(double)'' | ''double'' | Returns the trigonometric sine of an angle. | |
| ''**sqrt**(double)'' | ''double'' | Returns the correctly rounded positive square root of a double value. | | | ''**sqrt**(double)'' | ''double'' | Returns the correctly rounded positive square root of a double value. | |
| ''**substr**(string,long)'' | ''string'' | Returns a string that is a substring of the string given in the first parameter. The substring begins with the character at the index specified by the second parameter and extends to the end of the string. | | | ''**substr**(string,long)'' | ''string'' | Returns a string that is a substring of the string given in the first parameter. The substring begins with the character at the index specified by the second parameter and extends to the end of the string. | |
| ''**unixtime**()'' | ''long'' | Returns the current time in seconds. | | | ''**unixtime**()'' | ''long'' | Returns the current time in seconds. | |
| ''**unixtime**(long)'' | ''long'' | If the parameter is ''1'', returns the current time in milliseconds, otherwise returns the current time in seconds. | | | ''**unixtime**(long)'' | ''long'' | If the parameter is ''1'', returns the current time in milliseconds, otherwise returns the current time in seconds. | |
| | ''**upper**(string)'' | ''string'' | Returns parameter as upper case. | |
| ''**valueAt**(long,mixed...)'' | ''mixed'' | Returns the value at the index (starting from zero after the first parameter) specified by the first parameter. | | | ''**valueAt**(long,mixed...)'' | ''mixed'' | Returns the value at the index (starting from zero after the first parameter) specified by the first parameter. | |
<sup>1. Available from AQ 2.2.8c</sup> | |
| |
\\ | \\ |