Releases: hyriver/pygeoutils
Releases · hyriver/pygeoutils
v0.12.2
Release Notes
New Features
- Add a new class called
GeoBSpline
that generates B-splines from a set of coordinates. Thespline
attribute of this class has five attributes:x
andy
coordinates,phi
andradius
which are curvature and radius of curvature, respectively, anddistance
which is the total distance of each point along the B-spline from the starting points. - Add a new class called
Coordinates
that validates a set of lon/lat coordinates. It normalizes longitudes to the range [-180, 180) and has apoints
property that isgeopandas.GeoSeries
with validated coordinates. It uses spatial indexing to speed up the validation and should be able to handle large datasets efficiently. - Make
transform2tuple
a public function.
Internal Changes
- The
geometry
andgeo_crs
arguments ofgtiff2xarray
are now optional. This is useful for cases when the inputGeoTiff
response 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
xarray_geomask
by thenodatavals
attribute of the inputxarray.DataArray
orxarray.Dataset
. Therefore, the data type of the inputxarray.DataArray
orxarray.Dataset
is conserved. - Expose
connectivity
argument ofrasterio.features.shapes
function inxarray2geodf
function. - Move all private functions to a new module to make the main module less cluttered.
v0.12.1
Release Notes
Internal Changes
- Refactor
arcgis2geojson
for better readability and maintainability. - In
arcgis2geojson
set the geometry to null if its type is not supported, such as curved polylines.
v0.12.0
Release Notes
Internal Changes
- Add all the missing types so
mypy --strict
passes. - Bump version to 0.12.0 to match the release of
pygeoogc
.
v0.11.7
v0.11.6
Release Notes
New Features
- Add a new function,
xarray2geodf
, to convert anxarray.DataArray
to ageopandas.GeoDataFrame
.
v0.11.5
Release Notes
Bug Fixes
- Fix an issue with
gtiff2xarray
where thescales
andoffsets
attributes of the outputDataArray
were floats rather than tuples (:issue_3dep:[30]{.title-ref}).
Internal Changes
- Add a new function,
transform2tuple
, for convertingAffine
transforms to a tuple. Previously, theAffine
transform was converted to a tuple usingto_gdal()
method ofrasterio.Affine
which was not compatible withrioxarray
.
v0.11.4
Release Notes
Internal Changes
- Use
ujson
for JSON parsing instead oforjson
sinceorjson
only serializes tobytes
which is not compatible withaiohttp
. - Convert the transform attribute data type from
Affine
totuple
since saving an data array tonetcdf
cannot handle theAffine
type.
v0.11.3
Release Notes
- Fix an issue in
geotiff2xarray
related to saving anxarray
object to netcdf when its transform attribute hasAffine
type rather than a tuple.
v0.11.2
Release Notes
The highlight of this release is performance improvement in
gtiff2xarray
for handling large responses.
New Features
- Automatic detection of the driver by default in
gtiff2xarray
as
opposed to it beingGTiff
.
Internal Changes
- Make
geo2polygon
,get_transform
, andget_nodata_crs
public functions since other packages use it. - Make
xarray_mask
a public function and simplifygtiff2xarray
. - Remove
MatchCRS
since it's already available inpygeoogc
. - Validate input geometry in
geo2polygon
. - Refactor
gtiff2xarray
to check for theds_dims
outside the main loops to improve the performance. Also, the function tries to detect the dimension names automatically ifds_dims
is not provided by the user, explicitly. - Improve performance of
json2geodf
by using list comprehension and
performing checks outside the main loop.
Bug Fixes
- Add the missing arguments for masking the data in
gtiff2xarray
.
v0.11.1
Release Notes
Bug Fixes
- In some edge cases the y-coordinates of a response might not be monotonically sorted so
dask
fails. This release sorts them to address this issue.