mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 04:34:29 +08:00
Missing stubs (#467)
* adding missing db.backends typings and updated test * added missing stubs * reformatted files * removed contrib.postgres.forms * fixed test
This commit is contained in:
committed by
GitHub
parent
2a732fd257
commit
ce370ea79f
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,4 +11,5 @@ pip-wheel-metadata/
|
|||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
/.envrc
|
/.envrc
|
||||||
/.direnv
|
/.direnv
|
||||||
django-sources/
|
django-sources/
|
||||||
|
.venv/
|
||||||
4
django-stubs/contrib/admin/exceptions.pyi
Normal file
4
django-stubs/contrib/admin/exceptions.pyi
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from django.core.exceptions import SuspiciousOperation as SuspiciousOperation
|
||||||
|
|
||||||
|
class DisallowedModelAdminLookup(SuspiciousOperation): ...
|
||||||
|
class DisallowedModelAdminToField(SuspiciousOperation): ...
|
||||||
0
django-stubs/contrib/admin/migrations/__init__.pyi
Normal file
0
django-stubs/contrib/admin/migrations/__init__.pyi
Normal file
6
django-stubs/contrib/admindocs/apps.pyi
Normal file
6
django-stubs/contrib/admindocs/apps.pyi
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from django.apps import AppConfig as AppConfig
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class AdminDocsConfig(AppConfig):
|
||||||
|
name: str = ...
|
||||||
|
verbose_name: Any = ...
|
||||||
0
django-stubs/contrib/auth/migrations/__init__.pyi
Normal file
0
django-stubs/contrib/auth/migrations/__init__.pyi
Normal file
9
django-stubs/contrib/flatpages/admin.pyi
Normal file
9
django-stubs/contrib/flatpages/admin.pyi
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from django.contrib import admin as admin
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class FlatPageAdmin(admin.ModelAdmin):
|
||||||
|
form: Any = ...
|
||||||
|
fieldsets: Any = ...
|
||||||
|
list_display: Any = ...
|
||||||
|
list_filter: Any = ...
|
||||||
|
search_fields: Any = ...
|
||||||
6
django-stubs/contrib/flatpages/apps.pyi
Normal file
6
django-stubs/contrib/flatpages/apps.pyi
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from django.apps import AppConfig as AppConfig
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class FlatPagesConfig(AppConfig):
|
||||||
|
name: str = ...
|
||||||
|
verbose_name: Any = ...
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
default_app_config: str
|
||||||
|
|||||||
12
django-stubs/contrib/gis/admin/__init__.pyi
Normal file
12
django-stubs/contrib/gis/admin/__init__.pyi
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from django.contrib.admin import (
|
||||||
|
AdminSite as AdminSite,
|
||||||
|
HORIZONTAL as HORIZONTAL,
|
||||||
|
ModelAdmin as ModelAdmin,
|
||||||
|
StackedInline as StackedInline,
|
||||||
|
TabularInline as TabularInline,
|
||||||
|
VERTICAL as VERTICAL,
|
||||||
|
autodiscover as autodiscover,
|
||||||
|
register as register,
|
||||||
|
site as site,
|
||||||
|
)
|
||||||
|
from django.contrib.gis.admin.options import GeoModelAdmin as GeoModelAdmin, OSMGeoAdmin as OSMGeoAdmin
|
||||||
45
django-stubs/contrib/gis/admin/options.pyi
Normal file
45
django-stubs/contrib/gis/admin/options.pyi
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
from django.contrib.admin import ModelAdmin as ModelAdmin
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
spherical_mercator_srid: int
|
||||||
|
|
||||||
|
class GeoModelAdmin(ModelAdmin):
|
||||||
|
default_lon: int = ...
|
||||||
|
default_lat: int = ...
|
||||||
|
default_zoom: int = ...
|
||||||
|
display_wkt: bool = ...
|
||||||
|
display_srid: bool = ...
|
||||||
|
extra_js: Any = ...
|
||||||
|
num_zoom: int = ...
|
||||||
|
max_zoom: bool = ...
|
||||||
|
min_zoom: bool = ...
|
||||||
|
units: bool = ...
|
||||||
|
max_resolution: bool = ...
|
||||||
|
max_extent: bool = ...
|
||||||
|
modifiable: bool = ...
|
||||||
|
mouse_position: bool = ...
|
||||||
|
scale_text: bool = ...
|
||||||
|
layerswitcher: bool = ...
|
||||||
|
scrollable: bool = ...
|
||||||
|
map_width: int = ...
|
||||||
|
map_height: int = ...
|
||||||
|
map_srid: int = ...
|
||||||
|
map_template: str = ...
|
||||||
|
openlayers_url: str = ...
|
||||||
|
point_zoom: Any = ...
|
||||||
|
wms_url: str = ...
|
||||||
|
wms_layer: str = ...
|
||||||
|
wms_name: str = ...
|
||||||
|
wms_options: Any = ...
|
||||||
|
debug: bool = ...
|
||||||
|
widget: Any = ...
|
||||||
|
@property
|
||||||
|
def media(self): ...
|
||||||
|
def formfield_for_dbfield(self, db_field: Any, request: Any, **kwargs: Any): ...
|
||||||
|
def get_map_widget(self, db_field: Any): ...
|
||||||
|
|
||||||
|
class OSMGeoAdmin(GeoModelAdmin):
|
||||||
|
map_template: str = ...
|
||||||
|
num_zoom: int = ...
|
||||||
|
map_srid: Any = ...
|
||||||
|
point_zoom: Any = ...
|
||||||
9
django-stubs/contrib/gis/admin/widgets.pyi
Normal file
9
django-stubs/contrib/gis/admin/widgets.pyi
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from django.forms.widgets import Textarea as Textarea
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
geo_context: Any
|
||||||
|
logger: Any
|
||||||
|
|
||||||
|
class OpenLayersWidget(Textarea):
|
||||||
|
def get_context(self, name: Any, value: Any, attrs: Any): ...
|
||||||
|
def map_options(self): ...
|
||||||
7
django-stubs/contrib/gis/apps.pyi
Normal file
7
django-stubs/contrib/gis/apps.pyi
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
from django.apps import AppConfig as AppConfig
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GISConfig(AppConfig):
|
||||||
|
name: str = ...
|
||||||
|
verbose_name: Any = ...
|
||||||
|
def ready(self) -> None: ...
|
||||||
0
django-stubs/contrib/gis/db/backends/__init__.pyi
Normal file
0
django-stubs/contrib/gis/db/backends/__init__.pyi
Normal file
8
django-stubs/contrib/gis/db/backends/base/adapter.pyi
Normal file
8
django-stubs/contrib/gis/db/backends/base/adapter.pyi
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class WKTAdapter:
|
||||||
|
wkt: Any = ...
|
||||||
|
srid: Any = ...
|
||||||
|
def __init__(self, geom: Any) -> None: ...
|
||||||
|
def __eq__(self, other: Any) -> Any: ...
|
||||||
|
def __hash__(self) -> Any: ...
|
||||||
44
django-stubs/contrib/gis/db/backends/base/features.pyi
Normal file
44
django-stubs/contrib/gis/db/backends/base/features.pyi
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class BaseSpatialFeatures:
|
||||||
|
gis_enabled: bool = ...
|
||||||
|
has_spatialrefsys_table: bool = ...
|
||||||
|
supports_add_srs_entry: bool = ...
|
||||||
|
supports_geometry_field_introspection: bool = ...
|
||||||
|
supports_3d_storage: bool = ...
|
||||||
|
supports_3d_functions: bool = ...
|
||||||
|
supports_transform: bool = ...
|
||||||
|
supports_null_geometries: bool = ...
|
||||||
|
supports_empty_geometries: bool = ...
|
||||||
|
supports_distance_geodetic: bool = ...
|
||||||
|
supports_length_geodetic: bool = ...
|
||||||
|
supports_perimeter_geodetic: bool = ...
|
||||||
|
supports_area_geodetic: bool = ...
|
||||||
|
supports_num_points_poly: bool = ...
|
||||||
|
supports_left_right_lookups: bool = ...
|
||||||
|
supports_dwithin_distance_expr: bool = ...
|
||||||
|
supports_raster: bool = ...
|
||||||
|
supports_geometry_field_unique_index: bool = ...
|
||||||
|
@property
|
||||||
|
def supports_bbcontains_lookup(self): ...
|
||||||
|
@property
|
||||||
|
def supports_contained_lookup(self): ...
|
||||||
|
@property
|
||||||
|
def supports_crosses_lookup(self): ...
|
||||||
|
@property
|
||||||
|
def supports_distances_lookups(self): ...
|
||||||
|
@property
|
||||||
|
def supports_dwithin_lookup(self): ...
|
||||||
|
@property
|
||||||
|
def supports_relate_lookup(self): ...
|
||||||
|
@property
|
||||||
|
def supports_isvalid_lookup(self): ...
|
||||||
|
@property
|
||||||
|
def supports_collect_aggr(self): ...
|
||||||
|
@property
|
||||||
|
def supports_extent_aggr(self): ...
|
||||||
|
@property
|
||||||
|
def supports_make_line_aggr(self): ...
|
||||||
|
@property
|
||||||
|
def supports_union_aggr(self): ...
|
||||||
|
def __getattr__(self, name: Any): ...
|
||||||
33
django-stubs/contrib/gis/db/backends/base/models.pyi
Normal file
33
django-stubs/contrib/gis/db/backends/base/models.pyi
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class SpatialRefSysMixin:
|
||||||
|
@property
|
||||||
|
def srs(self): ...
|
||||||
|
@property
|
||||||
|
def ellipsoid(self): ...
|
||||||
|
@property
|
||||||
|
def name(self): ...
|
||||||
|
@property
|
||||||
|
def spheroid(self): ...
|
||||||
|
@property
|
||||||
|
def datum(self): ...
|
||||||
|
@property
|
||||||
|
def projected(self): ...
|
||||||
|
@property
|
||||||
|
def local(self): ...
|
||||||
|
@property
|
||||||
|
def geographic(self): ...
|
||||||
|
@property
|
||||||
|
def linear_name(self): ...
|
||||||
|
@property
|
||||||
|
def linear_units(self): ...
|
||||||
|
@property
|
||||||
|
def angular_name(self): ...
|
||||||
|
@property
|
||||||
|
def angular_units(self): ...
|
||||||
|
@property
|
||||||
|
def units(self): ...
|
||||||
|
@classmethod
|
||||||
|
def get_units(cls, wkt: Any): ...
|
||||||
|
@classmethod
|
||||||
|
def get_spheroid(cls, wkt: Any, string: bool = ...): ...
|
||||||
33
django-stubs/contrib/gis/db/backends/base/operations.pyi
Normal file
33
django-stubs/contrib/gis/db/backends/base/operations.pyi
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class BaseSpatialOperations:
|
||||||
|
postgis: bool = ...
|
||||||
|
spatialite: bool = ...
|
||||||
|
mysql: bool = ...
|
||||||
|
oracle: bool = ...
|
||||||
|
spatial_version: Any = ...
|
||||||
|
select: str = ...
|
||||||
|
def select_extent(self): ...
|
||||||
|
geography: bool = ...
|
||||||
|
geometry: bool = ...
|
||||||
|
disallowed_aggregates: Any = ...
|
||||||
|
geom_func_prefix: str = ...
|
||||||
|
function_names: Any = ...
|
||||||
|
unsupported_functions: Any = ...
|
||||||
|
from_text: bool = ...
|
||||||
|
def convert_extent(self, box: Any, srid: Any) -> None: ...
|
||||||
|
def convert_extent3d(self, box: Any, srid: Any) -> None: ...
|
||||||
|
def geo_quote_name(self, name: Any): ...
|
||||||
|
def geo_db_type(self, f: Any) -> None: ...
|
||||||
|
def get_distance(self, f: Any, value: Any, lookup_type: Any) -> None: ...
|
||||||
|
def get_geom_placeholder(self, f: Any, value: Any, compiler: Any): ...
|
||||||
|
def check_expression_support(self, expression: Any) -> None: ...
|
||||||
|
def spatial_aggregate_name(self, agg_name: Any) -> None: ...
|
||||||
|
def spatial_function_name(self, func_name: Any): ...
|
||||||
|
def geometry_columns(self) -> None: ...
|
||||||
|
def spatial_ref_sys(self) -> None: ...
|
||||||
|
distance_expr_for_lookup: Any = ...
|
||||||
|
def get_db_converters(self, expression: Any): ...
|
||||||
|
def get_geometry_converter(self, expression: Any) -> None: ...
|
||||||
|
def get_area_att_for_field(self, field: Any): ...
|
||||||
|
def get_distance_att_for_field(self, field: Any): ...
|
||||||
8
django-stubs/contrib/gis/db/backends/mysql/base.pyi
Normal file
8
django-stubs/contrib/gis/db/backends/mysql/base.pyi
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from django.db.backends.mysql.base import DatabaseWrapper as MySQLDatabaseWrapper
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class DatabaseWrapper(MySQLDatabaseWrapper):
|
||||||
|
SchemaEditorClass: Any = ...
|
||||||
|
features_class: Any = ...
|
||||||
|
introspection_class: Any = ...
|
||||||
|
ops_class: Any = ...
|
||||||
14
django-stubs/contrib/gis/db/backends/mysql/features.pyi
Normal file
14
django-stubs/contrib/gis/db/backends/mysql/features.pyi
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures as BaseSpatialFeatures
|
||||||
|
from django.db.backends.mysql.features import DatabaseFeatures as MySQLDatabaseFeatures
|
||||||
|
|
||||||
|
class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures):
|
||||||
|
has_spatialrefsys_table: bool = ...
|
||||||
|
supports_add_srs_entry: bool = ...
|
||||||
|
supports_distance_geodetic: bool = ...
|
||||||
|
supports_length_geodetic: bool = ...
|
||||||
|
supports_area_geodetic: bool = ...
|
||||||
|
supports_transform: bool = ...
|
||||||
|
supports_null_geometries: bool = ...
|
||||||
|
supports_num_points_poly: bool = ...
|
||||||
|
def supports_empty_geometry_collection(self): ...
|
||||||
|
def supports_geometry_field_unique_index(self): ...
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from django.db.backends.mysql.introspection import DatabaseIntrospection as DatabaseIntrospection
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class MySQLIntrospection(DatabaseIntrospection):
|
||||||
|
data_types_reverse: Any = ...
|
||||||
|
def get_geometry_type(self, table_name: Any, description: Any): ...
|
||||||
|
def supports_spatial_index(self, cursor: Any, table_name: Any): ...
|
||||||
17
django-stubs/contrib/gis/db/backends/mysql/operations.pyi
Normal file
17
django-stubs/contrib/gis/db/backends/mysql/operations.pyi
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.operations import BaseSpatialOperations as BaseSpatialOperations
|
||||||
|
from django.db.backends.mysql.operations import DatabaseOperations as DatabaseOperations
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class MySQLOperations(BaseSpatialOperations, DatabaseOperations):
|
||||||
|
mysql: bool = ...
|
||||||
|
name: str = ...
|
||||||
|
geom_func_prefix: str = ...
|
||||||
|
Adapter: Any = ...
|
||||||
|
def select(self): ...
|
||||||
|
def from_text(self): ...
|
||||||
|
def gis_operators(self): ...
|
||||||
|
disallowed_aggregates: Any = ...
|
||||||
|
def unsupported_functions(self): ...
|
||||||
|
def geo_db_type(self, f: Any): ...
|
||||||
|
def get_distance(self, f: Any, value: Any, lookup_type: Any): ...
|
||||||
|
def get_geometry_converter(self, expression: Any): ...
|
||||||
16
django-stubs/contrib/gis/db/backends/mysql/schema.pyi
Normal file
16
django-stubs/contrib/gis/db/backends/mysql/schema.pyi
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
from django.db.backends.mysql.schema import DatabaseSchemaEditor as DatabaseSchemaEditor
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
logger: Any
|
||||||
|
|
||||||
|
class MySQLGISSchemaEditor(DatabaseSchemaEditor):
|
||||||
|
sql_add_spatial_index: str = ...
|
||||||
|
sql_drop_spatial_index: str = ...
|
||||||
|
geometry_sql: Any = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def skip_default(self, field: Any): ...
|
||||||
|
def column_sql(self, model: Any, field: Any, include_default: bool = ...): ...
|
||||||
|
def create_model(self, model: Any) -> None: ...
|
||||||
|
def add_field(self, model: Any, field: Any) -> None: ...
|
||||||
|
def remove_field(self, model: Any, field: Any) -> None: ...
|
||||||
|
def create_spatial_indexes(self) -> None: ...
|
||||||
8
django-stubs/contrib/gis/db/backends/oracle/adapter.pyi
Normal file
8
django-stubs/contrib/gis/db/backends/oracle/adapter.pyi
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.adapter import WKTAdapter
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class OracleSpatialAdapter(WKTAdapter):
|
||||||
|
input_size: Any = ...
|
||||||
|
wkt: Any = ...
|
||||||
|
srid: Any = ...
|
||||||
|
def __init__(self, geom: Any) -> None: ...
|
||||||
8
django-stubs/contrib/gis/db/backends/oracle/base.pyi
Normal file
8
django-stubs/contrib/gis/db/backends/oracle/base.pyi
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from django.db.backends.oracle.base import DatabaseWrapper as OracleDatabaseWrapper
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class DatabaseWrapper(OracleDatabaseWrapper):
|
||||||
|
SchemaEditorClass: Any = ...
|
||||||
|
features_class: Any = ...
|
||||||
|
introspection_class: Any = ...
|
||||||
|
ops_class: Any = ...
|
||||||
9
django-stubs/contrib/gis/db/backends/oracle/features.pyi
Normal file
9
django-stubs/contrib/gis/db/backends/oracle/features.pyi
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures as BaseSpatialFeatures
|
||||||
|
from django.db.backends.oracle.features import DatabaseFeatures as OracleDatabaseFeatures
|
||||||
|
|
||||||
|
class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures):
|
||||||
|
supports_add_srs_entry: bool = ...
|
||||||
|
supports_geometry_field_introspection: bool = ...
|
||||||
|
supports_geometry_field_unique_index: bool = ...
|
||||||
|
supports_perimeter_geodetic: bool = ...
|
||||||
|
supports_dwithin_distance_expr: bool = ...
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
from django.db.backends.oracle.introspection import DatabaseIntrospection as DatabaseIntrospection
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class OracleIntrospection(DatabaseIntrospection):
|
||||||
|
def data_types_reverse(self): ...
|
||||||
|
def get_geometry_type(self, table_name: Any, description: Any): ...
|
||||||
30
django-stubs/contrib/gis/db/backends/oracle/models.pyi
Normal file
30
django-stubs/contrib/gis/db/backends/oracle/models.pyi
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
from django.contrib.gis.db import models as models
|
||||||
|
from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin as SpatialRefSysMixin
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class OracleGeometryColumns(models.Model):
|
||||||
|
table_name: Any = ...
|
||||||
|
column_name: Any = ...
|
||||||
|
srid: Any = ...
|
||||||
|
class Meta:
|
||||||
|
app_label: str = ...
|
||||||
|
db_table: str = ...
|
||||||
|
managed: bool = ...
|
||||||
|
@classmethod
|
||||||
|
def table_name_col(cls): ...
|
||||||
|
@classmethod
|
||||||
|
def geom_col_name(cls): ...
|
||||||
|
|
||||||
|
class OracleSpatialRefSys(models.Model, SpatialRefSysMixin):
|
||||||
|
cs_name: Any = ...
|
||||||
|
srid: Any = ...
|
||||||
|
auth_srid: Any = ...
|
||||||
|
auth_name: Any = ...
|
||||||
|
wktext: Any = ...
|
||||||
|
cs_bounds: Any = ...
|
||||||
|
class Meta:
|
||||||
|
app_label: str = ...
|
||||||
|
db_table: str = ...
|
||||||
|
managed: bool = ...
|
||||||
|
@property
|
||||||
|
def wkt(self): ...
|
||||||
42
django-stubs/contrib/gis/db/backends/oracle/operations.pyi
Normal file
42
django-stubs/contrib/gis/db/backends/oracle/operations.pyi
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.operations import BaseSpatialOperations as BaseSpatialOperations
|
||||||
|
from django.contrib.gis.db.backends.utils import SpatialOperator as SpatialOperator
|
||||||
|
from django.db.backends.oracle.operations import DatabaseOperations as DatabaseOperations
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
DEFAULT_TOLERANCE: str
|
||||||
|
|
||||||
|
class SDOOperator(SpatialOperator):
|
||||||
|
sql_template: str = ...
|
||||||
|
|
||||||
|
class SDODWithin(SpatialOperator):
|
||||||
|
sql_template: str = ...
|
||||||
|
|
||||||
|
class SDODisjoint(SpatialOperator):
|
||||||
|
sql_template: Any = ...
|
||||||
|
|
||||||
|
class SDORelate(SpatialOperator):
|
||||||
|
sql_template: str = ...
|
||||||
|
def check_relate_argument(self, arg: Any) -> None: ...
|
||||||
|
def as_sql(self, connection: Any, lookup: Any, template_params: Any, sql_params: Any): ...
|
||||||
|
|
||||||
|
class OracleOperations(BaseSpatialOperations, DatabaseOperations):
|
||||||
|
name: str = ...
|
||||||
|
oracle: bool = ...
|
||||||
|
disallowed_aggregates: Any = ...
|
||||||
|
Adapter: Any = ...
|
||||||
|
extent: str = ...
|
||||||
|
unionagg: str = ...
|
||||||
|
function_names: Any = ...
|
||||||
|
select: str = ...
|
||||||
|
gis_operators: Any = ...
|
||||||
|
unsupported_functions: Any = ...
|
||||||
|
def geo_quote_name(self, name: Any): ...
|
||||||
|
def geo_db_type(self, f: Any): ...
|
||||||
|
def get_distance(self, f: Any, value: Any, lookup_type: Any): ...
|
||||||
|
def get_geom_placeholder(self, f: Any, value: Any, compiler: Any): ...
|
||||||
|
def spatial_aggregate_name(self, agg_name: Any): ...
|
||||||
|
def geometry_columns(self): ...
|
||||||
|
def spatial_ref_sys(self): ...
|
||||||
|
def modify_insert_params(self, placeholder: Any, params: Any): ...
|
||||||
|
def get_geometry_converter(self, expression: Any): ...
|
||||||
|
def get_area_att_for_field(self, field: Any): ...
|
||||||
18
django-stubs/contrib/gis/db/backends/oracle/schema.pyi
Normal file
18
django-stubs/contrib/gis/db/backends/oracle/schema.pyi
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
from django.db.backends.oracle.schema import DatabaseSchemaEditor
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class OracleGISSchemaEditor(DatabaseSchemaEditor):
|
||||||
|
sql_add_geometry_metadata: str = ...
|
||||||
|
sql_add_spatial_index: str = ...
|
||||||
|
sql_drop_spatial_index: str = ...
|
||||||
|
sql_clear_geometry_table_metadata: str = ...
|
||||||
|
sql_clear_geometry_field_metadata: str = ...
|
||||||
|
geometry_sql: Any = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def geo_quote_name(self, name: Any): ...
|
||||||
|
def column_sql(self, model: Any, field: Any, include_default: bool = ...): ...
|
||||||
|
def create_model(self, model: Any) -> None: ...
|
||||||
|
def delete_model(self, model: Any) -> None: ...
|
||||||
|
def add_field(self, model: Any, field: Any) -> None: ...
|
||||||
|
def remove_field(self, model: Any, field: Any) -> None: ...
|
||||||
|
def run_geometry_sql(self) -> None: ...
|
||||||
13
django-stubs/contrib/gis/db/backends/postgis/adapter.pyi
Normal file
13
django-stubs/contrib/gis/db/backends/postgis/adapter.pyi
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class PostGISAdapter:
|
||||||
|
is_geometry: Any = ...
|
||||||
|
ewkb: Any = ...
|
||||||
|
srid: Any = ...
|
||||||
|
geography: Any = ...
|
||||||
|
def __init__(self, obj: Any, geography: bool = ...) -> None: ...
|
||||||
|
def __conform__(self, proto: Any): ...
|
||||||
|
def __eq__(self, other: Any) -> Any: ...
|
||||||
|
def __hash__(self) -> Any: ...
|
||||||
|
def prepare(self, conn: Any) -> None: ...
|
||||||
|
def getquoted(self): ...
|
||||||
10
django-stubs/contrib/gis/db/backends/postgis/base.pyi
Normal file
10
django-stubs/contrib/gis/db/backends/postgis/base.pyi
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from django.db.backends.postgresql.base import DatabaseWrapper as Psycopg2DatabaseWrapper
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class DatabaseWrapper(Psycopg2DatabaseWrapper):
|
||||||
|
SchemaEditorClass: Any = ...
|
||||||
|
features: Any = ...
|
||||||
|
ops: Any = ...
|
||||||
|
introspection: Any = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def prepare_database(self) -> None: ...
|
||||||
9
django-stubs/contrib/gis/db/backends/postgis/const.pyi
Normal file
9
django-stubs/contrib/gis/db/backends/postgis/const.pyi
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
GDAL_TO_POSTGIS: Any
|
||||||
|
POSTGIS_TO_GDAL: Any
|
||||||
|
POSTGIS_HEADER_STRUCTURE: str
|
||||||
|
GDAL_TO_STRUCT: Any
|
||||||
|
STRUCT_SIZE: Any
|
||||||
|
BANDTYPE_PIXTYPE_MASK: int
|
||||||
|
BANDTYPE_FLAG_HASNODATA: Any
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures as BaseSpatialFeatures
|
||||||
|
from django.db.backends.postgresql.features import DatabaseFeatures as Psycopg2DatabaseFeatures
|
||||||
|
|
||||||
|
class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures):
|
||||||
|
supports_3d_storage: bool = ...
|
||||||
|
supports_3d_functions: bool = ...
|
||||||
|
supports_left_right_lookups: bool = ...
|
||||||
|
supports_raster: bool = ...
|
||||||
|
supports_empty_geometries: bool = ...
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
from django.db.backends.postgresql.introspection import DatabaseIntrospection as DatabaseIntrospection
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class PostGISIntrospection(DatabaseIntrospection):
|
||||||
|
postgis_oid_lookup: Any = ...
|
||||||
|
ignored_tables: Any = ...
|
||||||
|
def get_field_type(self, data_type: Any, description: Any): ...
|
||||||
|
def get_geometry_type(self, table_name: Any, description: Any): ...
|
||||||
33
django-stubs/contrib/gis/db/backends/postgis/models.pyi
Normal file
33
django-stubs/contrib/gis/db/backends/postgis/models.pyi
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin as SpatialRefSysMixin
|
||||||
|
from django.db import models as models
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class PostGISGeometryColumns(models.Model):
|
||||||
|
f_table_catalog: Any = ...
|
||||||
|
f_table_schema: Any = ...
|
||||||
|
f_table_name: Any = ...
|
||||||
|
f_geometry_column: Any = ...
|
||||||
|
coord_dimension: Any = ...
|
||||||
|
srid: Any = ...
|
||||||
|
type: Any = ...
|
||||||
|
class Meta:
|
||||||
|
app_label: str = ...
|
||||||
|
db_table: str = ...
|
||||||
|
managed: bool = ...
|
||||||
|
@classmethod
|
||||||
|
def table_name_col(cls): ...
|
||||||
|
@classmethod
|
||||||
|
def geom_col_name(cls): ...
|
||||||
|
|
||||||
|
class PostGISSpatialRefSys(models.Model, SpatialRefSysMixin):
|
||||||
|
srid: Any = ...
|
||||||
|
auth_name: Any = ...
|
||||||
|
auth_srid: Any = ...
|
||||||
|
srtext: Any = ...
|
||||||
|
proj4text: Any = ...
|
||||||
|
class Meta:
|
||||||
|
app_label: str = ...
|
||||||
|
db_table: str = ...
|
||||||
|
managed: bool = ...
|
||||||
|
@property
|
||||||
|
def wkt(self): ...
|
||||||
56
django-stubs/contrib/gis/db/backends/postgis/operations.pyi
Normal file
56
django-stubs/contrib/gis/db/backends/postgis/operations.pyi
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.operations import BaseSpatialOperations
|
||||||
|
from django.contrib.gis.db.backends.utils import SpatialOperator
|
||||||
|
from django.db.backends.postgresql.operations import DatabaseOperations
|
||||||
|
from django.db.models import Func
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
BILATERAL: str
|
||||||
|
|
||||||
|
class PostGISOperator(SpatialOperator):
|
||||||
|
geography: Any = ...
|
||||||
|
raster: Any = ...
|
||||||
|
def __init__(self, geography: bool = ..., raster: bool = ..., **kwargs: Any) -> None: ...
|
||||||
|
def as_sql(self, connection: Any, lookup: Any, template_params: Any, *args: Any): ...
|
||||||
|
def check_raster(self, lookup: Any, template_params: Any): ...
|
||||||
|
|
||||||
|
class ST_Polygon(Func):
|
||||||
|
function: str = ...
|
||||||
|
def __init__(self, expr: Any) -> None: ...
|
||||||
|
def output_field(self): ...
|
||||||
|
|
||||||
|
class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
|
||||||
|
name: str = ...
|
||||||
|
postgis: bool = ...
|
||||||
|
geography: bool = ...
|
||||||
|
geom_func_prefix: str = ...
|
||||||
|
Adapter: Any = ...
|
||||||
|
collect: Any = ...
|
||||||
|
extent: Any = ...
|
||||||
|
extent3d: Any = ...
|
||||||
|
length3d: Any = ...
|
||||||
|
makeline: Any = ...
|
||||||
|
perimeter3d: Any = ...
|
||||||
|
unionagg: Any = ...
|
||||||
|
gis_operators: Any = ...
|
||||||
|
unsupported_functions: Any = ...
|
||||||
|
select: str = ...
|
||||||
|
select_extent: Any = ...
|
||||||
|
def function_names(self): ...
|
||||||
|
def spatial_version(self): ...
|
||||||
|
def geo_db_type(self, f: Any): ...
|
||||||
|
def get_distance(self, f: Any, dist_val: Any, lookup_type: Any): ...
|
||||||
|
def get_geom_placeholder(self, f: Any, value: Any, compiler: Any): ...
|
||||||
|
def postgis_geos_version(self): ...
|
||||||
|
def postgis_lib_version(self): ...
|
||||||
|
def postgis_proj_version(self): ...
|
||||||
|
def postgis_version(self): ...
|
||||||
|
def postgis_full_version(self): ...
|
||||||
|
def postgis_version_tuple(self): ...
|
||||||
|
def proj_version_tuple(self): ...
|
||||||
|
def spatial_aggregate_name(self, agg_name: Any): ...
|
||||||
|
def geometry_columns(self): ...
|
||||||
|
def spatial_ref_sys(self): ...
|
||||||
|
def parse_raster(self, value: Any): ...
|
||||||
|
def distance_expr_for_lookup(self, lhs: Any, rhs: Any, **kwargs: Any): ...
|
||||||
|
def get_geometry_converter(self, expression: Any): ...
|
||||||
|
def get_area_att_for_field(self, field: Any): ...
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
def pack(structure: Any, data: Any): ...
|
||||||
|
def unpack(structure: Any, data: Any): ...
|
||||||
|
def chunk(data: Any, index: Any): ...
|
||||||
|
def from_pgraster(data: Any): ...
|
||||||
|
def to_pgraster(rast: Any): ...
|
||||||
10
django-stubs/contrib/gis/db/backends/postgis/schema.pyi
Normal file
10
django-stubs/contrib/gis/db/backends/postgis/schema.pyi
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from django.db.backends.postgresql.schema import DatabaseSchemaEditor
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class PostGISSchemaEditor(DatabaseSchemaEditor):
|
||||||
|
geom_index_type: str = ...
|
||||||
|
geom_index_ops_nd: str = ...
|
||||||
|
rast_index_wrapper: str = ...
|
||||||
|
sql_alter_column_to_3d: str = ...
|
||||||
|
sql_alter_column_to_2d: str = ...
|
||||||
|
def geo_quote_name(self, name: Any): ...
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.adapter import WKTAdapter as WKTAdapter
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class SpatiaLiteAdapter(WKTAdapter):
|
||||||
|
def __conform__(self, protocol: Any): ...
|
||||||
13
django-stubs/contrib/gis/db/backends/spatialite/base.pyi
Normal file
13
django-stubs/contrib/gis/db/backends/spatialite/base.pyi
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from django.db.backends.sqlite3.base import DatabaseWrapper as SQLiteDatabaseWrapper
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class DatabaseWrapper(SQLiteDatabaseWrapper):
|
||||||
|
SchemaEditorClass: Any = ...
|
||||||
|
client_class: Any = ...
|
||||||
|
features_class: Any = ...
|
||||||
|
introspection_class: Any = ...
|
||||||
|
ops_class: Any = ...
|
||||||
|
lib_spatialite_paths: Any = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def get_new_connection(self, conn_params: Any): ...
|
||||||
|
def prepare_database(self) -> None: ...
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
from django.db.backends.sqlite3.client import DatabaseClient as DatabaseClient
|
||||||
|
|
||||||
|
class SpatiaLiteClient(DatabaseClient):
|
||||||
|
executable_name: str = ...
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures as BaseSpatialFeatures
|
||||||
|
from django.db.backends.sqlite3.features import DatabaseFeatures as SQLiteDatabaseFeatures
|
||||||
|
|
||||||
|
class DatabaseFeatures(BaseSpatialFeatures, SQLiteDatabaseFeatures):
|
||||||
|
supports_3d_storage: bool = ...
|
||||||
|
def supports_area_geodetic(self): ...
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
from django.db.backends.sqlite3.introspection import (
|
||||||
|
DatabaseIntrospection as DatabaseIntrospection,
|
||||||
|
FlexibleFieldLookupDict as FlexibleFieldLookupDict,
|
||||||
|
)
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict):
|
||||||
|
base_data_types_reverse: Any = ...
|
||||||
|
|
||||||
|
class SpatiaLiteIntrospection(DatabaseIntrospection):
|
||||||
|
data_types_reverse: Any = ...
|
||||||
|
def get_geometry_type(self, table_name: Any, description: Any): ...
|
||||||
|
def get_constraints(self, cursor: Any, table_name: Any): ...
|
||||||
33
django-stubs/contrib/gis/db/backends/spatialite/models.pyi
Normal file
33
django-stubs/contrib/gis/db/backends/spatialite/models.pyi
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin as SpatialRefSysMixin
|
||||||
|
from django.db import models as models
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class SpatialiteGeometryColumns(models.Model):
|
||||||
|
f_table_name: Any = ...
|
||||||
|
f_geometry_column: Any = ...
|
||||||
|
coord_dimension: Any = ...
|
||||||
|
srid: Any = ...
|
||||||
|
spatial_index_enabled: Any = ...
|
||||||
|
type: Any = ...
|
||||||
|
class Meta:
|
||||||
|
app_label: str = ...
|
||||||
|
db_table: str = ...
|
||||||
|
managed: bool = ...
|
||||||
|
@classmethod
|
||||||
|
def table_name_col(cls): ...
|
||||||
|
@classmethod
|
||||||
|
def geom_col_name(cls): ...
|
||||||
|
|
||||||
|
class SpatialiteSpatialRefSys(models.Model, SpatialRefSysMixin):
|
||||||
|
srid: Any = ...
|
||||||
|
auth_name: Any = ...
|
||||||
|
auth_srid: Any = ...
|
||||||
|
ref_sys_name: Any = ...
|
||||||
|
proj4text: Any = ...
|
||||||
|
srtext: Any = ...
|
||||||
|
class Meta:
|
||||||
|
app_label: str = ...
|
||||||
|
db_table: str = ...
|
||||||
|
managed: bool = ...
|
||||||
|
@property
|
||||||
|
def wkt(self): ...
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
from django.contrib.gis.db.backends.base.operations import BaseSpatialOperations
|
||||||
|
from django.contrib.gis.db.backends.utils import SpatialOperator as SpatialOperator
|
||||||
|
from django.db.backends.sqlite3.operations import DatabaseOperations
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class SpatialiteNullCheckOperator(SpatialOperator):
|
||||||
|
def as_sql(self, connection: Any, lookup: Any, template_params: Any, sql_params: Any): ...
|
||||||
|
|
||||||
|
class SpatiaLiteOperations(BaseSpatialOperations, DatabaseOperations):
|
||||||
|
name: str = ...
|
||||||
|
spatialite: bool = ...
|
||||||
|
Adapter: Any = ...
|
||||||
|
collect: str = ...
|
||||||
|
extent: str = ...
|
||||||
|
makeline: str = ...
|
||||||
|
unionagg: str = ...
|
||||||
|
gis_operators: Any = ...
|
||||||
|
disallowed_aggregates: Any = ...
|
||||||
|
select: str = ...
|
||||||
|
function_names: Any = ...
|
||||||
|
def unsupported_functions(self): ...
|
||||||
|
def spatial_version(self): ...
|
||||||
|
def geo_db_type(self, f: Any) -> None: ...
|
||||||
|
def get_distance(self, f: Any, value: Any, lookup_type: Any): ...
|
||||||
|
def geos_version(self): ...
|
||||||
|
def proj4_version(self): ...
|
||||||
|
def lwgeom_version(self): ...
|
||||||
|
def spatialite_version(self): ...
|
||||||
|
def spatialite_version_tuple(self): ...
|
||||||
|
def spatial_aggregate_name(self, agg_name: Any): ...
|
||||||
|
def geometry_columns(self): ...
|
||||||
|
def spatial_ref_sys(self): ...
|
||||||
|
def get_geometry_converter(self, expression: Any): ...
|
||||||
24
django-stubs/contrib/gis/db/backends/spatialite/schema.pyi
Normal file
24
django-stubs/contrib/gis/db/backends/spatialite/schema.pyi
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
from django.db.backends.sqlite3.schema import DatabaseSchemaEditor as DatabaseSchemaEditor
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class SpatialiteSchemaEditor(DatabaseSchemaEditor):
|
||||||
|
sql_add_geometry_column: str = ...
|
||||||
|
sql_add_spatial_index: str = ...
|
||||||
|
sql_drop_spatial_index: str = ...
|
||||||
|
sql_recover_geometry_metadata: str = ...
|
||||||
|
sql_remove_geometry_metadata: str = ...
|
||||||
|
sql_discard_geometry_columns: str = ...
|
||||||
|
sql_update_geometry_columns: str = ...
|
||||||
|
geometry_tables: Any = ...
|
||||||
|
geometry_sql: Any = ...
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def geo_quote_name(self, name: Any): ...
|
||||||
|
def column_sql(self, model: Any, field: Any, include_default: bool = ...): ...
|
||||||
|
def remove_geometry_metadata(self, model: Any, field: Any) -> None: ...
|
||||||
|
def create_model(self, model: Any) -> None: ...
|
||||||
|
def delete_model(self, model: Any, **kwargs: Any) -> None: ...
|
||||||
|
def add_field(self, model: Any, field: Any) -> None: ...
|
||||||
|
def remove_field(self, model: Any, field: Any) -> None: ...
|
||||||
|
def alter_db_table(
|
||||||
|
self, model: Any, old_db_table: Any, new_db_table: Any, disable_constraints: bool = ...
|
||||||
|
) -> None: ...
|
||||||
10
django-stubs/contrib/gis/db/backends/utils.pyi
Normal file
10
django-stubs/contrib/gis/db/backends/utils.pyi
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class SpatialOperator:
|
||||||
|
sql_template: Any = ...
|
||||||
|
op: Any = ...
|
||||||
|
func: Any = ...
|
||||||
|
def __init__(self, op: Optional[Any] = ..., func: Optional[Any] = ...) -> None: ...
|
||||||
|
@property
|
||||||
|
def default_template(self): ...
|
||||||
|
def as_sql(self, connection: Any, lookup: Any, template_params: Any, sql_params: Any): ...
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
# noqa: F401
|
||||||
from django.db.models import *
|
from django.db.models import *
|
||||||
|
from django.contrib.gis.db.models.aggregates import *
|
||||||
from .fields import (
|
from django.contrib.gis.db.models.fields import (
|
||||||
|
GeometryCollectionField as GeometryCollectionField,
|
||||||
GeometryField as GeometryField,
|
GeometryField as GeometryField,
|
||||||
LineStringField as LineStringField,
|
LineStringField as LineStringField,
|
||||||
MultiLineStringField as MultiLineStringField,
|
MultiLineStringField as MultiLineStringField,
|
||||||
@@ -8,6 +10,5 @@ from .fields import (
|
|||||||
MultiPolygonField as MultiPolygonField,
|
MultiPolygonField as MultiPolygonField,
|
||||||
PointField as PointField,
|
PointField as PointField,
|
||||||
PolygonField as PolygonField,
|
PolygonField as PolygonField,
|
||||||
GeometryCollectionField as GeometryCollectionField,
|
|
||||||
RasterField as RasterField,
|
RasterField as RasterField,
|
||||||
)
|
)
|
||||||
|
|||||||
37
django-stubs/contrib/gis/db/models/aggregates.pyi
Normal file
37
django-stubs/contrib/gis/db/models/aggregates.pyi
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
from django.db.models import Aggregate
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class GeoAggregate(Aggregate):
|
||||||
|
function: Any = ...
|
||||||
|
is_extent: bool = ...
|
||||||
|
def output_field(self): ...
|
||||||
|
def as_sql(self, compiler: Any, connection: Any, function: Optional[Any] = ..., **extra_context: Any): ...
|
||||||
|
def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
def resolve_expression(
|
||||||
|
self,
|
||||||
|
query: Optional[Any] = ...,
|
||||||
|
allow_joins: bool = ...,
|
||||||
|
reuse: Optional[Any] = ...,
|
||||||
|
summarize: bool = ...,
|
||||||
|
for_save: bool = ...,
|
||||||
|
): ...
|
||||||
|
|
||||||
|
class Collect(GeoAggregate):
|
||||||
|
name: str = ...
|
||||||
|
output_field_class: Any = ...
|
||||||
|
|
||||||
|
class Extent(GeoAggregate):
|
||||||
|
name: str = ...
|
||||||
|
def __init__(self, expression: Any, **extra: Any) -> None: ...
|
||||||
|
|
||||||
|
class Extent3D(GeoAggregate):
|
||||||
|
name: str = ...
|
||||||
|
def __init__(self, expression: Any, **extra: Any) -> None: ...
|
||||||
|
|
||||||
|
class MakeLine(GeoAggregate):
|
||||||
|
name: str = ...
|
||||||
|
output_field_class: Any = ...
|
||||||
|
|
||||||
|
class Union(GeoAggregate):
|
||||||
|
name: str = ...
|
||||||
|
output_field_class: Any = ...
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
from typing import Any, Iterable, NamedTuple, Optional, TypeVar, Union, Tuple
|
from typing import Any, Iterable, NamedTuple, Optional, TypeVar, Union, Tuple
|
||||||
|
|
||||||
from django.db.models.fields import Field, _ErrorMessagesToOverride, _FieldChoices, _ValidatorCallable
|
from django.db.models.fields import Field, _ErrorMessagesToOverride, _FieldChoices, _ValidatorCallable
|
||||||
|
|
||||||
_Connection = Any
|
|
||||||
|
|
||||||
# __set__ value type
|
# __set__ value type
|
||||||
_ST = TypeVar("_ST")
|
_ST = TypeVar("_ST")
|
||||||
# __get__ return type
|
# __get__ return type
|
||||||
@@ -15,7 +12,7 @@ class SRIDCacheEntry(NamedTuple):
|
|||||||
geodetic: bool
|
geodetic: bool
|
||||||
spheroid: str
|
spheroid: str
|
||||||
|
|
||||||
def get_srid_info(srid: int, connection: _Connection) -> SRIDCacheEntry: ...
|
def get_srid_info(srid: int, connection: Any) -> SRIDCacheEntry: ...
|
||||||
|
|
||||||
class BaseSpatialField(Field[_ST, _GT]):
|
class BaseSpatialField(Field[_ST, _GT]):
|
||||||
def __init__(
|
def __init__(
|
||||||
@@ -44,12 +41,25 @@ class BaseSpatialField(Field[_ST, _GT]):
|
|||||||
validators: Iterable[_ValidatorCallable] = ...,
|
validators: Iterable[_ValidatorCallable] = ...,
|
||||||
error_messages: Optional[_ErrorMessagesToOverride] = ...,
|
error_messages: Optional[_ErrorMessagesToOverride] = ...,
|
||||||
): ...
|
): ...
|
||||||
def spheroid(self, connection: _Connection) -> str: ...
|
def deconstruct(self): ...
|
||||||
def units(self, connection: _Connection) -> Any: ...
|
def db_type(self, connection: Any): ...
|
||||||
def units_name(self, connection: _Connection) -> str: ...
|
def spheroid(self, connection: Any): ...
|
||||||
def geodetic(self, connection: _Connection) -> bool: ...
|
def units(self, connection: Any): ...
|
||||||
|
def units_name(self, connection: Any): ...
|
||||||
|
def geodetic(self, connection: Any): ...
|
||||||
|
def get_placeholder(self, value: Any, compiler: Any, connection: Any): ...
|
||||||
|
def get_srid(self, obj: Any): ...
|
||||||
|
def get_db_prep_value(self, value: Any, connection: Any, *args: Any, **kwargs: Any): ...
|
||||||
|
def get_raster_prep_value(self, value: Any, is_candidate: Any): ...
|
||||||
|
def get_prep_value(self, value: Any): ...
|
||||||
|
|
||||||
class GeometryField(BaseSpatialField):
|
class GeometryField(BaseSpatialField):
|
||||||
|
description: Any = ...
|
||||||
|
form_class: Any = ...
|
||||||
|
geom_type: str = ...
|
||||||
|
geom_class: Any = ...
|
||||||
|
dim: Any = ...
|
||||||
|
geography: Any = ...
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
verbose_name: Optional[Union[str, bytes]] = ...,
|
verbose_name: Optional[Union[str, bytes]] = ...,
|
||||||
@@ -80,12 +90,61 @@ class GeometryField(BaseSpatialField):
|
|||||||
validators: Iterable[_ValidatorCallable] = ...,
|
validators: Iterable[_ValidatorCallable] = ...,
|
||||||
error_messages: Optional[_ErrorMessagesToOverride] = ...,
|
error_messages: Optional[_ErrorMessagesToOverride] = ...,
|
||||||
): ...
|
): ...
|
||||||
|
def deconstruct(self): ...
|
||||||
|
def formfield(self, **kwargs: Any): ...
|
||||||
|
def select_format(self, compiler: Any, sql: Any, params: Any): ...
|
||||||
|
|
||||||
class PointField(GeometryField): ...
|
class PointField(GeometryField):
|
||||||
class LineStringField(GeometryField): ...
|
geom_type: str = ...
|
||||||
class PolygonField(GeometryField): ...
|
geom_class: Any = ...
|
||||||
class MultiPointField(GeometryField): ...
|
form_class: Any = ...
|
||||||
class MultiLineStringField(GeometryField): ...
|
description: Any = ...
|
||||||
class MultiPolygonField(GeometryField): ...
|
|
||||||
class GeometryCollectionField(GeometryField): ...
|
class LineStringField(GeometryField):
|
||||||
class RasterField(BaseSpatialField): ...
|
geom_type: str = ...
|
||||||
|
geom_class: Any = ...
|
||||||
|
form_class: Any = ...
|
||||||
|
description: Any = ...
|
||||||
|
|
||||||
|
class PolygonField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
geom_class: Any = ...
|
||||||
|
form_class: Any = ...
|
||||||
|
description: Any = ...
|
||||||
|
|
||||||
|
class MultiPointField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
geom_class: Any = ...
|
||||||
|
form_class: Any = ...
|
||||||
|
description: Any = ...
|
||||||
|
|
||||||
|
class MultiLineStringField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
geom_class: Any = ...
|
||||||
|
form_class: Any = ...
|
||||||
|
description: Any = ...
|
||||||
|
|
||||||
|
class MultiPolygonField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
geom_class: Any = ...
|
||||||
|
form_class: Any = ...
|
||||||
|
description: Any = ...
|
||||||
|
|
||||||
|
class GeometryCollectionField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
geom_class: Any = ...
|
||||||
|
form_class: Any = ...
|
||||||
|
description: Any = ...
|
||||||
|
|
||||||
|
class ExtentField(Field):
|
||||||
|
description: Any = ...
|
||||||
|
def get_internal_type(self): ...
|
||||||
|
def select_format(self, compiler: Any, sql: Any, params: Any): ...
|
||||||
|
|
||||||
|
class RasterField(BaseSpatialField):
|
||||||
|
description: Any = ...
|
||||||
|
geom_type: str = ...
|
||||||
|
geography: bool = ...
|
||||||
|
def db_type(self, connection: Any): ...
|
||||||
|
def from_db_value(self, value: Any, expression: Any, connection: Any): ...
|
||||||
|
def get_transform(self, name: Any): ...
|
||||||
|
|||||||
168
django-stubs/contrib/gis/db/models/functions.pyi
Normal file
168
django-stubs/contrib/gis/db/models/functions.pyi
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
from django.db.models import Func, Transform as StandardTransform
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
NUMERIC_TYPES: Any
|
||||||
|
|
||||||
|
class GeoFuncMixin:
|
||||||
|
function: Any = ...
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
def __init__(self, *expressions: Any, **extra: Any) -> None: ...
|
||||||
|
def geo_field(self): ...
|
||||||
|
def as_sql(self, compiler: Any, connection: Any, function: Optional[Any] = ..., **extra_context: Any): ...
|
||||||
|
def resolve_expression(self, *args: Any, **kwargs: Any): ...
|
||||||
|
|
||||||
|
class GeoFunc(GeoFuncMixin, Func): ...
|
||||||
|
|
||||||
|
class GeomOutputGeoFunc(GeoFunc):
|
||||||
|
def output_field(self): ...
|
||||||
|
|
||||||
|
class SQLiteDecimalToFloatMixin:
|
||||||
|
def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class OracleToleranceMixin:
|
||||||
|
tolerance: float = ...
|
||||||
|
def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class Area(OracleToleranceMixin, GeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
def output_field(self): ...
|
||||||
|
def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class Azimuth(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
arity: int = ...
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
|
||||||
|
class AsGeoJSON(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
def __init__(
|
||||||
|
self, expression: Any, bbox: bool = ..., crs: bool = ..., precision: int = ..., **extra: Any
|
||||||
|
) -> None: ...
|
||||||
|
def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class AsGML(GeoFunc):
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
output_field: Any = ...
|
||||||
|
def __init__(self, expression: Any, version: int = ..., precision: int = ..., **extra: Any) -> None: ...
|
||||||
|
def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class AsKML(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
def __init__(self, expression: Any, precision: int = ..., **extra: Any) -> None: ...
|
||||||
|
|
||||||
|
class AsSVG(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
def __init__(self, expression: Any, relative: bool = ..., precision: int = ..., **extra: Any) -> None: ...
|
||||||
|
|
||||||
|
class AsWKB(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class AsWKT(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class BoundingCircle(OracleToleranceMixin, GeoFunc):
|
||||||
|
def __init__(self, expression: Any, num_seg: int = ..., **extra: Any) -> None: ...
|
||||||
|
def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class Centroid(OracleToleranceMixin, GeomOutputGeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class Difference(OracleToleranceMixin, GeomOutputGeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
|
||||||
|
class DistanceResultMixin:
|
||||||
|
def output_field(self): ...
|
||||||
|
def source_is_geography(self): ...
|
||||||
|
|
||||||
|
class Distance(DistanceResultMixin, OracleToleranceMixin, GeoFunc):
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
spheroid: Any = ...
|
||||||
|
def __init__(self, expr1: Any, expr2: Any, spheroid: Optional[Any] = ..., **extra: Any) -> None: ...
|
||||||
|
def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class Envelope(GeomOutputGeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class ForcePolygonCW(GeomOutputGeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class GeoHash(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
def __init__(self, expression: Any, precision: Optional[Any] = ..., **extra: Any) -> None: ...
|
||||||
|
def as_mysql(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class GeometryDistance(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
arity: int = ...
|
||||||
|
function: str = ...
|
||||||
|
arg_joiner: str = ...
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
|
||||||
|
class Intersection(OracleToleranceMixin, GeomOutputGeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
|
||||||
|
class IsValid(OracleToleranceMixin, GeoFuncMixin, StandardTransform):
|
||||||
|
lookup_name: str = ...
|
||||||
|
output_field: Any = ...
|
||||||
|
def as_oracle(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class Length(DistanceResultMixin, OracleToleranceMixin, GeoFunc):
|
||||||
|
spheroid: Any = ...
|
||||||
|
def __init__(self, expr1: Any, spheroid: bool = ..., **extra: Any) -> None: ...
|
||||||
|
def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class LineLocatePoint(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
arity: int = ...
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
|
||||||
|
class MakeValid(GeomOutputGeoFunc): ...
|
||||||
|
|
||||||
|
class MemSize(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class NumGeometries(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class NumPoints(GeoFunc):
|
||||||
|
output_field: Any = ...
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class Perimeter(DistanceResultMixin, OracleToleranceMixin, GeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
def as_postgresql(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class PointOnSurface(OracleToleranceMixin, GeomOutputGeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class Reverse(GeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
|
||||||
|
class Scale(SQLiteDecimalToFloatMixin, GeomOutputGeoFunc):
|
||||||
|
def __init__(self, expression: Any, x: Any, y: Any, z: float = ..., **extra: Any) -> None: ...
|
||||||
|
|
||||||
|
class SnapToGrid(SQLiteDecimalToFloatMixin, GeomOutputGeoFunc):
|
||||||
|
def __init__(self, expression: Any, *args: Any, **extra: Any) -> None: ...
|
||||||
|
|
||||||
|
class SymDifference(OracleToleranceMixin, GeomOutputGeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
geom_param_pos: Any = ...
|
||||||
|
|
||||||
|
class Transform(GeomOutputGeoFunc):
|
||||||
|
def __init__(self, expression: Any, srid: Any, **extra: Any) -> None: ...
|
||||||
|
|
||||||
|
class Translate(Scale):
|
||||||
|
def as_sqlite(self, compiler: Any, connection: Any, **extra_context: Any): ...
|
||||||
|
|
||||||
|
class Union(OracleToleranceMixin, GeomOutputGeoFunc):
|
||||||
|
arity: int = ...
|
||||||
|
geom_param_pos: Any = ...
|
||||||
126
django-stubs/contrib/gis/db/models/lookups.pyi
Normal file
126
django-stubs/contrib/gis/db/models/lookups.pyi
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
from django.db.models import Lookup, Transform
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class RasterBandTransform(Transform): ...
|
||||||
|
|
||||||
|
class GISLookup(Lookup):
|
||||||
|
sql_template: Any = ...
|
||||||
|
transform_func: Any = ...
|
||||||
|
distance: bool = ...
|
||||||
|
band_rhs: Any = ...
|
||||||
|
band_lhs: Any = ...
|
||||||
|
template_params: Any = ...
|
||||||
|
def __init__(self, lhs: Any, rhs: Any) -> None: ...
|
||||||
|
def process_rhs_params(self) -> None: ...
|
||||||
|
def process_band_indices(self, only_lhs: bool = ...) -> None: ...
|
||||||
|
def get_db_prep_lookup(self, value: Any, connection: Any): ...
|
||||||
|
rhs: Any = ...
|
||||||
|
def process_rhs(self, compiler: Any, connection: Any): ...
|
||||||
|
def get_rhs_op(self, connection: Any, rhs: Any): ...
|
||||||
|
def as_sql(self, compiler: Any, connection: Any): ...
|
||||||
|
|
||||||
|
class OverlapsLeftLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class OverlapsRightLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class OverlapsBelowLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class OverlapsAboveLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class LeftLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class RightLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class StrictlyBelowLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class StrictlyAboveLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class SameAsLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class BBContainsLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class BBOverlapsLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class ContainedLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class ContainsLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class ContainsProperlyLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class CoveredByLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class CoversLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class CrossesLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class DisjointLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class EqualsLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class IntersectsLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class OverlapsLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class RelateLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
sql_template: str = ...
|
||||||
|
pattern_regex: Any = ...
|
||||||
|
def process_rhs(self, compiler: Any, connection: Any): ...
|
||||||
|
|
||||||
|
class TouchesLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class WithinLookup(GISLookup):
|
||||||
|
lookup_name: str = ...
|
||||||
|
|
||||||
|
class DistanceLookupBase(GISLookup):
|
||||||
|
distance: bool = ...
|
||||||
|
sql_template: str = ...
|
||||||
|
def process_rhs_params(self) -> None: ...
|
||||||
|
def process_distance(self, compiler: Any, connection: Any): ...
|
||||||
|
|
||||||
|
class DWithinLookup(DistanceLookupBase):
|
||||||
|
lookup_name: str = ...
|
||||||
|
sql_template: str = ...
|
||||||
|
def process_distance(self, compiler: Any, connection: Any): ...
|
||||||
|
def process_rhs(self, compiler: Any, connection: Any): ...
|
||||||
|
|
||||||
|
class DistanceLookupFromFunction(DistanceLookupBase):
|
||||||
|
def as_sql(self, compiler: Any, connection: Any): ...
|
||||||
|
|
||||||
|
class DistanceGTLookup(DistanceLookupFromFunction):
|
||||||
|
lookup_name: str = ...
|
||||||
|
op: str = ...
|
||||||
|
|
||||||
|
class DistanceGTELookup(DistanceLookupFromFunction):
|
||||||
|
lookup_name: str = ...
|
||||||
|
op: str = ...
|
||||||
|
|
||||||
|
class DistanceLTLookup(DistanceLookupFromFunction):
|
||||||
|
lookup_name: str = ...
|
||||||
|
op: str = ...
|
||||||
|
|
||||||
|
class DistanceLTELookup(DistanceLookupFromFunction):
|
||||||
|
lookup_name: str = ...
|
||||||
|
op: str = ...
|
||||||
7
django-stubs/contrib/gis/db/models/proxy.pyi
Normal file
7
django-stubs/contrib/gis/db/models/proxy.pyi
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
from django.db.models.query_utils import DeferredAttribute
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class SpatialProxy(DeferredAttribute):
|
||||||
|
def __init__(self, klass: Any, field: Any, load_func: Optional[Any] = ...) -> None: ...
|
||||||
|
def __get__(self, instance: Any, cls: Optional[Any] = ...): ...
|
||||||
|
def __set__(self, instance: Any, value: Any): ...
|
||||||
0
django-stubs/contrib/gis/db/models/sql/__init__.pyi
Normal file
0
django-stubs/contrib/gis/db/models/sql/__init__.pyi
Normal file
18
django-stubs/contrib/gis/db/models/sql/conversion.pyi
Normal file
18
django-stubs/contrib/gis/db/models/sql/conversion.pyi
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
from django.db import models as models
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class AreaField(models.FloatField):
|
||||||
|
geo_field: Any = ...
|
||||||
|
def __init__(self, geo_field: Any) -> None: ...
|
||||||
|
def get_prep_value(self, value: Any): ...
|
||||||
|
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
|
||||||
|
def from_db_value(self, value: Any, expression: Any, connection: Any): ...
|
||||||
|
def get_internal_type(self): ...
|
||||||
|
|
||||||
|
class DistanceField(models.FloatField):
|
||||||
|
geo_field: Any = ...
|
||||||
|
def __init__(self, geo_field: Any) -> None: ...
|
||||||
|
def get_prep_value(self, value: Any): ...
|
||||||
|
def get_db_prep_value(self, value: Any, connection: Any, prepared: bool = ...): ...
|
||||||
|
def from_db_value(self, value: Any, expression: Any, connection: Any): ...
|
||||||
|
def get_internal_type(self): ...
|
||||||
28
django-stubs/contrib/gis/feeds.pyi
Normal file
28
django-stubs/contrib/gis/feeds.pyi
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
from django.contrib.syndication.views import Feed as BaseFeed
|
||||||
|
from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GeoFeedMixin:
|
||||||
|
def georss_coords(self, coords: Any): ...
|
||||||
|
def add_georss_point(self, handler: Any, coords: Any, w3c_geo: bool = ...) -> None: ...
|
||||||
|
def add_georss_element(self, handler: Any, item: Any, w3c_geo: bool = ...) -> None: ...
|
||||||
|
|
||||||
|
class GeoRSSFeed(Rss201rev2Feed, GeoFeedMixin):
|
||||||
|
def rss_attributes(self): ...
|
||||||
|
def add_item_elements(self, handler: Any, item: Any) -> None: ...
|
||||||
|
def add_root_elements(self, handler: Any) -> None: ...
|
||||||
|
|
||||||
|
class GeoAtom1Feed(Atom1Feed, GeoFeedMixin):
|
||||||
|
def root_attributes(self): ...
|
||||||
|
def add_item_elements(self, handler: Any, item: Any) -> None: ...
|
||||||
|
def add_root_elements(self, handler: Any) -> None: ...
|
||||||
|
|
||||||
|
class W3CGeoFeed(Rss201rev2Feed, GeoFeedMixin):
|
||||||
|
def rss_attributes(self): ...
|
||||||
|
def add_item_elements(self, handler: Any, item: Any) -> None: ...
|
||||||
|
def add_root_elements(self, handler: Any) -> None: ...
|
||||||
|
|
||||||
|
class Feed(BaseFeed):
|
||||||
|
feed_type: Any = ...
|
||||||
|
def feed_extra_kwargs(self, obj: Any): ...
|
||||||
|
def item_extra_kwargs(self, item: Any): ...
|
||||||
0
django-stubs/contrib/gis/forms/__init__.pyi
Normal file
0
django-stubs/contrib/gis/forms/__init__.pyi
Normal file
33
django-stubs/contrib/gis/forms/fields.pyi
Normal file
33
django-stubs/contrib/gis/forms/fields.pyi
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
from django import forms as forms
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class GeometryField(forms.Field):
|
||||||
|
widget: Any = ...
|
||||||
|
geom_type: str = ...
|
||||||
|
default_error_messages: Any = ...
|
||||||
|
srid: Any = ...
|
||||||
|
def __init__(self, *, srid: Optional[Any] = ..., geom_type: Optional[Any] = ..., **kwargs: Any) -> None: ...
|
||||||
|
def to_python(self, value: Any): ...
|
||||||
|
def clean(self, value: Any): ...
|
||||||
|
def has_changed(self, initial: Any, data: Any): ...
|
||||||
|
|
||||||
|
class GeometryCollectionField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
|
||||||
|
class PointField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
|
||||||
|
class MultiPointField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
|
||||||
|
class LineStringField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
|
||||||
|
class MultiLineStringField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
|
||||||
|
class PolygonField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
|
|
||||||
|
class MultiPolygonField(GeometryField):
|
||||||
|
geom_type: str = ...
|
||||||
34
django-stubs/contrib/gis/forms/widgets.pyi
Normal file
34
django-stubs/contrib/gis/forms/widgets.pyi
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
from django.forms.widgets import Widget as Widget
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
logger: Any
|
||||||
|
|
||||||
|
class BaseGeometryWidget(Widget):
|
||||||
|
geom_type: str = ...
|
||||||
|
map_srid: int = ...
|
||||||
|
map_width: int = ...
|
||||||
|
map_height: int = ...
|
||||||
|
display_raw: bool = ...
|
||||||
|
supports_3d: bool = ...
|
||||||
|
template_name: str = ...
|
||||||
|
attrs: Any = ...
|
||||||
|
def __init__(self, attrs: Optional[Any] = ...) -> None: ...
|
||||||
|
def serialize(self, value: Any): ...
|
||||||
|
def deserialize(self, value: Any): ...
|
||||||
|
def get_context(self, name: Any, value: Any, attrs: Any): ...
|
||||||
|
|
||||||
|
class OpenLayersWidget(BaseGeometryWidget):
|
||||||
|
template_name: str = ...
|
||||||
|
map_srid: int = ...
|
||||||
|
class Media:
|
||||||
|
css: Any = ...
|
||||||
|
js: Any = ...
|
||||||
|
def serialize(self, value: Any): ...
|
||||||
|
def deserialize(self, value: Any): ...
|
||||||
|
|
||||||
|
class OSMWidget(OpenLayersWidget):
|
||||||
|
template_name: str = ...
|
||||||
|
default_lon: int = ...
|
||||||
|
default_lat: int = ...
|
||||||
|
default_zoom: int = ...
|
||||||
|
def __init__(self, attrs: Optional[Any] = ...) -> None: ...
|
||||||
15
django-stubs/contrib/gis/gdal/__init__.pyi
Normal file
15
django-stubs/contrib/gis/gdal/__init__.pyi
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from django.contrib.gis.gdal.error import (
|
||||||
|
GDALException as GDALException,
|
||||||
|
SRSException as SRSException,
|
||||||
|
check_err as check_err,
|
||||||
|
)
|
||||||
|
from django.contrib.gis.gdal.libgdal import (
|
||||||
|
GDAL_VERSION as GDAL_VERSION,
|
||||||
|
gdal_full_version as gdal_full_version,
|
||||||
|
gdal_version as gdal_version,
|
||||||
|
)
|
||||||
|
from django.contrib.gis.gdal.srs import (
|
||||||
|
AxisOrder as AxisOrder,
|
||||||
|
CoordTransform as CoordTransform,
|
||||||
|
SpatialReference as SpatialReference,
|
||||||
|
)
|
||||||
5
django-stubs/contrib/gis/gdal/base.pyi
Normal file
5
django-stubs/contrib/gis/gdal/base.pyi
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from django.contrib.gis.ptr import CPointerBase as CPointerBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GDALBase(CPointerBase):
|
||||||
|
null_ptr_exception_class: Any = ...
|
||||||
15
django-stubs/contrib/gis/gdal/datasource.pyi
Normal file
15
django-stubs/contrib/gis/gdal/datasource.pyi
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from django.contrib.gis.gdal.base import GDALBase as GDALBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class DataSource(GDALBase):
|
||||||
|
destructor: Any = ...
|
||||||
|
encoding: Any = ...
|
||||||
|
ptr: Any = ...
|
||||||
|
driver: Any = ...
|
||||||
|
def __init__(self, ds_input: Any, ds_driver: bool = ..., write: bool = ..., encoding: str = ...) -> None: ...
|
||||||
|
def __getitem__(self, index: Any): ...
|
||||||
|
def __len__(self): ...
|
||||||
|
@property
|
||||||
|
def layer_count(self): ...
|
||||||
|
@property
|
||||||
|
def name(self): ...
|
||||||
12
django-stubs/contrib/gis/gdal/driver.pyi
Normal file
12
django-stubs/contrib/gis/gdal/driver.pyi
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from django.contrib.gis.gdal.base import GDALBase as GDALBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class Driver(GDALBase):
|
||||||
|
ptr: Any = ...
|
||||||
|
def __init__(self, dr_input: Any) -> None: ...
|
||||||
|
@classmethod
|
||||||
|
def ensure_registered(cls) -> None: ...
|
||||||
|
@classmethod
|
||||||
|
def driver_count(cls): ...
|
||||||
|
@property
|
||||||
|
def name(self): ...
|
||||||
25
django-stubs/contrib/gis/gdal/envelope.pyi
Normal file
25
django-stubs/contrib/gis/gdal/envelope.pyi
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
from ctypes import Structure
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class OGREnvelope(Structure): ...
|
||||||
|
|
||||||
|
class Envelope:
|
||||||
|
def __init__(self, *args: Any) -> None: ...
|
||||||
|
def __eq__(self, other: Any) -> Any: ...
|
||||||
|
def expand_to_include(self, *args: Any): ...
|
||||||
|
@property
|
||||||
|
def min_x(self): ...
|
||||||
|
@property
|
||||||
|
def min_y(self): ...
|
||||||
|
@property
|
||||||
|
def max_x(self): ...
|
||||||
|
@property
|
||||||
|
def max_y(self): ...
|
||||||
|
@property
|
||||||
|
def ur(self): ...
|
||||||
|
@property
|
||||||
|
def ll(self): ...
|
||||||
|
@property
|
||||||
|
def tuple(self): ...
|
||||||
|
@property
|
||||||
|
def wkt(self): ...
|
||||||
10
django-stubs/contrib/gis/gdal/error.pyi
Normal file
10
django-stubs/contrib/gis/gdal/error.pyi
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GDALException(Exception): ...
|
||||||
|
class SRSException(Exception): ...
|
||||||
|
|
||||||
|
OGRERR_DICT: Any
|
||||||
|
CPLERR_DICT: Any
|
||||||
|
ERR_NONE: int
|
||||||
|
|
||||||
|
def check_err(code: Any, cpl: bool = ...) -> None: ...
|
||||||
26
django-stubs/contrib/gis/gdal/feature.pyi
Normal file
26
django-stubs/contrib/gis/gdal/feature.pyi
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
from django.contrib.gis.gdal.base import GDALBase as GDALBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class Feature(GDALBase):
|
||||||
|
destructor: Any = ...
|
||||||
|
ptr: Any = ...
|
||||||
|
def __init__(self, feat: Any, layer: Any) -> None: ...
|
||||||
|
def __getitem__(self, index: Any): ...
|
||||||
|
def __len__(self): ...
|
||||||
|
def __eq__(self, other: Any) -> Any: ...
|
||||||
|
@property
|
||||||
|
def encoding(self): ...
|
||||||
|
@property
|
||||||
|
def fid(self): ...
|
||||||
|
@property
|
||||||
|
def layer_name(self): ...
|
||||||
|
@property
|
||||||
|
def num_fields(self): ...
|
||||||
|
@property
|
||||||
|
def fields(self): ...
|
||||||
|
@property
|
||||||
|
def geom(self): ...
|
||||||
|
@property
|
||||||
|
def geom_type(self): ...
|
||||||
|
def get(self, field: Any): ...
|
||||||
|
def index(self, field_name: Any): ...
|
||||||
61
django-stubs/contrib/gis/gdal/field.pyi
Normal file
61
django-stubs/contrib/gis/gdal/field.pyi
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
from django.contrib.gis.gdal.base import GDALBase as GDALBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class Field(GDALBase):
|
||||||
|
ptr: Any = ...
|
||||||
|
__class__: Any = ...
|
||||||
|
def __init__(self, feat: Any, index: Any) -> None: ...
|
||||||
|
def as_double(self): ...
|
||||||
|
def as_int(self, is_64: bool = ...): ...
|
||||||
|
def as_string(self): ...
|
||||||
|
def as_datetime(self): ...
|
||||||
|
@property
|
||||||
|
def is_set(self): ...
|
||||||
|
@property
|
||||||
|
def name(self): ...
|
||||||
|
@property
|
||||||
|
def precision(self): ...
|
||||||
|
@property
|
||||||
|
def type(self): ...
|
||||||
|
@property
|
||||||
|
def type_name(self): ...
|
||||||
|
@property
|
||||||
|
def value(self): ...
|
||||||
|
@property
|
||||||
|
def width(self): ...
|
||||||
|
|
||||||
|
class OFTInteger(Field):
|
||||||
|
@property
|
||||||
|
def value(self): ...
|
||||||
|
@property
|
||||||
|
def type(self): ...
|
||||||
|
|
||||||
|
class OFTReal(Field):
|
||||||
|
@property
|
||||||
|
def value(self): ...
|
||||||
|
|
||||||
|
class OFTString(Field): ...
|
||||||
|
class OFTWideString(Field): ...
|
||||||
|
class OFTBinary(Field): ...
|
||||||
|
|
||||||
|
class OFTDate(Field):
|
||||||
|
@property
|
||||||
|
def value(self): ...
|
||||||
|
|
||||||
|
class OFTDateTime(Field):
|
||||||
|
@property
|
||||||
|
def value(self): ...
|
||||||
|
|
||||||
|
class OFTTime(Field):
|
||||||
|
@property
|
||||||
|
def value(self): ...
|
||||||
|
|
||||||
|
class OFTInteger64(OFTInteger): ...
|
||||||
|
class OFTIntegerList(Field): ...
|
||||||
|
class OFTRealList(Field): ...
|
||||||
|
class OFTStringList(Field): ...
|
||||||
|
class OFTWideStringList(Field): ...
|
||||||
|
class OFTInteger64List(Field): ...
|
||||||
|
|
||||||
|
OGRFieldTypes: Any
|
||||||
|
ROGRFieldTypes: Any
|
||||||
138
django-stubs/contrib/gis/gdal/geometries.pyi
Normal file
138
django-stubs/contrib/gis/gdal/geometries.pyi
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
from django.contrib.gis.gdal.base import GDALBase as GDALBase
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class OGRGeometry(GDALBase):
|
||||||
|
destructor: Any = ...
|
||||||
|
ptr: Any = ...
|
||||||
|
srs: Any = ...
|
||||||
|
__class__: Any = ...
|
||||||
|
def __init__(self, geom_input: Any, srs: Optional[Any] = ...) -> None: ...
|
||||||
|
@classmethod
|
||||||
|
def from_bbox(cls, bbox: Any): ...
|
||||||
|
@staticmethod
|
||||||
|
def from_json(geom_input: Any): ...
|
||||||
|
@classmethod
|
||||||
|
def from_gml(cls, gml_string: Any): ...
|
||||||
|
def __or__(self, other: Any): ...
|
||||||
|
def __and__(self, other: Any): ...
|
||||||
|
def __sub__(self, other: Any): ...
|
||||||
|
def __xor__(self, other: Any): ...
|
||||||
|
def __eq__(self, other: Any) -> Any: ...
|
||||||
|
@property
|
||||||
|
def dimension(self): ...
|
||||||
|
coord_dim: Any = ...
|
||||||
|
@property
|
||||||
|
def geom_count(self): ...
|
||||||
|
@property
|
||||||
|
def point_count(self): ...
|
||||||
|
@property
|
||||||
|
def num_points(self): ...
|
||||||
|
@property
|
||||||
|
def num_coords(self): ...
|
||||||
|
@property
|
||||||
|
def geom_type(self): ...
|
||||||
|
@property
|
||||||
|
def geom_name(self): ...
|
||||||
|
@property
|
||||||
|
def area(self): ...
|
||||||
|
@property
|
||||||
|
def envelope(self): ...
|
||||||
|
@property
|
||||||
|
def empty(self): ...
|
||||||
|
@property
|
||||||
|
def extent(self): ...
|
||||||
|
srid: Any = ...
|
||||||
|
@property
|
||||||
|
def geos(self): ...
|
||||||
|
@property
|
||||||
|
def gml(self): ...
|
||||||
|
@property
|
||||||
|
def hex(self): ...
|
||||||
|
@property
|
||||||
|
def json(self): ...
|
||||||
|
geojson: Any = ...
|
||||||
|
@property
|
||||||
|
def kml(self): ...
|
||||||
|
@property
|
||||||
|
def wkb_size(self): ...
|
||||||
|
@property
|
||||||
|
def wkb(self): ...
|
||||||
|
@property
|
||||||
|
def wkt(self): ...
|
||||||
|
@property
|
||||||
|
def ewkt(self): ...
|
||||||
|
def clone(self): ...
|
||||||
|
def close_rings(self) -> None: ...
|
||||||
|
def transform(self, coord_trans: Any, clone: bool = ...): ...
|
||||||
|
def intersects(self, other: Any): ...
|
||||||
|
def equals(self, other: Any): ...
|
||||||
|
def disjoint(self, other: Any): ...
|
||||||
|
def touches(self, other: Any): ...
|
||||||
|
def crosses(self, other: Any): ...
|
||||||
|
def within(self, other: Any): ...
|
||||||
|
def contains(self, other: Any): ...
|
||||||
|
def overlaps(self, other: Any): ...
|
||||||
|
@property
|
||||||
|
def boundary(self): ...
|
||||||
|
@property
|
||||||
|
def convex_hull(self): ...
|
||||||
|
def difference(self, other: Any): ...
|
||||||
|
def intersection(self, other: Any): ...
|
||||||
|
def sym_difference(self, other: Any): ...
|
||||||
|
def union(self, other: Any): ...
|
||||||
|
|
||||||
|
class Point(OGRGeometry):
|
||||||
|
@property
|
||||||
|
def x(self): ...
|
||||||
|
@property
|
||||||
|
def y(self): ...
|
||||||
|
@property
|
||||||
|
def z(self): ...
|
||||||
|
@property
|
||||||
|
def tuple(self): ...
|
||||||
|
coords: Any = ...
|
||||||
|
|
||||||
|
class LineString(OGRGeometry):
|
||||||
|
def __getitem__(self, index: Any): ...
|
||||||
|
def __len__(self): ...
|
||||||
|
@property
|
||||||
|
def tuple(self): ...
|
||||||
|
coords: Any = ...
|
||||||
|
@property
|
||||||
|
def x(self): ...
|
||||||
|
@property
|
||||||
|
def y(self): ...
|
||||||
|
@property
|
||||||
|
def z(self): ...
|
||||||
|
|
||||||
|
class LinearRing(LineString): ...
|
||||||
|
|
||||||
|
class Polygon(OGRGeometry):
|
||||||
|
def __len__(self): ...
|
||||||
|
def __getitem__(self, index: Any): ...
|
||||||
|
@property
|
||||||
|
def shell(self): ...
|
||||||
|
exterior_ring: Any = ...
|
||||||
|
@property
|
||||||
|
def tuple(self): ...
|
||||||
|
coords: Any = ...
|
||||||
|
@property
|
||||||
|
def point_count(self): ...
|
||||||
|
@property
|
||||||
|
def centroid(self): ...
|
||||||
|
|
||||||
|
class GeometryCollection(OGRGeometry):
|
||||||
|
def __getitem__(self, index: Any): ...
|
||||||
|
def __len__(self): ...
|
||||||
|
def add(self, geom: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def point_count(self): ...
|
||||||
|
@property
|
||||||
|
def tuple(self): ...
|
||||||
|
coords: Any = ...
|
||||||
|
|
||||||
|
class MultiPoint(GeometryCollection): ...
|
||||||
|
class MultiLineString(GeometryCollection): ...
|
||||||
|
class MultiPolygon(GeometryCollection): ...
|
||||||
|
|
||||||
|
GEO_CLASSES: Any
|
||||||
12
django-stubs/contrib/gis/gdal/geomtype.pyi
Normal file
12
django-stubs/contrib/gis/gdal/geomtype.pyi
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class OGRGeomType:
|
||||||
|
wkb25bit: int = ...
|
||||||
|
num: Any = ...
|
||||||
|
def __init__(self, type_input: Any) -> None: ...
|
||||||
|
def __eq__(self, other: Any) -> Any: ...
|
||||||
|
@property
|
||||||
|
def name(self): ...
|
||||||
|
@property
|
||||||
|
def django(self): ...
|
||||||
|
def to_multi(self) -> None: ...
|
||||||
31
django-stubs/contrib/gis/gdal/layer.pyi
Normal file
31
django-stubs/contrib/gis/gdal/layer.pyi
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
from django.contrib.gis.gdal.base import GDALBase as GDALBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class Layer(GDALBase):
|
||||||
|
ptr: Any = ...
|
||||||
|
def __init__(self, layer_ptr: Any, ds: Any) -> None: ...
|
||||||
|
def __getitem__(self, index: Any): ...
|
||||||
|
def __iter__(self) -> Any: ...
|
||||||
|
def __len__(self): ...
|
||||||
|
@property
|
||||||
|
def extent(self): ...
|
||||||
|
@property
|
||||||
|
def name(self): ...
|
||||||
|
@property
|
||||||
|
def num_fields(self): ...
|
||||||
|
@property
|
||||||
|
def geom_type(self): ...
|
||||||
|
@property
|
||||||
|
def srs(self): ...
|
||||||
|
@property
|
||||||
|
def fields(self): ...
|
||||||
|
@property
|
||||||
|
def field_types(self): ...
|
||||||
|
@property
|
||||||
|
def field_widths(self): ...
|
||||||
|
@property
|
||||||
|
def field_precisions(self): ...
|
||||||
|
spatial_filter: Any = ...
|
||||||
|
def get_fields(self, field_name: Any): ...
|
||||||
|
def get_geoms(self, geos: bool = ...): ...
|
||||||
|
def test_capability(self, capability: Any): ...
|
||||||
20
django-stubs/contrib/gis/gdal/libgdal.pyi
Normal file
20
django-stubs/contrib/gis/gdal/libgdal.pyi
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
logger: Any
|
||||||
|
lib_path: Any
|
||||||
|
lib_names: Any
|
||||||
|
lgdal: Any
|
||||||
|
lwingdal: Any
|
||||||
|
|
||||||
|
def std_call(func: Any): ...
|
||||||
|
def gdal_version(): ...
|
||||||
|
def gdal_full_version(): ...
|
||||||
|
def gdal_version_info(): ...
|
||||||
|
|
||||||
|
GDAL_VERSION: Any
|
||||||
|
CPLErrorHandler: Any
|
||||||
|
|
||||||
|
def err_handler(error_class: Any, error_number: Any, message: Any) -> None: ...
|
||||||
|
def function(name: Any, args: Any, restype: Any): ...
|
||||||
|
|
||||||
|
set_error_handler: Any
|
||||||
51
django-stubs/contrib/gis/gdal/prototypes/ds.pyi
Normal file
51
django-stubs/contrib/gis/gdal/prototypes/ds.pyi
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
c_int_p: Any
|
||||||
|
register_all: Any
|
||||||
|
cleanup_all: Any
|
||||||
|
get_driver: Any
|
||||||
|
get_driver_by_name: Any
|
||||||
|
get_driver_count: Any
|
||||||
|
get_driver_name: Any
|
||||||
|
open_ds: Any
|
||||||
|
destroy_ds: Any
|
||||||
|
release_ds: Any
|
||||||
|
get_ds_name: Any
|
||||||
|
get_layer: Any
|
||||||
|
get_layer_by_name: Any
|
||||||
|
get_layer_count: Any
|
||||||
|
get_extent: Any
|
||||||
|
get_feature: Any
|
||||||
|
get_feature_count: Any
|
||||||
|
get_layer_defn: Any
|
||||||
|
get_layer_srs: Any
|
||||||
|
get_next_feature: Any
|
||||||
|
reset_reading: Any
|
||||||
|
test_capability: Any
|
||||||
|
get_spatial_filter: Any
|
||||||
|
set_spatial_filter: Any
|
||||||
|
set_spatial_filter_rect: Any
|
||||||
|
get_fd_geom_type: Any
|
||||||
|
get_fd_name: Any
|
||||||
|
get_feat_name: Any
|
||||||
|
get_field_count: Any
|
||||||
|
get_field_defn: Any
|
||||||
|
clone_feature: Any
|
||||||
|
destroy_feature: Any
|
||||||
|
feature_equal: Any
|
||||||
|
get_feat_geom_ref: Any
|
||||||
|
get_feat_field_count: Any
|
||||||
|
get_feat_field_defn: Any
|
||||||
|
get_fid: Any
|
||||||
|
get_field_as_datetime: Any
|
||||||
|
get_field_as_double: Any
|
||||||
|
get_field_as_integer: Any
|
||||||
|
get_field_as_integer64: Any
|
||||||
|
is_field_set: Any
|
||||||
|
get_field_as_string: Any
|
||||||
|
get_field_index: Any
|
||||||
|
get_field_name: Any
|
||||||
|
get_field_precision: Any
|
||||||
|
get_field_type: Any
|
||||||
|
get_field_type_name: Any
|
||||||
|
get_field_width: Any
|
||||||
14
django-stubs/contrib/gis/gdal/prototypes/errcheck.pyi
Normal file
14
django-stubs/contrib/gis/gdal/prototypes/errcheck.pyi
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
def arg_byref(args: Any, offset: int = ...): ...
|
||||||
|
def ptr_byref(args: Any, offset: int = ...): ...
|
||||||
|
def check_const_string(result: Any, func: Any, cargs: Any, offset: Optional[Any] = ..., cpl: bool = ...): ...
|
||||||
|
def check_string(result: Any, func: Any, cargs: Any, offset: int = ..., str_result: bool = ...): ...
|
||||||
|
def check_envelope(result: Any, func: Any, cargs: Any, offset: int = ...): ...
|
||||||
|
def check_geom(result: Any, func: Any, cargs: Any): ...
|
||||||
|
def check_geom_offset(result: Any, func: Any, cargs: Any, offset: int = ...): ...
|
||||||
|
def check_srs(result: Any, func: Any, cargs: Any): ...
|
||||||
|
def check_arg_errcode(result: Any, func: Any, cargs: Any, cpl: bool = ...): ...
|
||||||
|
def check_errcode(result: Any, func: Any, cargs: Any, cpl: bool = ...) -> None: ...
|
||||||
|
def check_pointer(result: Any, func: Any, cargs: Any): ...
|
||||||
|
def check_str_arg(result: Any, func: Any, cargs: Any): ...
|
||||||
20
django-stubs/contrib/gis/gdal/prototypes/generation.pyi
Normal file
20
django-stubs/contrib/gis/gdal/prototypes/generation.pyi
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
from ctypes import c_char_p
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class gdal_char_p(c_char_p): ...
|
||||||
|
|
||||||
|
def bool_output(func: Any, argtypes: Any, errcheck: Optional[Any] = ...): ...
|
||||||
|
def double_output(func: Any, argtypes: Any, errcheck: bool = ..., strarg: bool = ..., cpl: bool = ...): ...
|
||||||
|
def geom_output(func: Any, argtypes: Any, offset: Optional[Any] = ...): ...
|
||||||
|
def int_output(func: Any, argtypes: Any, errcheck: Optional[Any] = ...): ...
|
||||||
|
def int64_output(func: Any, argtypes: Any): ...
|
||||||
|
def srs_output(func: Any, argtypes: Any): ...
|
||||||
|
def const_string_output(
|
||||||
|
func: Any, argtypes: Any, offset: Optional[Any] = ..., decoding: Optional[Any] = ..., cpl: bool = ...
|
||||||
|
): ...
|
||||||
|
def string_output(
|
||||||
|
func: Any, argtypes: Any, offset: int = ..., str_result: bool = ..., decoding: Optional[Any] = ...
|
||||||
|
): ...
|
||||||
|
def void_output(func: Any, argtypes: Any, errcheck: bool = ..., cpl: bool = ...): ...
|
||||||
|
def voidptr_output(func: Any, argtypes: Any, errcheck: bool = ...): ...
|
||||||
|
def chararray_output(func: Any, argtypes: Any, errcheck: bool = ...): ...
|
||||||
56
django-stubs/contrib/gis/gdal/prototypes/geom.pyi
Normal file
56
django-stubs/contrib/gis/gdal/prototypes/geom.pyi
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
def env_func(f: Any, argtypes: Any): ...
|
||||||
|
def pnt_func(f: Any): ...
|
||||||
|
def topology_func(f: Any): ...
|
||||||
|
|
||||||
|
from_json: Any
|
||||||
|
to_json: Any
|
||||||
|
to_kml: Any
|
||||||
|
getx: Any
|
||||||
|
gety: Any
|
||||||
|
getz: Any
|
||||||
|
from_wkb: Any
|
||||||
|
from_wkt: Any
|
||||||
|
from_gml: Any
|
||||||
|
create_geom: Any
|
||||||
|
clone_geom: Any
|
||||||
|
get_geom_ref: Any
|
||||||
|
get_boundary: Any
|
||||||
|
geom_convex_hull: Any
|
||||||
|
geom_diff: Any
|
||||||
|
geom_intersection: Any
|
||||||
|
geom_sym_diff: Any
|
||||||
|
geom_union: Any
|
||||||
|
add_geom: Any
|
||||||
|
import_wkt: Any
|
||||||
|
destroy_geom: Any
|
||||||
|
to_wkb: Any
|
||||||
|
to_wkt: Any
|
||||||
|
to_gml: Any
|
||||||
|
get_wkbsize: Any
|
||||||
|
assign_srs: Any
|
||||||
|
get_geom_srs: Any
|
||||||
|
get_area: Any
|
||||||
|
get_centroid: Any
|
||||||
|
get_dims: Any
|
||||||
|
get_coord_dim: Any
|
||||||
|
set_coord_dim: Any
|
||||||
|
is_empty: Any
|
||||||
|
get_geom_count: Any
|
||||||
|
get_geom_name: Any
|
||||||
|
get_geom_type: Any
|
||||||
|
get_point_count: Any
|
||||||
|
get_point: Any
|
||||||
|
geom_close_rings: Any
|
||||||
|
ogr_contains: Any
|
||||||
|
ogr_crosses: Any
|
||||||
|
ogr_disjoint: Any
|
||||||
|
ogr_equals: Any
|
||||||
|
ogr_intersects: Any
|
||||||
|
ogr_overlaps: Any
|
||||||
|
ogr_touches: Any
|
||||||
|
ogr_within: Any
|
||||||
|
geom_transform: Any
|
||||||
|
geom_transform_to: Any
|
||||||
|
get_envelope: Any
|
||||||
48
django-stubs/contrib/gis/gdal/prototypes/raster.pyi
Normal file
48
django-stubs/contrib/gis/gdal/prototypes/raster.pyi
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
register_all: Any
|
||||||
|
get_driver: Any
|
||||||
|
get_driver_by_name: Any
|
||||||
|
get_driver_count: Any
|
||||||
|
get_driver_description: Any
|
||||||
|
create_ds: Any
|
||||||
|
open_ds: Any
|
||||||
|
close_ds: Any
|
||||||
|
flush_ds: Any
|
||||||
|
copy_ds: Any
|
||||||
|
add_band_ds: Any
|
||||||
|
get_ds_description: Any
|
||||||
|
get_ds_driver: Any
|
||||||
|
get_ds_xsize: Any
|
||||||
|
get_ds_ysize: Any
|
||||||
|
get_ds_raster_count: Any
|
||||||
|
get_ds_raster_band: Any
|
||||||
|
get_ds_projection_ref: Any
|
||||||
|
set_ds_projection_ref: Any
|
||||||
|
get_ds_geotransform: Any
|
||||||
|
set_ds_geotransform: Any
|
||||||
|
get_ds_metadata: Any
|
||||||
|
set_ds_metadata: Any
|
||||||
|
get_ds_metadata_domain_list: Any
|
||||||
|
get_ds_metadata_item: Any
|
||||||
|
set_ds_metadata_item: Any
|
||||||
|
free_dsl: Any
|
||||||
|
get_ds_info: Any
|
||||||
|
band_io: Any
|
||||||
|
get_band_xsize: Any
|
||||||
|
get_band_ysize: Any
|
||||||
|
get_band_index: Any
|
||||||
|
get_band_description: Any
|
||||||
|
get_band_ds: Any
|
||||||
|
get_band_datatype: Any
|
||||||
|
get_band_color_interp: Any
|
||||||
|
get_band_nodata_value: Any
|
||||||
|
set_band_nodata_value: Any
|
||||||
|
delete_band_nodata_value: Any
|
||||||
|
get_band_statistics: Any
|
||||||
|
compute_band_statistics: Any
|
||||||
|
reproject_image: Any
|
||||||
|
auto_create_warped_vrt: Any
|
||||||
|
create_vsi_file_from_mem_buffer: Any
|
||||||
|
get_mem_buffer_from_vsi_file: Any
|
||||||
|
unlink_vsi_file: Any
|
||||||
36
django-stubs/contrib/gis/gdal/prototypes/srs.pyi
Normal file
36
django-stubs/contrib/gis/gdal/prototypes/srs.pyi
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
def srs_double(f: Any): ...
|
||||||
|
def units_func(f: Any): ...
|
||||||
|
|
||||||
|
clone_srs: Any
|
||||||
|
new_srs: Any
|
||||||
|
release_srs: Any
|
||||||
|
destroy_srs: Any
|
||||||
|
srs_validate: Any
|
||||||
|
set_axis_strategy: Any
|
||||||
|
semi_major: Any
|
||||||
|
semi_minor: Any
|
||||||
|
invflattening: Any
|
||||||
|
from_wkt: Any
|
||||||
|
from_proj: Any
|
||||||
|
from_epsg: Any
|
||||||
|
from_xml: Any
|
||||||
|
from_user_input: Any
|
||||||
|
morph_to_esri: Any
|
||||||
|
morph_from_esri: Any
|
||||||
|
identify_epsg: Any
|
||||||
|
linear_units: Any
|
||||||
|
angular_units: Any
|
||||||
|
to_wkt: Any
|
||||||
|
to_proj: Any
|
||||||
|
to_pretty_wkt: Any
|
||||||
|
to_xml: Any
|
||||||
|
get_attr_value: Any
|
||||||
|
get_auth_name: Any
|
||||||
|
get_auth_code: Any
|
||||||
|
isgeographic: Any
|
||||||
|
islocal: Any
|
||||||
|
isprojected: Any
|
||||||
|
new_ct: Any
|
||||||
|
destroy_ct: Any
|
||||||
0
django-stubs/contrib/gis/gdal/raster/__init__.pyi
Normal file
0
django-stubs/contrib/gis/gdal/raster/__init__.pyi
Normal file
44
django-stubs/contrib/gis/gdal/raster/band.pyi
Normal file
44
django-stubs/contrib/gis/gdal/raster/band.pyi
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
from django.contrib.gis.gdal.raster.base import GDALRasterBase as GDALRasterBase
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class GDALBand(GDALRasterBase):
|
||||||
|
source: Any = ...
|
||||||
|
def __init__(self, source: Any, index: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def description(self): ...
|
||||||
|
@property
|
||||||
|
def width(self): ...
|
||||||
|
@property
|
||||||
|
def height(self): ...
|
||||||
|
@property
|
||||||
|
def pixel_count(self): ...
|
||||||
|
def statistics(self, refresh: bool = ..., approximate: bool = ...): ...
|
||||||
|
@property
|
||||||
|
def min(self): ...
|
||||||
|
@property
|
||||||
|
def max(self): ...
|
||||||
|
@property
|
||||||
|
def mean(self): ...
|
||||||
|
@property
|
||||||
|
def std(self): ...
|
||||||
|
@property
|
||||||
|
def nodata_value(self): ...
|
||||||
|
@nodata_value.setter
|
||||||
|
def nodata_value(self, value: Any) -> None: ...
|
||||||
|
def datatype(self, as_string: bool = ...): ...
|
||||||
|
def color_interp(self, as_string: bool = ...): ...
|
||||||
|
def data(
|
||||||
|
self,
|
||||||
|
data: Optional[Any] = ...,
|
||||||
|
offset: Optional[Any] = ...,
|
||||||
|
size: Optional[Any] = ...,
|
||||||
|
shape: Optional[Any] = ...,
|
||||||
|
as_memoryview: bool = ...,
|
||||||
|
): ...
|
||||||
|
|
||||||
|
class BandList(list):
|
||||||
|
source: Any = ...
|
||||||
|
def __init__(self, source: Any) -> None: ...
|
||||||
|
def __iter__(self) -> Any: ...
|
||||||
|
def __len__(self): ...
|
||||||
|
def __getitem__(self, index: Any): ...
|
||||||
8
django-stubs/contrib/gis/gdal/raster/base.pyi
Normal file
8
django-stubs/contrib/gis/gdal/raster/base.pyi
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from django.contrib.gis.gdal.base import GDALBase as GDALBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GDALRasterBase(GDALBase):
|
||||||
|
@property
|
||||||
|
def metadata(self): ...
|
||||||
|
@metadata.setter
|
||||||
|
def metadata(self, value: Any) -> None: ...
|
||||||
10
django-stubs/contrib/gis/gdal/raster/const.pyi
Normal file
10
django-stubs/contrib/gis/gdal/raster/const.pyi
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
GDAL_PIXEL_TYPES: Any
|
||||||
|
GDAL_INTEGER_TYPES: Any
|
||||||
|
GDAL_TO_CTYPES: Any
|
||||||
|
GDAL_RESAMPLE_ALGORITHMS: Any
|
||||||
|
GDAL_COLOR_TYPES: Any
|
||||||
|
VSI_FILESYSTEM_BASE_PATH: str
|
||||||
|
VSI_TAKE_BUFFER_OWNERSHIP: bool
|
||||||
|
VSI_DELETE_BUFFER_ON_READ: bool
|
||||||
62
django-stubs/contrib/gis/gdal/raster/source.pyi
Normal file
62
django-stubs/contrib/gis/gdal/raster/source.pyi
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
from django.contrib.gis.gdal.raster.base import GDALRasterBase as GDALRasterBase
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class TransformPoint(list):
|
||||||
|
indices: Any = ...
|
||||||
|
def __init__(self, raster: Any, prop: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def x(self): ...
|
||||||
|
@x.setter
|
||||||
|
def x(self, value: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def y(self): ...
|
||||||
|
@y.setter
|
||||||
|
def y(self, value: Any) -> None: ...
|
||||||
|
|
||||||
|
class GDALRaster(GDALRasterBase):
|
||||||
|
destructor: Any = ...
|
||||||
|
def __init__(self, ds_input: Any, write: bool = ...) -> None: ...
|
||||||
|
def __del__(self) -> None: ...
|
||||||
|
@property
|
||||||
|
def vsi_buffer(self): ...
|
||||||
|
def is_vsi_based(self): ...
|
||||||
|
@property
|
||||||
|
def name(self): ...
|
||||||
|
def driver(self): ...
|
||||||
|
@property
|
||||||
|
def width(self): ...
|
||||||
|
@property
|
||||||
|
def height(self): ...
|
||||||
|
@property
|
||||||
|
def srs(self): ...
|
||||||
|
@srs.setter
|
||||||
|
def srs(self, value: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def srid(self): ...
|
||||||
|
@srid.setter
|
||||||
|
def srid(self, value: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def geotransform(self): ...
|
||||||
|
@geotransform.setter
|
||||||
|
def geotransform(self, values: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def origin(self): ...
|
||||||
|
@property
|
||||||
|
def scale(self): ...
|
||||||
|
@property
|
||||||
|
def skew(self): ...
|
||||||
|
@property
|
||||||
|
def extent(self): ...
|
||||||
|
@property
|
||||||
|
def bands(self): ...
|
||||||
|
def warp(self, ds_input: Any, resampling: str = ..., max_error: float = ...): ...
|
||||||
|
def transform(
|
||||||
|
self,
|
||||||
|
srid: Any,
|
||||||
|
driver: Optional[Any] = ...,
|
||||||
|
name: Optional[Any] = ...,
|
||||||
|
resampling: str = ...,
|
||||||
|
max_error: float = ...,
|
||||||
|
): ...
|
||||||
|
@property
|
||||||
|
def info(self): ...
|
||||||
66
django-stubs/contrib/gis/gdal/srs.pyi
Normal file
66
django-stubs/contrib/gis/gdal/srs.pyi
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
from django.contrib.gis.gdal.base import GDALBase as GDALBase
|
||||||
|
from enum import IntEnum
|
||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
class AxisOrder(IntEnum):
|
||||||
|
TRADITIONAL: int = ...
|
||||||
|
AUTHORITY: int = ...
|
||||||
|
|
||||||
|
class SpatialReference(GDALBase):
|
||||||
|
destructor: Any = ...
|
||||||
|
axis_order: Any = ...
|
||||||
|
ptr: Any = ...
|
||||||
|
def __init__(self, srs_input: str = ..., srs_type: str = ..., axis_order: Optional[Any] = ...) -> None: ...
|
||||||
|
def __getitem__(self, target: Any): ...
|
||||||
|
def attr_value(self, target: Any, index: int = ...): ...
|
||||||
|
def auth_name(self, target: Any): ...
|
||||||
|
def auth_code(self, target: Any): ...
|
||||||
|
def clone(self): ...
|
||||||
|
def from_esri(self) -> None: ...
|
||||||
|
def identify_epsg(self) -> None: ...
|
||||||
|
def to_esri(self) -> None: ...
|
||||||
|
def validate(self) -> None: ...
|
||||||
|
@property
|
||||||
|
def name(self): ...
|
||||||
|
@property
|
||||||
|
def srid(self): ...
|
||||||
|
@property
|
||||||
|
def linear_name(self): ...
|
||||||
|
@property
|
||||||
|
def linear_units(self): ...
|
||||||
|
@property
|
||||||
|
def angular_name(self): ...
|
||||||
|
@property
|
||||||
|
def angular_units(self): ...
|
||||||
|
@property
|
||||||
|
def units(self): ...
|
||||||
|
@property
|
||||||
|
def ellipsoid(self): ...
|
||||||
|
@property
|
||||||
|
def semi_major(self): ...
|
||||||
|
@property
|
||||||
|
def semi_minor(self): ...
|
||||||
|
@property
|
||||||
|
def inverse_flattening(self): ...
|
||||||
|
@property
|
||||||
|
def geographic(self): ...
|
||||||
|
@property
|
||||||
|
def local(self): ...
|
||||||
|
@property
|
||||||
|
def projected(self): ...
|
||||||
|
def import_epsg(self, epsg: Any) -> None: ...
|
||||||
|
def import_proj(self, proj: Any) -> None: ...
|
||||||
|
def import_user_input(self, user_input: Any) -> None: ...
|
||||||
|
def import_wkt(self, wkt: Any) -> None: ...
|
||||||
|
def import_xml(self, xml: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def wkt(self): ...
|
||||||
|
@property
|
||||||
|
def proj(self): ...
|
||||||
|
@property
|
||||||
|
def proj4(self): ...
|
||||||
|
|
||||||
|
class CoordTransform(GDALBase):
|
||||||
|
destructor: Any = ...
|
||||||
|
ptr: Any = ...
|
||||||
|
def __init__(self, source: Any, target: Any) -> None: ...
|
||||||
3
django-stubs/contrib/gis/geoip2/__init__.pyi
Normal file
3
django-stubs/contrib/gis/geoip2/__init__.pyi
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from .base import GeoIP2 as GeoIP2, GeoIP2Exception as GeoIP2Exception
|
||||||
|
|
||||||
|
HAS_GEOIP2: bool
|
||||||
29
django-stubs/contrib/gis/geoip2/base.pyi
Normal file
29
django-stubs/contrib/gis/geoip2/base.pyi
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
GEOIP_SETTINGS: Any
|
||||||
|
|
||||||
|
class GeoIP2Exception(Exception): ...
|
||||||
|
|
||||||
|
class GeoIP2:
|
||||||
|
MODE_AUTO: int = ...
|
||||||
|
MODE_MMAP_EXT: int = ...
|
||||||
|
MODE_MMAP: int = ...
|
||||||
|
MODE_FILE: int = ...
|
||||||
|
MODE_MEMORY: int = ...
|
||||||
|
cache_options: Any = ...
|
||||||
|
def __init__(
|
||||||
|
self, path: Optional[Any] = ..., cache: int = ..., country: Optional[Any] = ..., city: Optional[Any] = ...
|
||||||
|
) -> None: ...
|
||||||
|
def __del__(self) -> None: ...
|
||||||
|
def city(self, query: Any): ...
|
||||||
|
def country_code(self, query: Any): ...
|
||||||
|
def country_name(self, query: Any): ...
|
||||||
|
def country(self, query: Any): ...
|
||||||
|
def coords(self, query: Any, ordering: Any = ...): ...
|
||||||
|
def lon_lat(self, query: Any): ...
|
||||||
|
def lat_lon(self, query: Any): ...
|
||||||
|
def geos(self, query: Any): ...
|
||||||
|
@property
|
||||||
|
def info(self): ...
|
||||||
|
@classmethod
|
||||||
|
def open(cls, full_path: Any, cache: Any): ...
|
||||||
4
django-stubs/contrib/gis/geoip2/resources.pyi
Normal file
4
django-stubs/contrib/gis/geoip2/resources.pyi
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
def City(response: Any): ...
|
||||||
|
def Country(response: Any): ...
|
||||||
5
django-stubs/contrib/gis/geometry.pyi
Normal file
5
django-stubs/contrib/gis/geometry.pyi
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
hex_regex: Any
|
||||||
|
wkt_regex: Any
|
||||||
|
json_regex: Any
|
||||||
10
django-stubs/contrib/gis/geos/__init__.pyi
Normal file
10
django-stubs/contrib/gis/geos/__init__.pyi
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from .collections import (
|
||||||
|
GeometryCollection as GeometryCollection,
|
||||||
|
MultiLineString as MultiLineString,
|
||||||
|
MultiPoint as MultiPoint,
|
||||||
|
MultiPolygon as MultiPolygon,
|
||||||
|
)
|
||||||
|
from .factory import fromfile as fromfile, fromstr as fromstr
|
||||||
|
from .geometry import GEOSGeometry as GEOSGeometry, hex_regex as hex_regex, wkt_regex as wkt_regex
|
||||||
|
from .io import WKBReader as WKBReader, WKBWriter as WKBWriter, WKTReader as WKTReader, WKTWriter as WKTWriter
|
||||||
|
from .linestring import LineString as LineString, LinearRing as LinearRing
|
||||||
5
django-stubs/contrib/gis/geos/base.pyi
Normal file
5
django-stubs/contrib/gis/geos/base.pyi
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from django.contrib.gis.ptr import CPointerBase as CPointerBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GEOSBase(CPointerBase):
|
||||||
|
null_ptr_exception_class: Any = ...
|
||||||
16
django-stubs/contrib/gis/geos/collections.pyi
Normal file
16
django-stubs/contrib/gis/geos/collections.pyi
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
from django.contrib.gis.geos.geometry import GEOSGeometry as GEOSGeometry, LinearGeometryMixin as LinearGeometryMixin
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GeometryCollection(GEOSGeometry):
|
||||||
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
||||||
|
def __iter__(self) -> Any: ...
|
||||||
|
def __len__(self): ...
|
||||||
|
@property
|
||||||
|
def kml(self): ...
|
||||||
|
@property
|
||||||
|
def tuple(self): ...
|
||||||
|
coords: Any = ...
|
||||||
|
|
||||||
|
class MultiPoint(GeometryCollection): ...
|
||||||
|
class MultiLineString(LinearGeometryMixin, GeometryCollection): ...
|
||||||
|
class MultiPolygon(GeometryCollection): ...
|
||||||
31
django-stubs/contrib/gis/geos/coordseq.pyi
Normal file
31
django-stubs/contrib/gis/geos/coordseq.pyi
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
from django.contrib.gis.geos.base import GEOSBase as GEOSBase
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
class GEOSCoordSeq(GEOSBase):
|
||||||
|
ptr_type: Any = ...
|
||||||
|
def __init__(self, ptr: Any, z: bool = ...) -> None: ...
|
||||||
|
def __iter__(self) -> Any: ...
|
||||||
|
def __len__(self): ...
|
||||||
|
def __getitem__(self, index: Any): ...
|
||||||
|
def __setitem__(self, index: Any, value: Any) -> None: ...
|
||||||
|
def getOrdinate(self, dimension: Any, index: Any): ...
|
||||||
|
def setOrdinate(self, dimension: Any, index: Any, value: Any) -> None: ...
|
||||||
|
def getX(self, index: Any): ...
|
||||||
|
def setX(self, index: Any, value: Any) -> None: ...
|
||||||
|
def getY(self, index: Any): ...
|
||||||
|
def setY(self, index: Any, value: Any) -> None: ...
|
||||||
|
def getZ(self, index: Any): ...
|
||||||
|
def setZ(self, index: Any, value: Any) -> None: ...
|
||||||
|
@property
|
||||||
|
def size(self): ...
|
||||||
|
@property
|
||||||
|
def dims(self): ...
|
||||||
|
@property
|
||||||
|
def hasz(self): ...
|
||||||
|
def clone(self): ...
|
||||||
|
@property
|
||||||
|
def kml(self): ...
|
||||||
|
@property
|
||||||
|
def tuple(self): ...
|
||||||
|
@property
|
||||||
|
def is_counterclockwise(self): ...
|
||||||
1
django-stubs/contrib/gis/geos/error.pyi
Normal file
1
django-stubs/contrib/gis/geos/error.pyi
Normal file
@@ -0,0 +1 @@
|
|||||||
|
class GEOSException(Exception): ...
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user