forked from Botts-Innovative-Research/OSHConnect-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeometry.py
More file actions
21 lines (17 loc) · 711 Bytes
/
geometry.py
File metadata and controls
21 lines (17 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# =============================================================================
# Copyright (c) 2025 Botts Innovative Research Inc.
# Date: 2025/10/1
# Author: Ian Patterson
# Contact Email: ian@botts-inc.com
# =============================================================================
from pydantic import BaseModel, Field
from .csapi4py.constants import GeometryTypes
# TODO: Add specific validations for each type
# TODO: determine if serializing 'shapely' objects gives valid JSON structures from our own serialization
class Geometry(BaseModel):
"""
A class to represent the geometry of a feature
"""
type: GeometryTypes = Field(...)
coordinates: list
bbox: list = None