geonature.core.imports.checks.sql.geo#
Functions#
|
Set the_geom_point as the centroid of the geometry in the transient table of an import. |
|
Convert the geometry from the file SRID to the local SRID in the transient table of an import. |
|
Check if the geometry is valid in the transient table of an import. |
|
For an import, check if one or more geometries in the transient table are outside a defined area. |
Module Contents#
- geonature.core.imports.checks.sql.geo.set_geom_point(imprt: geonature.core.imports.models.TImports, entity: geonature.core.imports.models.Entity, geom_4326_field: geonature.core.imports.models.BibFields, geom_point_field: geonature.core.imports.models.BibFields) None [source]#
Set the_geom_point as the centroid of the geometry in the transient table of an import.
Parameters#
- imprtTImports
The import to update.
- entityEntity
The entity to update.
- geom_4326_fieldBibFields
Field containing the geometry in the transient table.
- geom_point_fieldBibFields
Field to store the centroid of the geometry in the transient table.
Returns#
None
- geonature.core.imports.checks.sql.geo.convert_geom_columns(imprt: geonature.core.imports.models.TImports, entity: geonature.core.imports.models.Entity, geom_4326_field: geonature.core.imports.models.BibFields, geom_local_field: geonature.core.imports.models.BibFields) None [source]#
Convert the geometry from the file SRID to the local SRID in the transient table of an import.
Parameters#
- imprtTImports
The import to update.
- entityEntity
The entity to update.
- geom_4326_fieldBibFields
Field representing the geometry in the transient table in SRID 4326.
- geom_local_fieldBibFields
Field representing the geometry in the transient table in the local SRID.
- geonature.core.imports.checks.sql.geo.check_is_valid_geometry(imprt: geonature.core.imports.models.TImports, entity: geonature.core.imports.models.Entity, wkt_field: geonature.core.imports.models.BibFields, geom_field: geonature.core.imports.models.BibFields) None [source]#
Check if the geometry is valid in the transient table of an import.
Parameters#
- imprtTImports
The import to check.
- entityEntity
The entity to check.
- wkt_fieldBibFields
Field containing the source WKT of the geometry.
- geom_fieldBibFields
Field containing the geometry from the WKT in wkt_field to be validated.
- geonature.core.imports.checks.sql.geo.check_geometry_outside(imprt: geonature.core.imports.models.TImports, entity: geonature.core.imports.models.Entity, geom_local_field: geonature.core.imports.models.BibFields, id_area: int) None [source]#
For an import, check if one or more geometries in the transient table are outside a defined area.
Parameters#
- imprtTImports
The import to check.
- entityEntity
The entity to check.
- geom_local_fieldBibFields
Field containing the geometry in the local SRID of the area.
- id_areaint
The id of the area to check if the geometry is inside.