Skip to content

Commit f2962d4

Browse files
authored
variable geometry support, plotting, WKB IO (#98)
* raw implementation of summarize * assume array CRS is managed by xproj * docs * query on values * grid plotting * way more complicated plotting * propagate * legend * to_wkb * wkb encoding * some docs and fixes * ignore zarr * updated intro * io docs update * minor plotting update * lint * zonal and summary fix * partially broken plotting * fixup plotting * some docs * api * refactor plotting * more plotting * plotting notebook * update glaciers * summarize_tests * summary * don't depend on xproj * xproj to envs * one more * add stuff to docs * plotting documentation * zonal stats * fix typing * fix typing * rm temp plotting notebook * make mypy happy * pin sphinx * document query (that one is weird now) * split query to mask and query * mask tests * cleanup * wkb testing * plotting tests * fix expected * mpl ci * numpy compat * load svalbard remotely * cleanup * tests
1 parent f035e23 commit f2962d4

34 files changed

+8404
-603
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,8 @@ doc/source/geo-encoded*
145145
.ruff_cache
146146
doc/source/cube.joblib.compressed
147147
doc/source/cube.pickle
148+
doc/source/*zarr
148149

149150
cache/
151+
152+
result_images/

ci/310.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ dependencies:
1919
- pytest-reportlog
2020
- geopandas-base
2121
- geodatasets
22-
- pyogrio
22+
- pyogrio
23+
- xproj
24+
- matplotlib

ci/311.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ dependencies:
2020
- geopandas-base
2121
- geodatasets
2222
- pyogrio
23+
- xproj
24+
- matplotlib

ci/312.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,7 @@ dependencies:
2121
- geodatasets
2222
- pyogrio
2323
- mypy
24+
- xproj
25+
- matplotlib
2426

2527

ci/313.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ dependencies:
1919
- geopandas-base
2020
- geodatasets
2121
- pyogrio
22+
- xproj
23+
- matplotlib
2224
- pip
2325
- pip:
2426
- exactextract

ci/dev.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ dependencies:
2020
- geopandas-base
2121
- geodatasets
2222
- pyogrio
23+
- xproj
24+
- matplotlib
2325
- pip
2426
- pip:
2527
- git+https://github.com/shapely/shapely.git@main

doc/source/api.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Methods
5858
Dataset.xvec.zonal_stats
5959
Dataset.xvec.encode_cf
6060
Dataset.xvec.decode_cf
61+
Dataset.xvec.encode_wkb
62+
Dataset.xvec.decode_wkb
63+
Dataset.xvec.summarize_geometry
64+
Dataset.xvec.plot
6165

6266

6367
DataArray.xvec
@@ -90,7 +94,12 @@ Methods
9094
DataArray.xvec.to_crs
9195
DataArray.xvec.set_crs
9296
DataArray.xvec.query
97+
DataArray.xvec.mask
9398
DataArray.xvec.to_geodataframe
9499
DataArray.xvec.to_geopandas
95100
DataArray.xvec.extract_points
96101
DataArray.xvec.zonal_stats
102+
DataArray.xvec.encode_wkb
103+
DataArray.xvec.decode_wkb
104+
DataArray.xvec.summarize_geometry
105+
DataArray.xvec.plot

doc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"pandas": ("https://pandas.pydata.org/docs", None),
4747
"rasterio": ("https://rasterio.readthedocs.io/en/latest/", None),
4848
"exactextract": ("https://isciences.github.io/exactextract/", None),
49+
"matplotlib": ("https://matplotlib.org/stable/", None),
4950
}
5051

5152
# -- Options for HTML output -------------------------------------------------

doc/source/extract_pts.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"import numpy as np\n",
2424
"import shapely\n",
2525
"import xarray as xr\n",
26+
"\n",
2627
"import xvec"
2728
]
2829
},

doc/source/geopandas.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"import numpy as np\n",
2222
"import pandas as pd\n",
2323
"import xarray as xr\n",
24-
"import xvec\n",
24+
"from geodatasets import get_path\n",
2525
"\n",
26-
"from geodatasets import get_path"
26+
"import xvec"
2727
]
2828
},
2929
{

0 commit comments

Comments
 (0)