Improve the performance of
xarray_geomasksignificantly by first clipping the data to the geometry’s bounding box, then if the geometry is a polygon, masking the data with the polygon. This is much faster than directly masking the data with the polygon. Also, support passing a bounding box to
xarray_geomaskin addition to polygon and multipolygon.
Fix deprecation warning of
pandaswhen changing the geometry column of a
When combining the responses, now
daskhandles data chunking more efficiently. This is especially important for handling large responses from WMS services.
Improve type hints for CRS-related arguments of all functions by including string, integer, and
rasterioengine to make sure all
rioxarrayattrs are read.
Add the missing PyPi classifiers for the supported Python versions.
Append “Error” to all exception classes for conforming to PEP-8 naming conventions.
Set the minimum supported version of Python to 3.8 since many of the dependencies such as
rioxarrayhave dropped support for Python 3.7.
Bump min versions of
rioxarrayto 0.10 since it adds reading/writing GCPs.
Add support for passing a custom bounding box in the
Coordinatesclass. The default is the bounds of
EPSG:4326to retain backward compatibility. This new class parameter allows a user to check if a list of coordinates is within a custom bounding box. The bounds should be the
Add a new function called
geometry_listfor converting a list of multi-geometries to a list of geometries.
geotiff2xarraysince the clipping operation of
rioxarrayuses this value as fill value.
Add a function called
break_linesfor breaking lines at given points.
Add a function called
snap2nearestfor snapping points to the nearest point on a line with a given tolerance. It accepts a
geopandas.GeoSeriesof points and a
geopandas.GeoDataFrameof lines. It automatically snaps to the closest lines in the input data.
Add a new class called
GeoBSplinethat generates B-splines from a set of coordinates. The
splineattribute of this class has five attributes:
radiuswhich are curvature and radius of curvature, respectively, and
distancewhich is the total distance of each point along the B-spline from the starting points.
Add a new class called
Coordinatesthat validates a set of lon/lat coordinates. It normalizes longitudes to the range [-180, 180) and has a
pointsproperty that is
geopandas.GeoSerieswith validated coordinates. It uses spatial indexing to speed up the validation and should be able to handle large datasets efficiently.
transform2tuplea public function.
gtiff2xarrayare now optional. This is useful for cases when the input
GeoTiffresponse is the results of a bounding box query and there is no need for a geometry mask.
Replace the missing values after adding geometry mask via
nodatavalsattribute of the input
xarray.Dataset. Therefore, the data type of the input
Move all private functions to a new module to make the main module less cluttered.
arcgis2geojsonfor better readability and maintainability.
arcgis2geojsonset the geometry to null if its type is not supported, such as curved polylines.
Add all the missing types so
Bump version to 0.12.0 to match the release of
Add a new function,
xarray2geodf, to convert a
Fix an issue with
offsetsattributes of the output
DataArraywere floats rather than tuples (GH30).
Add a new function,
transform2tuple, for converting
Affinetransforms to a tuple. Previously, the
Affinetransform was converted to a tuple using
rasterio.Affinewhich was not compatible with
ujsonfor JSON parsing instead of
orjsononly serializes to
byteswhich is not compatible with
Convert the transform attribute data type from
tuplesince saving a data array to
netcdfcannot handle the
Fix an issue in
geotiff2xarrayrelated to saving a
xarrayobject to NetCDF when its transform attribute has
Affinetype rather than a tuple.
The highlight of this release is performance improvement in
handling large responses.
Automatic detection of the driver by default in
gtiff2xarrayas opposed to it being
get_nodata_crspublic functions since other packages use it.
xarray_maska public function and simplify
MatchCRSsince it’s already available in
Validate input geometry in
gtiff2xarrayto check for the
ds_dimsoutside the main loops to improve the performance. Also, the function tries to detect the dimension names automatically if
ds_dimsis not provided by the user, explicitly.
Improve performance of
json2geodfby using list comprehension and performing checks outside the main loop.
Add the missing arguments for masking the data in
In some edge cases the y-coordinates of a response might not be monotonically sorted so
daskfails. This release sorts them to address this issue.
gtiff2xarrayreturns a parallelized
xarray.DataAraaythat can handle large responses much more efficiently. This is achieved using
Drop support for Python 3.6 since many of the dependencies such as
pandashave done so.
MatchCRS. Now, it should be instantiated by providing the in and out CRSs like so:
MatchCRS(in_crs, out_crs). Then its methods, namely,
coords, can be called. These methods now have only one input, geometry.
Change input and output types of
MatchCRS.coordsfrom tuple of lists of coordinates to list of
rioxarrayis more general and suitable.
Remove unnecessary type checks for private functions.
json2geodfto improve robustness. Use
dictfor checking key availability.
Setting transform of the merged dataset explicitly (GH3).
Add announcement regarding the new name for the software stack, HyRiver.
pipinstallation and release workflow.
The first release after renaming
Address GH1 by sorting y coordinate after merge.
mypychecks more strict and fix all the errors and prevent possible bugs.
Speed up CI testing by using
Bump version to the same version as PyGeoHydro.
gtiff2filefor saving raster responses as
Fix an error in
_get_nodata_crsfor handling no data value when its value in the source is None.
Fix the warning during the
json2geodfwhen there is no geometry column in the input JSON.
Added checking the validity of input arguments in
gtiff2xarrayfunction and provide useful messages for debugging.
Add support for multipolygon.
Fixed a bug in
xarray_geomaskfor getting the transform.
gtiff2xarrayissue with high resolution requests and improved robustness of the function.
orjsonto speed up JSON operations.
griff2xarrayto reflect the latest changes in
Retained the compatibility with
xarray0.15 by removing the
xarray_geomaskfunction and made it a public function.
More efficient handling of large GeoTiff responses by cropping the response before converting it into a dataset.
Added a new function called
geo2polygonfor converting and transforming a polygon or bounding box into a Shapely’s Polygon in the target CRS.
Fixed the issue with flipped mask in
drop_duplicatessince it may cause issues in some instances.
griff2xarrayand added support for WMS 1.3.0 and WFS 2.0.0.
Remove dependency on PyGeoOGC.
Increase test coverage.
Remove duplicate rows before returning the dataframe in the
Add the missing dependency
First release on PyPI.