(self, compiler, connection, **extra_context)
| 351 | ) |
| 352 | |
| 353 | def as_sqlite(self, compiler, connection, **extra_context): |
| 354 | if self.geo_field.geodetic(connection): |
| 355 | # SpatiaLite returns NULL instead of zero on geodetic coordinates |
| 356 | extra_context["template"] = ( |
| 357 | "COALESCE(%(function)s(%(expressions)s, %(spheroid)s), 0)" |
| 358 | ) |
| 359 | extra_context["spheroid"] = int(bool(self.spheroid)) |
| 360 | return super().as_sql(compiler, connection, **extra_context) |
| 361 | |
| 362 | |
| 363 | class Envelope(GeomOutputGeoFunc): |