3 ms·
I would even go further: this sounds like a database problem. Is the set of ship positions and watched polygons entirely different from run to run? If not, it
by lovasoa 2y ago
I would even go further: this sounds like a database problem.
Is the set of ship positions and watched polygons entirely different from run to run? If not, it should be possible to go much faster than even the new rust based approach that takes 6 hours.
I would have used a postgres database with a PostGIS spatial index.
- Waterluvian 2y agoAbsolutely. It’s kind of amusing to read a post that’s kind of dragging the wrong tool for the job, and then recommends another wrong tool for the job. The whole time I’m just yelling, “This is a geodatabase problem!” There’s the right way, the wrong way, and the Max Power way. Wrong but faster!
- schnirz 2y agoThis. While reading the post, I wondered when he'd mention something about spatial databases or spatial indexes.
- urschrei 2y agoAgreed. As someone who often advocates for the use of Rust to speed up perf-sensitive Python functions (and in particular, in the GIS domain), this sounds like they haven't fully understood the problem or thought about how to solve it more efficiently with a spatial index (which is easily done in Geopandas, let alone PostGIS). However, the post is a bit vague on details so who really knows.
- UncleEntity 2y agoI'd just throw it into a quadtree (or similar) and go get a coffee. I know there are some pretty fast bounding box algorithms from when I used to mess with such things but can't remember them off the top of my head.