You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Aggregate OSM submissions with Filter Funcationality (Partial Data Export) #9
for times when data is collected over multiple days but we want to do a rolling upload to OSM. it would be nice to have a way to export (or just get easily, through filtering in JOSM somehow) a subset of the osm file export
for example data collected on Tuesday is downloaded, conflicts resolved and it’s uploaded on Wednesday, more data collection on Thursday, want to get an osm file with only the new data submissions. can use the 'purge' advanced JOSM tool to have it forget selected data but you still have to be able to know which features are new and somehow select everything else.
The original approach was to build out an API that queries OSM data in Spatialite in OSMSpatialite. However, we've decided to redirect our approach, and we instead are thinking about a workflow where we use osmosis and osmconvert to process the data. Right now, the thought is we want a preprocessing tool that will do some aggregating and filtering of the responses sent to OpenMapKit Server.
I'm researching how we want to do this and the limitations of different approaches. I'm documenting what I'm learning in that issue.
One thing I think we've definitely settled on is that all submissions to OpenMapKit Server will be written to the file system where this original data will remain and persist. Aggregation, filterering, rendering maps, submitting, and all of that will then be derived from these source files. This provides a more accessible approach than the usual way where one would stuff the data straight into a database.
Note that one key parameter to filter by is user. Since day 1, OpenMapKit has put an OSM user in the the submission data, thinking ahead. I was actually just stubbing in my OSM user name...
The idea is that we will have a dialog in OpenMapKit Android ask for just the user name. The server can then filter the aggregation by server so we can do submissions for a certain user by a user.
I'm thinking it would be good to implement an OSM user input view on Android so that this can be included in submissions. Also, I'd like to make sure the OSM Elements get timestamps from when they are modified on the phones to help with @danbjoseph original request to filter by the time the data is collected.
I'm feeling good enough about the aggregation part of things to merge into master, and this functionality will be good for current field deployments right now. As it stands, you can have all of your submissions rolled up properly for a single JSOM import.
Hopefully the phones have the date/time set correctly but there's no guarantee. However, my initial request has to do with the subsequent upload to OSM via JOSM so I care about the timestamp for the data reaching the server so that I can filter what I haven't gotten the rest of the way to OSM, regardless of when the data was collected on a phone.
Activity
hallahan commentedon Dec 18, 2015
The original approach was to build out an API that queries OSM data in Spatialite in OSMSpatialite. However, we've decided to redirect our approach, and we instead are thinking about a workflow where we use osmosis and osmconvert to process the data. Right now, the thought is we want a preprocessing tool that will do some aggregating and filtering of the responses sent to OpenMapKit Server.
Take a look at posm/posm#17
I'm researching how we want to do this and the limitations of different approaches. I'm documenting what I'm learning in that issue.
One thing I think we've definitely settled on is that all submissions to OpenMapKit Server will be written to the file system where this original data will remain and persist. Aggregation, filterering, rendering maps, submitting, and all of that will then be derived from these source files. This provides a more accessible approach than the usual way where one would stuff the data straight into a database.
[-]partial data export[/-][+]Aggregate OSM submissions with Filter Funcationality (Partial Data Export)[/+]scaffolding #9
hallahan commentedon Dec 21, 2015
I'm sprinting on this feature today. Tracked on:
https://github.com/AmericanRedCross/OpenMapKitServer/tree/aggregate-osm
concatenating OSM edits via libxmljs parser/writer #9
Working on rewriting negative IDs in aggregate-osm. Setting up tape t…
yay, unit tests #9
hallahan commentedon Dec 22, 2015
Note that one key parameter to filter by is user. Since day 1, OpenMapKit has put an OSM user in the the submission data, thinking ahead. I was actually just stubbing in my OSM user name...
The idea is that we will have a dialog in OpenMapKit Android ask for just the user name. The server can then filter the aggregation by server so we can do submissions for a certain user by a user.
unique rewrites of negative IDs test #9
working on rewriting negative refs with unit tests #9
make sure we only are concatenating nodes, ways, relations, and not c…
unit tests confirm negative refs are rewritten to corresponding negat…
scaffolding for filter feature in OSM aggregation #9
hallahan commentedon Dec 23, 2015
Ready to shred some code for filtering OSM Elements based on certain criteria as we aggregate OSM submissions.
This OSM aggregation and filter work is now in the /osm directory in the project. API endpoints import the aggregate module.
hallahan commentedon Dec 23, 2015
I'm thinking it would be good to implement an OSM user input view on Android so that this can be included in submissions. Also, I'd like to make sure the OSM Elements get timestamps from when they are modified on the phones to help with @danbjoseph original request to filter by the time the data is collected.
I'm feeling good enough about the aggregation part of things to merge into master, and this functionality will be good for current field deployments right now. As it stands, you can have all of your submissions rolled up properly for a single JSOM import.
cc/ @danbjoseph @jj0hns0n @rbanick
danbjoseph commentedon Dec 28, 2015
Hopefully the phones have the date/time set correctly but there's no guarantee. However, my initial request has to do with the subsequent upload to OSM via JOSM so I care about the timestamp for the data reaching the server so that I can filter what I haven't gotten the rest of the way to OSM, regardless of when the data was collected on a phone.
hallahan commentedon Dec 28, 2015
OK, we should be able to filter by the timestamp of the file itself on the server as well.
Filters OSM submissions by file timestamp #9
passing tests #9
filters user #9
wrote a filter unit test #9
hallahan commentedon Dec 31, 2015
You can now filter by user like this:
You can filter everything that starts on a day like this:
You can filter a range of dates like this:
hallahan commentedon Dec 31, 2015
And, you can put the full timestamp, something like this:
Now we need to merge this puppy in and make a simple dashboard. I will open another issue about that.