tumic0 / GPXSee-maps

GPXSee maps
https://maps.gpxsee.org
The Unlicense
33 stars 10 forks source link

Karjalankartta is broken #53

Open sikmir opened 3 years ago

sikmir commented 3 years ago

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
sikmir commented 2 years ago

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.

sikmir commented 2 years ago

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.