Skip to content

Releases: hyriver/pygeoutils

v0.12.2

15 Jan 17:52
Compare
Choose a tag to compare

Release Notes

New Features

  • Add a new class called GeoBSpline that generates B-splines from a set of coordinates. The spline attribute of this class has five attributes: x and y coordinates, phi and radius which are curvature and radius of curvature, respectively, and distance 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 a points property that is geopandas.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 and geo_crs arguments of gtiff2xarray are now optional. This is useful for cases when the input GeoTiff 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 the nodatavals attribute of the input xarray.DataArray or xarray.Dataset. Therefore, the data type of the input xarray.DataArray or xarray.Dataset is conserved.
  • Expose connectivity argument of rasterio.features.shapes function in xarray2geodf function.
  • Move all private functions to a new module to make the main module less cluttered.

v0.12.1

31 Dec 07:47
Compare
Choose a tag to compare

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

27 Dec 22:52
Compare
Choose a tag to compare

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

10 Nov 06:01
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Use rioxarray for dealing with GeoTIFF binaries since xarray deprecated the xarray.open_rasterio function, as it's discussed in this PR.
  • Use importlib-metadata for getting the version insead of pkg_resources to decrease import time as discussed in this issue.

v0.11.6

06 Oct 22:20
Compare
Choose a tag to compare

Release Notes

New Features

  • Add a new function, xarray2geodf, to convert an xarray.DataArray to a geopandas.GeoDataFrame.

v0.11.5

17 Sep 00:49
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • Fix an issue with gtiff2xarray where the scales and offsets attributes of the output DataArray were floats rather than tuples (:issue_3dep:[30]{.title-ref}).

Internal Changes

  • Add a new function, transform2tuple, for converting Affine transforms to a tuple. Previously, the Affine transform was converted to a tuple using to_gdal() method of rasterio.Affine which was not compatible with rioxarray.

v0.11.4

27 Aug 03:26
Compare
Choose a tag to compare

Release Notes

Internal Changes

  • Use ujson for JSON parsing instead of orjson since orjson only serializes to bytes which is not compatible with aiohttp.
  • Convert the transform attribute data type from Affine to tuple
    since saving an data array to netcdf cannot handle the Affine type.

v0.11.3

19 Aug 18:19
Compare
Choose a tag to compare

Release Notes

  • Fix an issue in geotiff2xarray related to saving an xarray object to netcdf when its transform attribute has Affine type rather than a tuple.

v0.11.2

31 Jul 05:42
Compare
Choose a tag to compare

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 being GTiff.

Internal Changes

  • Make geo2polygon, get_transform, and get_nodata_crs public functions since other packages use it.
  • Make xarray_mask a public function and simplify gtiff2xarray.
  • Remove MatchCRS since it's already available in pygeoogc.
  • Validate input geometry in geo2polygon.
  • Refactor gtiff2xarray to check for the ds_dims outside the main loops to improve the performance. Also, the function tries to detect the dimension names automatically if ds_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

19 Jun 07:18
Compare
Choose a tag to compare

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.