ssb-sgis 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -479,8 +479,10 @@ def make_grid(
479
479
 
480
480
  minx, miny, maxx, maxy = to_bbox(obj)
481
481
 
482
- minx = int(minx) if minx > 0 else int(minx - 1)
483
- miny = int(miny) if miny > 0 else int(miny - 1)
482
+ if not isinstance(minx, int) and not float(minx).is_integer():
483
+ minx = int(minx) if minx > 0 else int(minx - 1)
484
+ if not isinstance(miny, int) and not float(miny).is_integer():
485
+ miny = int(miny) if miny > 0 else int(miny - 1)
484
486
 
485
487
  grid = make_grid_from_bbox(minx, miny, maxx, maxy, gridsize=gridsize, crs=crs)
486
488
 
@@ -393,7 +393,9 @@ def get_bounds_series(
393
393
  paths = [paths]
394
394
 
395
395
  threads = (
396
- min(len(paths), int(multiprocessing.cpu_count())) or 1 if use_threads else 1
396
+ min(len(paths), int(multiprocessing.cpu_count() * 1.2)) or 1
397
+ if use_threads
398
+ else 1
397
399
  )
398
400
 
399
401
  with joblib.Parallel(n_jobs=threads, backend="threading") as parallel:
@@ -623,7 +625,7 @@ def _write_partitioned_geoparquet(
623
625
  if basename_template is None:
624
626
  this_basename = (uuid.uuid4().hex + "-{i}.parquet").replace("-{i}", "0")
625
627
  else:
626
- this_basename = basename_template
628
+ this_basename = basename_template.replace("-{i}", "0")
627
629
  for i, sibling_path in enumerate(sorted(glob_func(str(Path(path) / "**")))):
628
630
  if paths_are_equal(sibling_path, path):
629
631
  continue