Skip to content

Commit

Permalink
#82 rename variable and reflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jlhumber committed Oct 19, 2024
1 parent af11210 commit 8c98b95
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions fudgeo/geopkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,13 @@ def create(cls, geopackage: GeoPackage, name: str, shape_type: str,
escaped_name = escape_name(name)
has_contents = has_ogr_contents(conn)
if overwrite:
geom_name = cls._find_geometry_column_name(geopackage, name)
cls._drop(conn=conn, sql=REMOVE_FEATURE_CLASS,
name=name, escaped_name=escaped_name,
geom_name=geom_name, delete_ogr_contents=has_contents,
delete_metadata=geopackage.is_metadata_enabled,
delete_schema=geopackage.is_schema_enabled)
current_name = cls._find_geometry_column_name(geopackage, name)
cls._drop(
conn=conn, sql=REMOVE_FEATURE_CLASS, name=name,
escaped_name=escaped_name, geom_name=current_name,
delete_ogr_contents=has_contents,
delete_metadata=geopackage.is_metadata_enabled,
delete_schema=geopackage.is_schema_enabled)
conn.execute(CREATE_FEATURE_TABLE.format(
name=escaped_name, feature_type=shape_type, other_fields=cols))
if not geopackage.check_srs_exists(srs.srs_id):
Expand Down

0 comments on commit 8c98b95

Please sign in to comment.