remove shapely speedups, since they are now on by default

This commit is contained in:
Laura Klünder 2025-03-13 21:28:13 +01:00
parent 3db68764a8
commit fc5a339a65

View file

@ -3,30 +3,12 @@ from collections import deque, namedtuple
from itertools import chain from itertools import chain
from typing import List, Sequence, Union from typing import List, Sequence, Union
from django.core import checks
from django.utils.functional import cached_property from django.utils.functional import cached_property
from shapely import prepared, speedups from shapely import prepared
from shapely.geometry import GeometryCollection, LinearRing, LineString, MultiLineString, MultiPolygon, Point, Polygon from shapely.geometry import GeometryCollection, LinearRing, LineString, MultiLineString, MultiPolygon, Point, Polygon
from shapely.geometry import mapping as shapely_mapping from shapely.geometry import mapping as shapely_mapping
from shapely.geometry import shape as shapely_shape from shapely.geometry import shape as shapely_shape
if speedups.available:
speedups.enable()
@checks.register()
def check_speedups(app_configs, **kwargs):
errors = []
if not speedups.available:
errors.append(
checks.Warning(
'Your shapely version does not have speedups enabled. This will significantly slow down c3nav!',
obj='shapely.speedups',
id='c3nav.mapdata.W001',
)
)
return errors
class WrappedGeometry(): class WrappedGeometry():
wrapped_geojson = None wrapped_geojson = None