seriffic commited on
Commit
b8f7bf5
·
1 Parent(s): 316533f

Sandy 2012 inundation specialist + .gitattributes LFS for *.geojson

Browse files

Empirical extent of Hurricane Sandy storm-tide inundation, published
by NYC Open Data from FEMA MOTF surge modelling. This is the
historical-observation layer — what actually went under in October
2012 — and serves as the empirical floor when the forward-modelled
DEP scenarios disagree with lived experience.

The 91 MB GeoJSON ships pre-baked; *.geojson now routes through LFS.

.gitattributes CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
 
1
+ # Riprap-specific LFS tracking
2
+ *.geojson filter=lfs diff=lfs merge=lfs -text
3
+
4
+ # Hugging Face's standard LFS rules (kept for forward-compat with model assets)
5
  *.7z filter=lfs diff=lfs merge=lfs -text
6
  *.arrow filter=lfs diff=lfs merge=lfs -text
7
  *.bin filter=lfs diff=lfs merge=lfs -text
app/flood_layers/sandy_inundation.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """NYC Sandy Inundation Zone (empirical 2012 extent, NYC OD 5xsi-dfpx)."""
2
+ from __future__ import annotations
3
+
4
+ from functools import lru_cache
5
+
6
+ import geopandas as gpd
7
+
8
+ from app.spatial import DATA, load_layer
9
+
10
+ DOC_ID = "sandy_inundation"
11
+ CITATION = "NYC Sandy Inundation Zone (NYC OpenData 5xsi-dfpx, empirical 2012 extent)"
12
+
13
+
14
+ @lru_cache(maxsize=1)
15
+ def load() -> gpd.GeoDataFrame:
16
+ g = load_layer(DATA / "sandy_inundation.geojson")
17
+ return g[["geometry"]]
18
+
19
+
20
+ def join(assets: gpd.GeoDataFrame) -> "gpd.pd.Series":
21
+ """Return a boolean Series indexed like assets: True if inside Sandy zone."""
22
+ z = load()
23
+ # spatial join avoids fragile unary union over messy public polygons
24
+ hits = gpd.sjoin(
25
+ assets[["geometry"]].assign(_aid=range(len(assets))),
26
+ z[["geometry"]],
27
+ how="left",
28
+ predicate="intersects",
29
+ )
30
+ flagged = hits.dropna(subset=["index_right"])["_aid"].unique()
31
+ s = assets.geometry.copy().astype(bool)
32
+ s[:] = False
33
+ s.iloc[list(flagged)] = True
34
+ return s.reset_index(drop=True)
data/sandy_inundation.geojson ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d5b899acc144a422ca340eabe100c91c5fe110e2b13e62216e61fdc07b00200
3
+ size 91392952