openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.34k stars 1.2k forks source link

Support multiple layers for managing imports #2586

Open mikelmaron opened 9 years ago

mikelmaron commented 9 years ago

JOSM allows multiple data layers, which is handy when doing a merge of import data. Makes it easy to compare vs existing OSM data, and you can copy/paste features or tags between layers. For iD, simply allowing to have an OSM layer, and a "reference" layer (perhaps just a GeoJSON file passed by URL or from the local computer), could suffice.

bhousel commented 9 years ago

As an intermediate step towards this, I think it makes sense to give the GPX layer a better name (suggestions welcome) and support a few other file formats. I'm kind of surprised iD doesn't support geojson here.

Then, actually giving the user some ability to import those features as OSM objects would be cool too, if we can keep it simple and do it in a way that doesn't break anything.

mikelmaron commented 9 years ago

@bhousel makes sense. first step sounds pretty straightforward? and second step, what would it take to make the "(suggestions welcome)" layer interactive, clickable, and copyable?

bhousel commented 9 years ago

what would it take to make the "(suggestions welcome)" layer interactive, clickable, and copyable?

I don't think that we would need to make the reference layer editable.. We could just add a button to import whatever is there (gpx/kml/geojson) onto the main map where it will be editable. Some potential issues:

But anyway I like the idea. I have a bunch of gpx tracks sitting on my computer that I am too lazy to trace.

pnorman commented 9 years ago

Is this in scope for a basic editor? I recall imports an external data sources being out of I'd scope in the past.

ajturner commented 9 years ago

I think that this would be very helpful - at least from the concept story:

"As a User, when editing in iD, I can add layers from other Services that I can edit and push into OpenStreetMap"

This is something I'd like to help out on.

systemed commented 9 years ago

This has long been a feature of P2 - you can load various file formats (.shp, .gpx, .kml, .osm) which appear as "background layers", and are invisibly converted into ways and nodes on import. As background layers they don't do anything, but alt-clicking a feature in one of them (in traditional Potlatch obscure-keypress fashion) brings it through to the main editable layer as a live feature.

slibby commented 7 years ago

We have opened a new issue to discuss this topic for adding web-service based vector data from ArcGIS GeoServices (ArcGIS Server Map Services and Feature Services) as background + editable layers: https://github.com/openstreetmap/iD/issues/4164. I would like to think that the new issue gets at some of these requests and is similar to the function of uploading a shapefile or geojson document to iD and using that as a base layer. Adding shapefile and GeoJSON support would be a straightforward addition to the work we have done so far if it was of interest.

bhousel commented 7 years ago

Awesome @slibby - yes I am also seeing #4164 as a great starting point towards improving how imports are done and would supersede this issue.

I have to comment on that thread, but was holding off to let everyone have their say and also because I've been focused on getting 2.3.2 released. 👍