私はgeodjangoアプリを作ろうとしています。SQLite と SpatialLite を使用しています。ショップを追加して、自分の場所から最も近いものから最も遠いものへと並べ替えることができるようにしたいと考えています。
私のモデルで私が持っているとき:
location = gis_models.PointField(srid=4326, blank=True, null=True)
その後、追加は機能しますが、距離による並べ替えは機能しません。次のようになります。
SQLite does not support linear distance calculations on geodetic coordinate systems.
私が持っているとき:
location = gis_models.PointField(srid=3857, blank=True, null=True)
追加が機能せず、並べ替えが機能するよりも、次のようになります。
geo_shop.location violates Geometry constraint [geom-type or SRID not allowed]
両方を同時に機能させるにはどうすればよいですか?