perf: simplify WFIGS perimeter geometry at query time
Ask ArcGIS for 500 features, 5-decimal precision, and ~250m offset so fire rings are outlines instead of tens of thousands of vertices.
This commit is contained in:
parent
fdd59052c5
commit
9c14b899ee
2 changed files with 15 additions and 2 deletions
|
|
@ -597,12 +597,14 @@ async def upsert_vessel(marker: dict) -> None:
|
|||
}
|
||||
|
||||
|
||||
def _wfigs_params(bbox: str | None) -> dict:
|
||||
def _wfigs_params(bbox: str | None, *, offset_m: float = 250.0) -> dict:
|
||||
params = {
|
||||
"where": "1=1",
|
||||
"outSR": "4326",
|
||||
"f": "geojson",
|
||||
"resultRecordCount": 2000,
|
||||
"resultRecordCount": 500,
|
||||
"maxAllowableOffset": offset_m / 111_320.0, # metres → degrees
|
||||
"geometryPrecision": 5,
|
||||
}
|
||||
if bbox:
|
||||
minlon, minlat, maxlon, maxlat = quantize_bbox(*parse_bbox(bbox))
|
||||
|
|
|
|||
Loading…
Reference in a new issue