skip to Main Content

Python: mongodb to geopandas

I'm working with a MongoDB database containing city polygon data. I've successfully connected to it from Python and downloaded the data. However, when I convert it into a GeoDataFrame, the geometry column doesn't seem to be recognized correctly. How can…

VIEW QUESTION

Centos – pydantic model incorrectly applies validation

I have a model defined like this; class SomeModel(BaseModel): name: str class SomeOtherModel(BaseModel): name: int class MyModel(BaseModel): items: List[Union[SomeModel, SomeOtherModel]] @validator("items", always=True) def validate(cls, value): by_type = list(filter(lambda v: isinstance(v, SomeModel), value)) if len(by_type) < 1: raise ValueError("we need at…

VIEW QUESTION
Back To Top
Search