Dataset Uploader: allow CSV → GeoJSON conversion with user-defined coordinate columns#224
Merged
rudokemper merged 12 commits intomainfrom Apr 6, 2026
Merged
Conversation
Contributor
|
I've tested the UI. |
nicopace
approved these changes
Apr 6, 2026
Contributor
nicopace
left a comment
There was a problem hiding this comment.
Finished reviewing, all good. Thanks!!
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
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.
Goal
Closes #218. (And note that most the discussion describing the desired behavior is actually in #197.)
Screenshots
If tabular data (CSV, XLS) has been uploaded:

If lon/lat columns have been selected:

If spatial data has been uploaded, the toggle is disabled:

What I changed and why
GC Dataset Uploader
2_upload_and_convert_file.inline_script.py), trackingcolumn_namesto be able to feed those into the Select fields on step 3.lonLatTogglethat is disabled ifoutputFormat !== "csv"(Note: all tabular data is converted "down" to CSV on step 2)longitudeColandlatitudeColSelect fields allow selection fromcolumn_names. Both make a heuristic guess to set the first value to be ones that start withlonandlat, respectively.state.longitudeColandstate.LatitudeColare set, then we do an optional conversion to GeoJSON in4_apply_transformation_and_write_to_database_inline_script.pyto_geojson()fromgeo_utils.pycommon logic module.main()to the top, as per the repo-wide convention. This makes diffing kind of ugly, sorry.)data_conversion.pyIn #217 I had this code expect a
coord_colString, with the expectation that the dataset uploader app would construct a[lon, lat]string upstream. When working on this I decided that didn't make sense. (For one, the validation logic required to inspect a[lon, lat]format is way too complex.). So I switched to expect longitude and latitude arguments.Note to the reviewer
Per the app
README.md,This is absolutely the case for this PR. Also, +484 out of the +845 line changes are in
app.yaml! The only code I would actually review are:2_upload_and_convert_file.inline_script.py(+18 / -9)4_apply_transformation_and_write_to_database.inline_script.py(+193 / -144 (but includes movingmain()))data_conversion.py(+47 / -31) (and tests, +39 / -30)Otherwise, I recommend test-driving the app on
demo. I am happy to jump on a call to walk through how this works, or discuss feedback instead of through comments or code review here on Github!I am requesting @nicopace to have a look as you will most likely work the most with this functionality, either yourself and/or with users; and generate documentation.
LLM use disclosure
None