Remix.run Logo
▲ Waterluvian an hour ago

I’ve found it to be surprisingly effective lately.

I’ve been renovating a spatial/topology validation system for an OpenLayers driven map editor for robot fleets. I set up a clean interface for spatial indexes and predicates as well as your basic geotoolbox functions.

I was most surprised by a moment where Opus detected that using a union approach to ensure that robot footprints always sat within valid polygons (possibly straddling multiple valid polygons) was slow in testing. So it decided to find the difference between footprint and each polygon within the AABB of it. And if the remaining polygon is zero size, it’s valid. If not, the remaining shape is what is invalid.

I was also surprised just how good it was at recognizing, “in the test data there’s a lot of this kind of feature so we should explore what’s more common: hits or misses?

Before robotics I spent a lot of time building spatial models for data processing and analysis. I find that I can usually just explain the spatial question in natural language and it will figure out the relevant inputs from the dataset and what the process can be. I’m not obsolete quite yet though because maybe 10-20% of the time it goes on a pretty fantastical journey through unnecessary intermediate data products.

▲mootothemax 39 minutes ago | parent [-]

Oh don't get me wrong, it's a level-boosting monster even with that.

The worrying bit is if you're not keeping a close eye on it, very easy to think you're getting a solid system, but thanks to the internal madness it's used, your entire grid has in effect shifted 10 metres right, and any spatial measurements are far more approximate than it's letting on.

That was the bad old days for me. Nowadays I keep it locked down to specific systems for projections or actual spatial calculations, and that seems to keep it honest.

And the surprise is awesome when it happens! My favourite is all the QA steps you wish you'd had and that it reasons out on the raw data alone:

"oh hey, this one city has no data but it has a high population, oh right, that's because of this obscure lookup had a row chopped off, there you go, sorted."

I get to stand back and applaud it, honestly.

▲Waterluvian 30 minutes ago | parent [-]

Oh absolutely. I just had flashbacks to getting outputs where a raster is completely wacko because the input coordinate systems were not the same and so the grids didn’t line up. It absolutely still has to be supervised closely, much more than a lot of more vanilla programming tasks I’ve experienced.

One thing that helped me a ton was making an adapter between my domain specific datasets/systems and QGIS. So I can watch and examine the intermediate steps and leverage that my brain is still pretty darn good at visual pattern matching.

▲mootothemax 22 minutes ago | parent [-]

Ouch! I had a sympathetic shudder at your raster flashback, totally been there. I totally get your visual pattern matching instinct too - spooky cos that's how I do stuff too. Great minds.

For what it's worth, I use duckdb and its spatial stuff as my adapter. Works for my brain and if you force e.g. SQL files for each step, gets there in the same kind of way. Still some sharp edges, mind, but overall working well. And then Claude comes for my maths and I sob.