Modify

Opened 9 months ago

Last modified 8 months 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)

Screenshot from 2020-05-28 09-34-19.png (18.7 KB) - added by Glassman 9 months ago.
Screenshot from 2020-05-28 09-45-11.png (42.8 KB) - added by Glassman 9 months ago.
QGIS View
qgis.jpg (38.7 KB) - added by kennykb 9 months ago.
Screenshot of QGIS looking at just the WMS GetCapabilities link

Download all attachments as: .zip

Change History (13)

comment:1 Changed 9 months ago by kennykb

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.)

comment:2 Changed 9 months ago by skyper

Component: CoreCore 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 Changed 9 months ago by skyper

Owner: changed from team to Glassman
Status: newneedinfo

Changed 9 months ago by Glassman

Changed 9 months ago by Glassman

QGIS View

comment:4 Changed 9 months ago by 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.

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 Changed 9 months ago by skyper

Owner: changed from Glassman to team
Status: needinfonew

comment:6 in reply to:  4 Changed 9 months ago by skyper

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?

Changed 9 months ago by kennykb

Attachment: qgis.jpg added

Screenshot of QGIS looking at just the WMS GetCapabilities link

comment:7 Changed 9 months ago by kennykb

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 Changed 8 months ago by taylor.smock

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:

comment:9 Changed 8 months ago by anonymous

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 Changed 8 months ago by taylor.smock

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. :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to Glassman
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.