Closed tmcw closed 6 years ago
Geofabrik's OSM Inspector is available via WMS. These (900913) layers are very useful for QA type editing. More info.
Other public WMSs are listed in the wiki. Many have tiled equivalents. Not sure about projections.
@ajashton Eventual goal is to switch to https://github.com/osmlab/editor-imagery-index as our imagery ref, which starts out with JOSM's imagery.xml file. Does that sound okay?
@tyrasd supporting WMS urls isn't a big issue for iD - done it before. Supporting other projections is a different story :)
JOSM fakes EPSG:4326 and EPSG:3875/900913 interoperability by stretching a 4326 image a little bit vertically in-code. I can't find the code that does this anymore, but I know that's what they used to do ... maybe iD could do a similar thing? Most WMS support 4326.
Let's support the easy WMSs via whoots-js.
TODO:
update_imagery.js
to
bbox={bbox-epsg-3857}
- like how mapbox-gl-js does ittile_source.js
to replace the tokeneditor-layer-index
. There is a property for available projections, but most WMS sources don't have it filled in.@bhousel I suspect you are opening a can of worms. While I have now and then seen WMS servers supporting EPSG:3857, it is in my experience, the absolute exception (hey for once I agree with @tmcw). Which implies that you are not going to get around at least EPSG:4326 support (the request that kicked off reopening this issue, is BTW, exactly such a case).
TODO:
You might need to handle deduplication for sources which have both TMS and WMS
While I have now and then seen WMS servers supporting EPSG:3857, it is in my experience, the absolute exception
There's about 15 or so in editor-layer-index which have 3857 or 900913 listed. The JOSM list has more, with about 20 900913 and 30 3857 (and duplication between them I'm sure).
As a ballpark guess I'd estimate 20 new sources, since some of those will have TMS equivalents.
Which implies that you are not going to get around at least EPSG:4326 support (the request that kicked off reopening this issue, is BTW, exactly such a case).
Exactly, would be nice if ID will support EPSG:4326 in the short to medium term and best flag Bavaria DOP80.
Exactly, would be nice if ID will support EPSG:4326 in the short to medium term and best flag Bavaria DOP80.
I opened https://github.com/mapbox/whoots-js/issues/19 to track EPSG:4326 support. Would appreciate help with it by anybody who knows 🌐 real well.
My best understanding of the issue is that we can request the images from the server, but they won't be square or they won't be the right part of a square tile that we can just plop into a tile grid. But the tile grid is just <img>
's that the browser will scale for us, so implementing variable height tiles might not be too awful.
EPSG:3857 is easy though and can come quickly by ticking the boxes in my comment above.
You might need to handle deduplication for sources which have both TMS and WMS
Hmm, maybe we should change editor-layer-index schema so that each source can include all the various supported types, rather than duplicating them across files.
I opened https://github.com/osmlab/editor-layer-index/issues/179 for this.
Currently, there are 18 sources with EPSG:3857 or EPSG:900913 support specified in editor-layer-index:
$ ag -l 'EPSG:(3857|900913)'
world/Landsat.geojson
north-america/ca/GeobaseRoads.geojson
north-america/ca/GeobaseHydrography.geojson
north-america/ca/Canvec.geojson
europe/it/SouthTyrolOrthofoto2011WMS20cm.geojson
europe/hu/Torokbalint-ortophoto-2013.geojson
europe/fr/CRAIG-Auvergne20092010-30cm.geojson
europe/at/TirisDOM-Surfacemodel.geojson
europe/at/GrazBasiskarte-basemap.geojson
europe/at/TirisContourlines.geojson
europe/at/TirisDGM-Terrainmodel.geojson
europe/at/GeoimageatMaxRes.geojson
australia/au/nsw/NSW-LPI-WebServices-AdministrativeBoundaries-StateForest.geojson
australia/au/nsw/NSW-LPI-WebServices-AdministrativeBoundaries-Suburb.geojson
australia/au/nsw/NSW-LPI-WebServices-AdministrativeBoundaries-LGA.geojson
australia/au/nsw/NSW-LPI-WebServices-AdministrativeBoundaries-NPWSReserve.geojson
australia/au/nsw/NSW-LPI-WebServices-AdministrativeBoundaries-Parish.geojson
australia/au/nsw/NSW-LPI-WebServices-AdministrativeBoundaries-County.geojson
… and 3 sources made available through whotts:
$ ag -l whoots
north-america/us/nj/NJNatural2015.geojson
north-america/us/nj/NJInfrared2015.geojson
north-america/us/md/MD_SixInchImagery2014.geojson
… and 6 sources made available through mapproxy.osm.ch:
$ ag -l mapproxy.osm.ch
europe/ch/KantonBaselStadt-2015-TMS.geojson
europe/ch/KantonZuerich10cm-2015-TMS.geojson
europe/ch/StadtBern10cm-2016-TMS.geojson
europe/ch/KantonSolothurn25cm-SOGIS2014-tms.geojson
europe/ch/KantonAargau25cm-AGIS2014.geojson
europe/de/Bavaria-DOP80.geojson
WMS support would be great. We have several WMS sources supporting EPSG:3857 which I could add from here: /Maps/Norway
@tyrasd added support for the tile-compatible WMS sources in #4814 🎉
Should we open a follow-up ticket for "supporting" EPSG:4326 wms services as described above in https://github.com/openstreetmap/iD/issues/1141#issuecomment-15469807?
Should we open a follow-up ticket for "supporting" EPSG:4326 wms services as described above in #1141 (comment)?
Yes, please open one... 👍
Now that WMS support is implemented, it would be great to have support for WMS in the custom background menu as well.
Now that WMS support is implemented, it would be great to have support for WMS in the custom background menu as well.
I agree - can you open as a new issue?
via http://www.microformats.dk/2013/03/22/se-et-preview-af-det-nye-id-openstreetmap-redigeringsv%C3%A6rkt%C3%B8j/ + http://www.microformats.dk/2013/03/14/sadan-kalder-du-geodatastyrelsens-wms-tjenester-fra-josm/
Question is really whether there will be many WMS providers that support EPSG:900913