Skip to content

Commit

Permalink
Set default table to be spatial.
Browse files Browse the repository at this point in the history
  • Loading branch information
evetion committed Mar 13, 2024
1 parent b4a74b8 commit bfc882e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/ribasim/ribasim/geometry/edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
import pandas as pd
import pandera as pa
import shapely
from geopandas import GeoDataFrame
from matplotlib.axes import Axes
from numpy.typing import NDArray
from pandera.typing import DataFrame, Series
from pandera.typing.geopandas import GeoSeries
from pandera.typing import Series
from pandera.typing.geopandas import GeoDataFrame, GeoSeries
from pydantic import model_validator
from shapely.geometry import LineString, MultiLineString, Point

Expand Down Expand Up @@ -46,7 +45,8 @@ class EdgeTable(SpatialTableModel[EdgeSchema]):
@model_validator(mode="after")
def empty_table(self) -> "EdgeTable":
if self.df is None:
self.df = DataFrame[EdgeSchema]()
self.df = GeoDataFrame[EdgeSchema]()
self.df.set_geometry("geometry", inplace=True)
return self

def add(
Expand Down

0 comments on commit bfc882e

Please sign in to comment.