acteng / will-it-fit

Apache License 2.0
2 stars 1 forks source link

Performance and optimizing bandwidth #8

Open dabreegster opened 3 months ago

dabreegster commented 3 months ago

Currently the raw OS polygons are stored in a flatgeobuffer, with a style code for debugging. There are many network requests to fetch an area, and the API call can easily take more than 30s for relatively small routes.

dabreegster commented 3 months ago

Seeing benefits for geomedea in https://github.com/a-b-street/15m/pull/8. The use case in this repo is much simpler -- just going to read polygons with no properties.

dabreegster commented 3 months ago

The polygon dissolving can be over-eager; the huge shape below is one big polygon! This really slows down perpendicular checks, because we look at loads of polygon edges that're irrelevant and the rtree can't filter out. image

dabreegster commented 3 months ago

I don't think there's an easy way to limit total area with mapshaper dissolve. Some other possible sources for dissolve logic:

dabreegster commented 3 months ago

512 perpendiculars, with a total of 110537699 line hit checks, taking over 12s total

Going to try georust booleaps, and if they have problems, the new spade versions