tumic0/GPXSee-maps

Karjalankartta is broken

sikmir opened this issue · 2 comments

Currently the server provides broken Capabilities.xml, GetMap url contains geoserver-applications:8060/geoserver/karjalankartat/ows instead of mapservices.navici.com/karjalankartat/wms.
Obviously geoserver-applications couldn't be resolved:

Error downloading file: http://geoserver-applications:8060/geoserver/karjalankartat/ows?SERVICE=WMS&&service=WMS&version=1.3.0&request=GetMap&bbox=-32265312.952290,4375410.648616,7809703.733288,44450427.334195&width=256&height=256&layers=topo20k_group&styles=&format=image/png&transparent=true&CRS=EPSG:2394: Host geoserver-applications not found

Workaround:

$ sed -i 's#geoserver-applications:8060/geoserver/karjalankartat/ows?SERVICE=WMS#mapservices.navici.com/karjalankartat/wms?apikey=4NIgWBON5qRTx8ePtDbQNR0YojJkhlFB#' ~/.cache/gpxsee/tiles/Karjalankartta\ \(Maps\ of\ Karelia\)\ 20k/capabilities.xml

Workaround for home-manager users:

  home.activation.gpxsee-maps = let 
    wmsUrl = "https://mapservices.navici.com/karjalankartat/wms?apikey=4NIgWBON5qRTx8ePtDbQNR0YojJkhlFB";
    mapName = "Karjalankartta (Maps of Karelia) 20k";
  in lib.hm.dag.entryAfter ["writeBoundary"] ''
    mkdir -p '${config.xdg.cacheHome}/gpxsee/tiles/${mapName}'
    curl '${wmsUrl}&SERVICE=WMS&REQUEST=GetCapabilities' | \
      sed 's#http://geoserver-applications:8060/geoserver/karjalankartat/ows?SERVICE=WMS#${wmsUrl}#' > '${config.xdg.cacheHome}/gpxsee/tiles/${mapName}/capabilities.xml'
  '';

Reported about the problem to MML.

MML answered me they are not going to fix Capabilities.xml since https://www.karjalankartat.fi/ is working with no problems. I guess they just don't use GetCapabilities request.