Skip to content

Conversation

@rudokemper
Copy link
Member

Goal

Towards (but does not close) #191. Another PR forthcoming.

What I changed and why

  • Created a real export fixture from SMART Desktop + Mobile.
  • Added a smart_patrols.py script that takes a SMART patrol export XML file and parses it to make a clean dataset of observation records in GeoJSON format.
  • Leverage the usual pattern for geospatial data of saving the original (XML) file, saving a GeoJSON-transformed version, and calling save_geojson_to_postgres to save to db.

Should be straightforward for review.

What I'm not doing here

Adapting the Dataset Uploader App to allow you to upload this file. That is coming in a next PR.

LLM use disclosure

Supervised test generation with cursor.

Copy link
Contributor

@IamJeffG IamJeffG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my only question is what sort of heterogeneity might appear in terms of the schema (mostly the set of fields) of smart XML files? And is this script special-cased to the one example we have?

@rudokemper
Copy link
Member Author

rudokemper commented Dec 18, 2025

Pretty hard to say, honestly. I did export three XMLs to be sure, and all of these fields appeared in them (they are required fields when "starting a patrol"). But SMART is a complex toolchain and it would not surprise me if there are divergences. That said, there is NO documentation about their data structures so it's tricky to know without more samples. I vote that we deal with that when the script gets some usage from XML exports generated in the wild.

@rudokemper rudokemper merged commit 9482eef into main Jan 4, 2026
1 check passed
@rudokemper rudokemper deleted the smart-connector branch January 4, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants