WhereGroup / spatial_filter

A QGIS plugin to spatially filter project layers for speed and efficiency
GNU General Public License v3.0
7 stars 2 forks source link

Limit WKT coordinate precision to something reasonable #18

Open kannes opened 1 year ago

kannes commented 1 year ago

Limit coordinate precision in the filter string WKT to something reasonable. Don't always use 17 decimal places as that leads to huge filter strings and low performance when activating filters.

6 should be a good default. This is the same that GeoJSON recommends for WGS84 coordinates and usually users will use CRS with finer precision (so each decimal step corresponds with a much smaller spatial step compared to WGS84). Maybe use 7 to be safe.

Maybe add a menu/config option to set it?

kannes commented 1 year ago

.asWkt(precision=7) for every .asWkt()?