Modify

Opened 3 years ago

Last modified 4 months ago

#10564 reopened enhancement

GeoJSON import

Reported by: pierzen Owned by: pierzen
Priority: normal Milestone:
Component: Plugin opendata Version: latest
Keywords: geojson Cc:

Description

In the context of Activations like for the current Ebola outbreak, we make a lot of exchanges with imagery providers or with various humanitarian organizations.

OpenData is very handy. Some enhancements could make it even more useful.

  • Geojson export creates only linestring features. To have Polygon to import either in the Tasking Manager or uMap, we have to input in QGIS, convert, save into shp file then reload and save as geojson. Ouf! Then a simple geojson output (Polygon) added to the options would take care of this.

New input or output that would make the plugin even more useful

  • Geojson input
  • csv output
  • kml output
  • shapefile output

Attachments (0)

Change History (26)

comment:1 Changed 3 years ago by Don-vip

Geojson export is a core feature we need to finish but that's not relevant to the plugin.
Geojson input: why not, can you give me a real example?
Other formats export: no. The idea of the plugin is to be able to import open data resources to improve OSM, not to give back OSM data in proprietary or non geographical formats.

comment:2 Changed 3 years ago by Don-vip

Owner: changed from Don-vip to pierzen
Status: newneedinfo

Can you please tell me what organization provides geojson data?

comment:3 Changed 3 years ago by Don-vip

Keywords: geojson added
Summary: Input / Export new formatsGeoJSON import

comment:4 Changed 3 years ago by Don-vip

Resolution: needinfo
Status: needinfoclosed

I'm OK to add this but please I need some investment from you as well. Please reopen after adding an example.

comment:5 Changed 2 years ago by Denis Carriere <carriere.denis@…>

Resolution: needinfo
Status: closedreopened

Having the ability to import GeoJSON is very important since it's the only format that can handle complex attributes like "addr:housenumber". Shapefiles have a maximum length of characters in the fieldnames and it usually breaks when you are adding (:) in the fieldnames.

All existing polygon data imports can't handle (addr:housenumber), if the data was in point format you could create CSV, but it's not the case for polygons.

Please add the GeoJSON import in JOSM!

Thanks

comment:6 Changed 2 years ago by Don-vip

Status: reopenedneedinfo

Same question, can you please give me a real-world example of open data delivered as geojson?

comment:7 Changed 2 years ago by Denis Carriere <carriere.denis@…>

Ex: Importing buildings to osm from municipal providers.

You can't import any polygons datasets with appropriate OSM related fields. If I'm helping a city import some building data, I would make sure all the data fields match the appropriate standards to OSM.

name
addr:housenumber
addr:route
building

Here's a sample of a GeoJSON of a building, obviously there would be more then just one.

https://gist.github.com/DenisCarriere/8c2b7b5a77fee753477e

comment:8 Changed 2 years ago by Denis Carriere <carriere.denis@…>

As for providers that give Open data in GeoJSON format, well most of the municipalities don't understand how to format data properly for OSM. There's tons of partnerships that can be made with many cities listed in Canada and across the globe.

Here's all the cities in Canada that have an Open Data program

http://open.canada.ca/en/maps/open-data-canada

But this ticket isn't about getting open data licenses, it's about importing GeoJSON.

Thanks Don-vip!

comment:9 Changed 2 years ago by anonymous

Here is a link to the (HOT Task Manager Export file for Project 917) (json format)

comment:10 Changed 2 years ago by Denis Carriere <carriere.denis@…>

HOT is using GeoJSON for their extents for their tasks, it's not exactly data that you will import, however it will be a good file to import to track your progress within an area.

comment:11 Changed 2 years ago by pierzen

I first forgot to connect. There are surely other uses then for HOT, as Denis described.

And exactly, bringing the grid into JOSM is for management of crowdsourcing. It let's look at the data for the area. With the grid in the background, we can import data, either a specific tag or a specific area.

For major Activation like for Ebola, we build overview maps that show imagery available, districts to map.
See http://umap.openstreetmap.fr/en/map/sierra-leone-kailahun-district-imagery_11227#9/8.1313/-10.8669

We add various Task Manager jobs. Then re-import into JOSM to see the extent of areas already covered. This is a monitoring tools that we share with our various partners in the Activation.
See http://umap.openstreetmap.fr/en/map/west-africa-ebola-openstreetmap-response-200-km-x-_13842#6/8.190/-11.942

comment:12 in reply to:  7 ; Changed 2 years ago by stoecker

Replying to Denis Carriere:

Ex: Importing buildings to osm from municipal providers.

...

Here's a sample of a GeoJSON of a building, obviously there would be more then just one.

