atlas-checks
atlas-checks copied to clipboard
SCRIPTS: Add script to merge geojson files and format them in a MapRoulette tag fix friendly way
Description:
This is a script I wrote awhile back to convert multiple geojson files into a single geojson file. To help with uploading to MapRoulette, there is also a command line flag that converts the geojson files into RFC7464 compliant line-by-line geojson. As a followup on #361 , I modified the script to also convert basic fix_suggestions into MapRoulette cooperative challenges when outputting RFC7464 compliant geojson in order to help me validate the fix suggestion changes I made to the InvalidTagsCheck class.
There are a couple of TODO comments scattered throughout the file, mostly to do with investigating some edge cases (will Polygons always be a way, or may they occasionally be a relation? -- looking at identifiers would probably work for this as well).
This is partially related to #365 .
Potential Impact:
N/A
Unit Test Approach:
N/A
Test Results:
N/A
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities (and
0 Security Hotspots to review)
0 Code Smells
Is there any reason why you're using the
geojsonoutput as opposed to the.logfiles that are already line-delimited? I know the log files unfortunately aren't separated by check and take some work to get the files organized that way.
Mostly because it was easier to work with organized checks to create MapRoulette tasks (when I first made the script, all I wanted to do was merge a specific check's files together -- I often run multiple checks instead of just the one I'm working on, to make certain I didn't accidentally break something). It eventually grew into what it is now, step by step. I added the write_feature_rfc7464 function when I had some issues uploading rather large files to MapRoulette, and then I added the fix_suggestions_to_cooperativeWork function when I wanted to ensure that the fixes I was working on would "just work (tm)".
I didn't know we had a python client repository (but I didn't look either -- I wrongly assumed that everything related to atlas-checks would be in this repo).