remove shapely speedups, since they are now on by default
This commit is contained in:
parent
3db68764a8
commit
fc5a339a65
1 changed files with 1 additions and 19 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue