-
Notifications
You must be signed in to change notification settings - Fork 40
JSON support for changeset upload #407
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
Open
mmd-osm
wants to merge
1
commit into
zerebubuth:master
Choose a base branch
from
mmd-osm:feature/jsonparser
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f7f490a
to
a5e9e19
Compare
c597dda
to
39a4eec
Compare
Created some issues for sjparser: |
2d85c4e
to
4ae0d45
Compare
{
"version": "0.6",
"generator": "demo",
"osmChange": [
{
"type": "node",
"action": "create",
"id": -1,
"lat": 81.0714,
"lon": -139.0956,
"changeset": 159556552,
"tags": {
"man_made": "mast",
"name": "Principal"
}
},
{
"type": "node",
"action": "modify",
"id": 12394725038,
"version": 3,
"lat": -50.2701,
"lon": 131.176,
"changeset": 159556552,
"tags": {
"man_made": "mast",
"name": "Future"
}
},
{
"type": "relation",
"action": "delete",
"id": 18320662,
"version": 1,
"changeset": 159556552
},
{
"type": "way",
"action": "delete",
"id": 1338869356,
"version": 1,
"changeset": 159556552
},
{
"type": "node",
"action": "delete",
"id": 12394725046,
"version": 1,
"changeset": 159556552
},
{
"type": "node",
"action": "create",
"id": -2,
"lat": 42.03321443,
"lon": 13.5690032,
"changeset": 159556552,
"tags": {
"man_made": "mast",
"name": "Monte Piselli - San Giacomo"
}
},
{
"type": "node",
"action": "create",
"id": -3,
"lat": 41.03321443,
"lon": 11.5690032,
"changeset": 159556552,
"tags": {
"man_made": "mast",
"name": "Monte Piselli - San Giacomo"
}
},
{
"type": "way",
"action": "create",
"id": -1,
"changeset": 159556552,
"nodes": [
-1,
-2,
-3,
-1
],
"tags": {
"man_made": "mast",
"name": "Monte Piselli - San Giacomo"
}
},
{
"type": "relation",
"action": "create",
"id": -1,
"changeset": 159556552,
"members": [
{
"type": "Node",
"ref": -1,
"role": "stop"
},
{
"type": "Way",
"ref": -1
}
],
"tags": {
"boundary": "administrative",
"name": "Admin boundary"
}
}
]
}
{
"version": "0.6",
"generator": "openstreetmap-cgimap 2.0.1.2503291758 (14989 ubuntu)",
"copyright": "OpenStreetMap and contributors",
"attribution": "http://www.openstreetmap.org/copyright",
"license": "http://opendatacommons.org/licenses/odbl/1-0/",
"diffResult": [
{
"type": "node",
"old_id": -1,
"new_id": 12394725050,
"new_version": 1
},
{
"type": "node",
"old_id": 12394725038,
"new_id": 12394725038,
"new_version": 4
},
{
"type": "relation",
"old_id": 18320662
},
{
"type": "way",
"old_id": 1338869356
},
{
"type": "node",
"old_id": 12394725046
},
{
"type": "node",
"old_id": -2,
"new_id": 12394725051,
"new_version": 1
},
{
"type": "node",
"old_id": -3,
"new_id": 12394725052,
"new_version": 1
},
{
"type": "way",
"old_id": -1,
"new_id": 1338869357,
"new_version": 1
},
{
"type": "relation",
"old_id": -1,
"new_id": 18320663,
"new_version": 1
}
]
}
|
6af455c
to
e609922
Compare
d5e63b3
to
336ddaa
Compare
Merged
4a84bcc
to
b6b9c52
Compare
48089f5
to
6cd7819
Compare
6cd7819
to
2df01a9
Compare
5126330
to
362c467
Compare
362c467
to
2b75290
Compare
e04e9d6
to
09ea77d
Compare
09ea77d
to
eef3d26
Compare
47d2daf
to
decb211
Compare
decb211
to
89abe65
Compare
This was referenced Apr 30, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Back in openstreetmap/openstreetmap-website#3501 we've talked about adding JSON support for a few remaining endpoints. Unfortunately, this project never took off. Why not give it another try now.
I found a streaming json parser based on yajl called sjparser, that has schema support. It offers a much saner interface than yajl alone, and emits one OSM element at a time. It also hides all that ugly state handling, unlike the XML parser we have in place today.
There are a few other changeset related endpoints (create / update) that don't support JSON. This can be addressed in another PR. Single object edit operations will continue be out of scope for this repo.