https://gist.github.com/DenisCarriere/8c2b7b5a77fee753477e

That looks much like an already converted data set with OSM specifics. So that's no original data. If you can output GeoJSON in a converter, you can also output the OSM-XML format instead. Where is the advantage of using JSON?

comment:13 in reply to:  12 Changed 2 years ago by Denis Carriere <carriere.denis@…>

Replying to stoecker:

That looks much like an already converted data set with OSM specifics. So that's no original data. If you can output GeoJSON in a converter, you can also output the OSM-XML format instead. Where is the advantage of using JSON?

Most of the data is stored as JSON now a days, no one stores data as OSM XML format. For example using a database like MongoDB and then export your data into GeoJSON is very easy, exporting it into OSM is not possible without installing a converter.

I created that GeoJSON object using http://geojson.io

Original data doesn't exist, people have to make it, and no one makes data into OSM XML format, the new standard for data is GeoJSON, it's not proprietary unlike ESRI's shapefile format which is used for commercial purposes.

comment:14 Changed 2 years ago by pierzen

If we can save data in JOSM with geojson format, we should be able to reread it without passing by an other software to convert in shapefile and come back again in JOSM.

comment:15 Changed 2 years ago by Don-vip

Resolution: wontfix
Status: needinfoclosed

So as far as I understand, there is no data provider currently providing geojson, so I won't implement this.
If you are producing geojson yourself, please produce OSM files instead.

comment:16 Changed 2 years ago by GutenYe

comment:17 in reply to:  16 Changed 2 years ago by Don-vip

Replying to GutenYe:

@Don-vip

There're tons of GeoJSON open data available in Github.

Github is not an open data portal. For the example of Chicago, if you look at your project description you will find that the data comes from the official Chicago open data portal:

https://data.cityofchicago.org

And the data you can find there seems to be natively in KML, and can be exported in shapefile as well, not geojson, example:

https://data.cityofchicago.org/Public-Safety/Boundaries-Police-Districts-current-/fthy-xz3r

This is always the same thing: open data portals propose data in formats supported by the plugin, and you want to support a file format used by other developers who transformed the original data.

My answer stays the same: keep to original data. I still don't see any example of official organization using geojson as native and sole file format that would justify to add it into the plugin.

comment:18 Changed 2 years ago by anonymous

+1 for this feature

comment:19 Changed 2 years ago by carriere.denis@…

Resolution: wontfix
Status: closedreopened

Can this feature ever be implemented? There's clearly a demand for this, it's very silly that you can export as GeoJson but you can't import the data back into JSOM.

comment:20 Changed 2 years ago by Don-vip

Resolution: wontfix
Status: reopenedclosed

No. And stop this please, this becomes annoying.

comment:21 Changed 12 months ago by Stereo

I apologise in advance if this is annoying.

Some open data portals do publish as geojson, e.g. https://data.public.lu/en/datasets/donnees-geographiques-des-chemins-de-randonnee-du-portail-tourisme-geoportail-lu/

If you want to open geojson data in josm, an easy way to convert it is via geojson.io.

comment:22 Changed 12 months ago by carriere.denis@…

Also to add, the GeoJSON specification has been published by IETF.

RFC 7946

In 2015, the Internet Engineering Task Force (IETF), in conjunction with the original specification authors, formed a GeoJSON WG to standardize GeoJSON. RFC 7946 was published in August 2016 and is the new standard specification of the GeoJSON format, replacing the 2008 GeoJSON specification.

comment:23 in reply to:  21 Changed 12 months ago by Don-vip

Resolution: wontfix
Status: closedreopened

Replying to Stereo:

I apologise in advance if this is annoying.

It is not, that's the first answer to the question I asked two years ago. I will then consider to add geojson support, thanks for the link.

comment:24 Changed 12 months ago by openstreetmap.org-user-d1g

For reference, latest version of the GeoJSON viewer plug-in (by Larry0ua) was discussed here:

comment:25 Changed 12 months ago by carriere.denis@…

@don-vip Can I buy you a gift ? :) This support will solve so many issues with datasetes that need colons in the attributes such as "addr:housenumber & addr:street". It's impossible to have a Shapefile to have those columns and the only way around it was to use point geometry in a CSV, polygons & ways are very problematic.

<3 <3 <3 JOSM FTW!

comment:26 Changed 4 months ago by Klumbumbus

Ticket #14663 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as reopened The owner will remain pierzen.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from pierzen to the specified user. Next status will be 'new'.
Next status will be 'needinfo'.The owner will change to pierzen
as duplicate The resolution will be set to duplicate. Next status will be 'closed'.The specified ticket will be cross-referenced with this ticket

Add Comment


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

 
Note: See TracTickets for help on using tickets.