create()

Create a new MIKE+ model database.

Usage

Source

create(
    model_path,
    *,
    projection_string="",
    srid=-1,
    auto_open=True,
    **kwargs,
)

Alias for Database.create()

Parameters

model_path: str or Path

Path where the new database will be created

projection_string: str = ""

The projection string for the database

srid: int = -1

The SRID for the database, e.g. 25832 for ETRS89 / UTM zone 32N

auto_open: bool = True

If True, immediately open the database connection

**kwargs: dict
Additional keyword arguments to pass to the Database.create method, i.e. overwrite (bool): if True, replace an existing database file

Returns

Database
A Database object for the newly created database

Raises

FileExistsError

If the database already exists (except if overwrite is True)

ValueError

If both projection_string and srid are given

DatabaseError
If MIKE+ fails to create the database