-
Notifications
You must be signed in to change notification settings - Fork 2
JSTS sometimes takes too long #35
Comments
I'm dubious that we can do anything about it—I think this is just an inevitable byproduct of extremely detailed GeoJSON files. I imagine there may be some Javascript optimization wizardry to be done, but that's pretty substantially out of scope. :) |
Yeah, for the purposes of this site, it might make sense to downsample |
Ha! I'd be tickled to use one of Max's projects here. :) (He worked for US Open Data. Used to be on the board.) |
I gave it a quick shot: Some maps, like this one, end up with a really weird dashed line result: Others, like this one, just error out completely. In this case the complaint from JSTS is Feel free to bounce off Max if he's game. This is getting in over my head... |
Those internal dashed lines look like they used to be borders between shapes? It is trying to dissolve the yellow part of Virginia into a single polygon? Or were those supposed to remain separate? If you're trying to dissolve, it probably just needs to have a tiny buffer applied to prevent those slivers. |
@almccon correct. I union before I diff. However, those lines should still be visible in the final product. (See #30.) So, it's interesting that simplifying in this case half-fixes my problem of erasing data on union. But it's not a solution, it's a byproduct. |
Revisiting this...seems like JSTS operations would be a good candidate to push off to a web worker, to avoid locking the UI while the diff runs. |
Not sure what we can do to optimize, but I want to take a pass. It takes upwards of 30s for some diffs to render, e.g. http://openredist.org/#/open-redist/California-State-Senate/4
The text was updated successfully, but these errors were encountered: