customMapSource <region> return bad BBOX area
nono303 opened this issue · comments
Hi,
I'm trying to limit tiles for a country (France) using <region>
as documented here https://geos.readthedocs.io/en/latest/users.html#creating-mapsources
Here is my mapsource
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name><![CDATA[FR - IGN SCAN25]]></name>
<minZoom>6</minZoom>
<maxZoom>16</maxZoom>
<tileType>jpg</tileType>
<url><![CDATA[https://wxs.ign.fr/an7nvfzojv5wa96dsga5nk8w/geoportail/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN25TOUR.CV&STYLE=normal&FORMAT=image/jpeg&TILEMATRIXSET=PM&TILEMATRIX={$z}&TILEROW={$y}&TILECOL={$x}.jpg]]></url>
<tileUpdate>IfModifiedSince</tileUpdate>
<backgroundColor>#00000000</backgroundColor>
<ignoreErrors>true</ignoreErrors>
<region>
<north>51.2</north>
<south>41.2</south>
<east>9</east>
<west>-5.2</west>
</region>
</customMapSource>
the result is a GoogleEarth area corresponding to:
<north>55.75</north>
<south>41</south>
<east>0</east>
<west>-22,5</west>
Either i didn't understood the purpose of <region>
, the unit (actually in WGS84 lat/lon ) or there is a bug
my 2 cents:
- Mapsource.py l.220
bbox = GeographicBB(min_lon=bounds["west"], max_lon=bounds["east"],
min_lat=bounds["south"], max_lat=bounds["north"])
- Geometry.py, class GeographicBB l.144
def __init__(self, min_lon=None, min_lat=None, max_lon=None, max_lat=None):
parameters seems not being in the right order
It's a geos issue, I transferred it now.
Not sure what the problem is though. The order or parameters doesn't matter when using keyword arguments.
I currently don't have time to look into this, but if you solve the problem and make a PR I'd merge it.