Opened 5 years ago
Last modified 4 years ago
#19302 new enhancement
Add support for ESRI REST Services
Reported by: | Glassman | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core imagery | Version: | |
Keywords: | ESRI REST Services | Cc: |
Description
This is a request for an enhancement.
JOSM can open ESRI REST Services in the imagery preferences. However, the layer appears as an image and can not be queried for additional information. For example, in QGIS, adding a WMS layer provides full information on the vector data. After adding the same layer in JOSM, only the name appears. In a recent example, the name is barely visible because of the choice of font and color.
An example can be found at https://www.cowlitzinfo.net/arcgis/rest/services/WSPublic.
This request is for a queryable ESRI REST Service layer.
Attachments (3)
Change History (14)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Component: | Core → Core imagery |
---|---|
Keywords: | ESRI REST Services added |
JOSM has its own imagery data synced with 'editor-layer-index'. You can add/edit imagery entries yourself, if the license is ok, see Maps.
What is the complete string for the imagery service you enter in imagery preferences?
Please, describe in more details your other problems. A screenshot is usually helpful.
comment:3 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
by , 5 years ago
Attachment: | Screenshot from 2020-05-28 09-34-19.png added |
---|
follow-up: 6 comment:4 by , 5 years ago
I've added two attachments, the first shows the esri rest view in JOSM. To help show the street, I used the OSM Carto background layers. Local streets, as defined by the county, are shown in black. The streetname is shown in gray.
The second screenshot is the same segment shown in QGIS. Notice the data elements for that street segment, shown on the right.
The source is https://www.cowlitzinfo.net/arcgis/rest/services/WSPublic/WSStreets/MapServer
Added to JOSM as wmts:https://www.cowlitzinfo.net/arcgis/rest/services/WSPublic/WSStreets/MapServer/WMTS?SERVICE=WMTS&REQUEST=getcapabilities&
comment:5 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
comment:6 by , 5 years ago
Replying to Glassman:
I've added two attachments, the first shows the esri rest view in JOSM. To help show the street, I used the OSM Carto background layers. Local streets, as defined by the county, are shown in black. The streetname is shown in gray.
You can adjust the background color of JOSM Mapview in preferences, see Color settings.
The second screenshot is the same segment shown in QGIS. Notice the data elements for that street segment, shown on the right.
Did you test the imagery information when right clicking into mapview?
by , 5 years ago
Screenshot of QGIS looking at just the WMS GetCapabilities link
comment:7 by , 5 years ago
In my use case, there's a server, maintained by New York State, with a wealth of imagery on it. Its GetCapabilities link is
http://www.orthos.dhses.ny.gov/ArcGIS/services/Latest/MapServer/WMSServer?
QGIS, given the GetCapabilities, displays a list of available layers as in the attached screen capture.
I do have a link to the latest visible-light imagery available from that server, with the appropriate metadata, in editor-layer-index:
wms[19]:https://orthos.dhses.ny.gov/arcgis/services/Latest/MapServer/WmsServer?FORMAT=image/jpeg&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=0,1,2,3,4&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}
That's about an 80% solution. It turns out that the most recent imagery for my particular part of the state was acquired during a flood, and I sometimes need to look at an earlier version in order to get accurate information of features near the lakes and rivers.
I work around the problem by MANUALLY constructing the URL for the earlier image series, and adding it locally to the imagery providers:
wms:http://orthos.dhses.ny.gov/arcgis/services/2011/MapServer/WmsServer?FORMAT=image/png&TRANSPARENT=TRUE&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=0&STYLES=&SRS={proj}&WIDTH={width}&HEIGHT={height}&BBOX={bbox}
QGIS is somehow able to construct such a beast, and to allow for turning individual image sets on and off, given just the GetCapabilities, but JOSM appears to require manual patchwork to make it go.
comment:8 by , 5 years ago
I've got support for Esri data layers in MapWithAI now (the -dev
version, not the release version). I don't know if this fulfills your need.
Anyway, the code lives here:
https://gitlab.com/gokaart/JOSM_MapWithAI/-/blob/master/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/ESRISourceReader.java
When I download from the data source, I pass it to GeoJSONReader
, and then make tag substitutions. For the sources that come from Esri (see https://www.openstreetmap.org/user/Deane%20Kensok/diary/393610 ), the tag substitutions are automatically populated based off of information they send in the request.
Before you use the feature in MapWithAI, please make certain that it is permissible. I also accept pull requests to add additional layers (shown by default). I do require appropriate permissions. Please don't make a pull request when you don't have permissions.
Notes on the current implementation:
- Only uses one layer (whichever is the first layer)
- Only guaranteed to work with the Esri provided datasets (see http://www.arcgis.com/home/group.html?id=bdf6c800b3ae453b9db239e03d7c1727)
comment:9 by , 5 years ago
Thanks - your timing is perfect, I just read the ESRI press announcement where they discussed the mapwithai josm plugin. I've reached out to Deane Kensok for help identifying sites that could be useable in JOSM and documentation that I can provide local governmental agencies to help them share their datasets.
comment:10 by , 5 years ago
If you can, you should prioritize getting the data into the Esri OSM group -- this will allow it to be used in RapiD as well. And have some conflation done as well. The code that I linked to came out of the work done for supporting the Esri OSM group.
The other route (adding an entry to a JSON file) should really only be used when there isn't specific support for a data type, or the data source has a bunch of different data types. So if the data set has roads, fire hydrants, road outlines, buildings, water lines, and sidewalks, it cannot be added to the Esri OSM group (there is a requirement of only one data type per FeatureServer). If it is just road outlines, it also probably cannot be added to the Esri OSM group (since it must be translatable to OSM concepts).
Good luck on your outreach. :)
I think this would be quite useful to me. The 'NYS Orthos Online' (http://gis.ny.gov/webservices/ - see especially 'Orthoimagery and Elevation') has a rich set of imagery and metadata available. I frequently compare multiple image sets, and have to use other tools to do it because JOSM can't handle it.
What I suspect might get in the way is that the logic in question interacts with https://github.com/osmlab/editor-layer-index - I know that JOSM obtains its layers from there. Does this idea need to be coordinated with that project as well? (My understanding is limited; my interaction with 'editor-layer-index' has been that I submitted a single PR proposing NYS Orthos Online as an imaging source.)