Loading django/contrib/gis/db/models/fields.py +2 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class GeometryField(Field): form_class = forms.GeometryField # Geodetic units. geodetic_units = ('Decimal Degree', 'degree') geodetic_units = ('decimal degree', 'degree') description = _("The base GIS field -- maps to the OpenGIS Specification Geometry type.") Loading Loading @@ -147,7 +147,7 @@ class GeometryField(Field): Returns true if this field's SRID corresponds with a coordinate system that uses non-projected units (e.g., latitude/longitude). """ return self.units_name(connection) in self.geodetic_units return self.units_name(connection).lower() in self.geodetic_units def get_distance(self, value, lookup_type, connection): """ Loading django/contrib/gis/db/models/query.py +1 −1 Original line number Diff line number Diff line Loading @@ -646,7 +646,7 @@ class GeoQuerySet(QuerySet): # been transformed via the `transform` GeoQuerySet method. if self.query.transformed_srid: u, unit_name, s = get_srid_info(self.query.transformed_srid, connection) geodetic = unit_name in geo_field.geodetic_units geodetic = unit_name.lower() in geo_field.geodetic_units if backend.spatialite and geodetic: raise ValueError('SQLite does not support linear distance calculations on geodetic coordinate systems.') Loading Loading
django/contrib/gis/db/models/fields.py +2 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ class GeometryField(Field): form_class = forms.GeometryField # Geodetic units. geodetic_units = ('Decimal Degree', 'degree') geodetic_units = ('decimal degree', 'degree') description = _("The base GIS field -- maps to the OpenGIS Specification Geometry type.") Loading Loading @@ -147,7 +147,7 @@ class GeometryField(Field): Returns true if this field's SRID corresponds with a coordinate system that uses non-projected units (e.g., latitude/longitude). """ return self.units_name(connection) in self.geodetic_units return self.units_name(connection).lower() in self.geodetic_units def get_distance(self, value, lookup_type, connection): """ Loading
django/contrib/gis/db/models/query.py +1 −1 Original line number Diff line number Diff line Loading @@ -646,7 +646,7 @@ class GeoQuerySet(QuerySet): # been transformed via the `transform` GeoQuerySet method. if self.query.transformed_srid: u, unit_name, s = get_srid_info(self.query.transformed_srid, connection) geodetic = unit_name in geo_field.geodetic_units geodetic = unit_name.lower() in geo_field.geodetic_units if backend.spatialite and geodetic: raise ValueError('SQLite does not support linear distance calculations on geodetic coordinate systems.') Loading