Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import GeoJSON through map editor #754

Open
todrobbins opened this issue Apr 23, 2015 · 13 comments
Open

Import GeoJSON through map editor #754

todrobbins opened this issue Apr 23, 2015 · 13 comments

Comments

@todrobbins
Copy link

I don't know if this has been discussed elsewhere but it would be really great to have a way to drag-and-drop/import GeoJSON into the map via the editor view. I'm thinking something similar to geojson.io.

Use case: Neighborhood/city district boundaries (drag and drop)

  1. I extract a public domain boundaries shapefile (shp) from my city's open data portal
  2. I convert that shapefile to GeoJSON via geojson.io and then narrow it down to one neighborhood shape
  3. I edit the map of the entry for that neighborhood and drag-and-drop or click "Import GeoJSON" button
  4. The boundary renders, looks correct, I click "Save changes"

geojson_step_01

geojson_step_02

geojson_step_03

Maybe this is catering to a really specific workflow, but there needs to be a more user friendly way of getting geodata into the editor other than the current options of drawing each feature by memory or by API import.

Thoughts?

@philipn
Copy link
Member

philipn commented Apr 24, 2015

Yes, I think this is a specific workflow that would be hard to cover in complete detail. E.g. people may want KML, they may want to provide a google maps URL directly, etc. There's also different wants to think about GeoJSON-- you could imagine someone would want to take a single GeoJSON object and split each feature out into a separate page, using the data attributes on the geometry to populate the page. Lots of possibilities.

I think for the near-term the solution is to encourage people to build external API-based tools to do this kind of user-friendly data import, e.g. what @sethvincent made (but his geojson tool requires some updating), and just link them from somewhere discoverable.

@wildintellect
Copy link

Ideally it seems you'd want to import it into OpenStreetMap, and then be able to select an OpenStreetMap existing object to write a page about.

@vielmetti
Copy link

I'm with @wildintellect on this - since Localwiki pulls features from OpenStreetMap it makes sense to do the mapping there, and then pull into Localwiki.

@philipn
Copy link
Member

philipn commented Jun 23, 2015

@wildintellect Not sure if you know this, but you can select an existing OSM object via the map search box (e.g. "Central Park"). It's not perfect (mostly because it's hard for people to find), but it works pretty well in most places

@wildintellect
Copy link

I had the vague idea that was the case, hence the suggestion that all such imports of public city data should go to OSM. It might be considered more work upfront, but the data sharing and accessibility seems better. An obvious enhancement via the localwiki api is to embed and OSM editor in localwiki.

@todrobbins
Copy link
Author

@philipn maybe if the OSM query brought back a more complete list (like OSM does) to choose from it would be easier to select the feature you want. See attached screen grab:

screen shot 2015-06-24 at 3 08 33 pm

@todrobbins
Copy link
Author

And @wildintellect++ @vielmetti++ about staying within the OSM ecosystem to reduce the duplication of effort. 👍

@philipn
Copy link
Member

philipn commented Jun 24, 2015

@todrobbins Our list is the same, it's just limited to what's inside of the LocalWiki region you're editing. Showing e.g. "Central Park" in Mississipi when searching inside of Utah isn't that useful.

Let's keep this issue on topic here and open another for other ideas. I like the idea of drag-and-drop into the map editor, but otherwise think this is best accomplished via a API tool that someone throws together (e.g. @sethvincent's tool http://geodata2localwiki.herokuapp.com/ - now broken)

@themightychris
Copy link
Contributor

When I search for neighborhood names in the search box at https://localwiki.org/philadelphia, selecting the result only creates a point at its center (maybe that's just bad OSM data https://www.openstreetmap.org/node/157547044 ?)

While there are lots of potential use cases for importing map data, GeoJSON import would be the best single option to import as it is the de-facto emerging open standard for map data. Whatever other source of map data someone has, there is a better chance they'll be able to find a tool/workflow out in the wild to get it into GeoJSON than into any other format or medium (even OSM). Supporting import-from-geojson on the map page would be possibly the easiest import to implement as well as the closest to universal.

We have piles of good neighborhood boundary GeoJSON for philly lying around I've been hoping for years to get into our localwiki but never have gotten around to writing an API script or figuring out how to participate in OSM. LocalWiki exists because global data repos like wikipedia and OSM have a higher barrier to entry than it's easy to get casual local users comfortable with. If staying close with the OSM ecosystem is important than how about a tool to export or directly push a feature from a LocalWiki to OSM so transfers can go in both directions? Then people could crowd-source and draft/play with data in LocalWiki and push high-quality things to OSM as more of a structured effort by trained volunteers.

@philipn
Copy link
Member

philipn commented Jun 24, 2015

I like GeoJSON and would be down with something automatic in the map editor to make this easier, as long as it's kind of hidden away so it doesn't scare people off (!) (e.g. drag and drop or in the black context menu on the right). I think as long as it's previewed in the editor before it's saved, the issue of GeoJSON formatting isn't as important (e.g. each geojson feature to different pages). E.g. in the workflow mentioned by @todrobbins above, he extracts just the one neighborhood boundary to import.


@themightychris The issue of OSM is very complicated. OSM doesn't have stuff like neighborhoods or much subjective geographic information. They have some labels in place but they are almost always just markers, not areas. OSM people have told us that automated LocalWiki -> OSM is a bad idea and would be rejected. Semi-automated OSM -> LocalWiki is what we have now (albeit in a limited form with the map search). I am hoping people will build tools to programatically (on a case-by-case basis) go LocalWiki -> OSM, as that's what they've told us they prefer. We did some work to make sure all of our licensing is compatible in both directions (https://localwiki.org/main/Copyrights).

@vielmetti
Copy link

Not opening up a new issue for this -

Is there a straightforward way to extract GeoJSON formatted geometries from Localwiki? Conceptually at least, every single page could be represented as a GeoJSON object, but I'm unclear on the path from concept to reality.

@philipn
Copy link
Member

philipn commented Oct 12, 2015

@vielmetti The API returns GeoJSON, so not sure what you're wondering here?

@vielmetti
Copy link

@philipn - I looked at the API docs at

https://localwiki.org/api/v4/maps/

and saw something that had GeoJSON style geometries, but not a full-out GeoJSON formatted response that e.g. could be loaded directly into LeafletJS. that said I think it's an unambiguous transformation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants