quickpaver 0.5.0__tar.gz → 0.6.0__tar.gz
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.
- {quickpaver-0.5.0 → quickpaver-0.6.0}/CHANGELOG.rst +21 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/PKG-INFO +2 -2
- {quickpaver-0.5.0 → quickpaver-0.6.0}/pyproject.toml +1 -1
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/__about__.py +1 -1
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/__init__.py +3 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/_tiling.py +231 -39
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/_transfer_matrix.py +5 -5
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver.egg-info/PKG-INFO +2 -2
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver.egg-info/requires.txt +1 -1
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_tiling.py +280 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/AUTHORS.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/CONTRIBUTING.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/LICENSE +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/MANIFEST.in +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/README.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/Makefile +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/make.bat +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Disk.as_array.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Disk.bounds.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Disk.center.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Disk.centroid.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Disk.radius.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Disk.to_polygon.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Grid.make_spatial_gradient_matrices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Grid.make_spatial_permutation_matrices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.Grid.n_grid_cells.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.HEXAGON.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.RECTANGLE.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.TRIANGLE.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.capitalize.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.casefold.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.center.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.count.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.encode.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.endswith.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.expandtabs.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.find.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.format.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.format_map.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.index.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isalnum.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isalpha.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isascii.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isdecimal.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isdigit.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isidentifier.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.islower.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isnumeric.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isprintable.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isspace.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.istitle.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.isupper.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.join.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.ljust.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.lower.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.lstrip.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.maketrans.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.partition.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.removeprefix.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.removesuffix.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.replace.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.rfind.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.rindex.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.rjust.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.rpartition.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.rsplit.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.rstrip.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.split.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.splitlines.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.startswith.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.strip.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.swapcase.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.title.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.to_list.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.translate.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.upper.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.PolygonType.zfill.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.bounding_box_vertices_coordinates.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.bounds.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.center_coords.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.center_coords_2d.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.contour.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.copy.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.cx.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.cy.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.cz.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.dims.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.dx.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.dy.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.dz.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.gamma_ij_x_m2.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.gamma_ij_y_m2.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.gamma_ij_z_m2.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.grid_cell_volume_m3.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.indices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.make_spatial_gradient_matrices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.make_spatial_permutation_matrices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.n_grid_cells.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.non_rot_center_coords.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.non_rot_center_coords_2d.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.nx.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.ny.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.nz.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.origin.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.origin_coords.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.phi.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.psi.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.rot_center.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.shape.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.theta.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.to_pyvista.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.to_shapely.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.total_volume_m3.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.x0.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.x_extent.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.x_indices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.xmax.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.xmin.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.y0.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.y_extent.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.y_indices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.ymax.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.ymin.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.z0.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.z_extent.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.z_indices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.zmax.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.RectilinearGrid.zmin.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.area_m2.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.edge_lengths_m.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.n_tri.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.n_verts.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.to_shapely.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.transform.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.tri_area_m2.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.tri_verts.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/generated/quickpaver.TriMesh.verts_xy.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.Disk.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.Grid.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.PolygonType.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.RectilinearGrid.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.TriMesh.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.adjacency_by_shared_vertices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.adjacency_to_edges.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.binary_dilation.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.compute_transfer_matrix.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.compute_transfer_matrix_with_intersections.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.conservative_upsample.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.create_selections_array_2d.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.draw_adjacency.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.duplicative_upsample.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.extract_tiling_centers.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.extract_tiling_vertices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.gen_hexagonal_tiling.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.gen_polygon.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.gen_polygonal_tiling.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.gen_rectangular_tiling.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.gen_triangular_tiling.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.get_array_borders_selection.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.get_owner_neigh_indices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.get_polygon_selection_with_dilation_2d.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.get_polygon_selection_with_dilation_3d.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.get_rlg_perm_mat.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.get_rlg_spatial_grad_mat.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.intersects_mask.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.load_corsica_contour.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.load_france_and_corsica_contour.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.load_france_contour.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.make_rlg_spatial_gradient_matrices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.make_rlg_spatial_permutation_matrices.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.resample_grid.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.rlg_idx_to_nn.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.rlg_nn_to_idx.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.span_to_node_numbers_2d.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_autosummary/quickpaver.span_to_node_numbers_3d.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_templates/autosummary/base.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_templates/autosummary/class.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/_templates/autosummary/module.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/api_reference.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/authors.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/bibliography.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/changelog.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/conf.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/contributing.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/index.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/installation.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/readme.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/docs/sources/usage.rst +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/_grid.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/_plot.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/_tm_test_utils.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/_types.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/data/__init__.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/data/corsica.geojson +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver/data/france.geojson +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver.egg-info/SOURCES.txt +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver.egg-info/dependency_links.txt +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/quickpaver.egg-info/top_level.txt +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/setup.cfg +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/__init__.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_data.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_grid.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_plot.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_transfer_matrix.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_transfer_matrix_internals.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_transfer_matrix_mixed_polygon.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_transfer_matrix_rectilinear.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_transfer_matrix_trimesh.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_trimesh_flat.py +0 -0
- {quickpaver-0.5.0 → quickpaver-0.6.0}/tests/test_types.py +0 -0
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
==============
|
|
4
4
|
|
|
5
|
+
0.6.0 (2026-10-06)
|
|
6
|
+
------------------
|
|
7
|
+
|
|
8
|
+
* ENH: add ``extract_tiling_edge_centers`` to extract the centres of the polygon
|
|
9
|
+
edges, deduplicating the edges shared between adjacent polygons. It also returns
|
|
10
|
+
the adjacency between edges and polygons, and between polygons and edges (in ring
|
|
11
|
+
order, so that opposite edges of a rectangle are easy to retrieve).
|
|
12
|
+
* FIX: ``extract_tiling_vertices`` (and therefore ``adjacency_by_shared_vertices``)
|
|
13
|
+
could fail to merge coincident vertices when a coordinate fell on a rounding tie
|
|
14
|
+
(e.g. ``1.035`` scaled to ``103.5``), because float noise sent copies of the same
|
|
15
|
+
corner to different buckets. Vertices are now merged by gap clustering, which has
|
|
16
|
+
no rounding boundary.
|
|
17
|
+
* FIX: the vertex-to-polygon adjacency returned by ``extract_tiling_vertices`` was
|
|
18
|
+
wrong (some vertices had no polygon) on tilings with more polygons than vertices,
|
|
19
|
+
such as triangular tilings, due to colliding keys when grouping the pairs.
|
|
20
|
+
* ENH: ``n_decimals`` in ``extract_tiling_vertices`` is now the merge tolerance
|
|
21
|
+
(``10**-n_decimals``); the returned coordinates are still rounded to ``n_decimals``.
|
|
22
|
+
* TEST: add tests for ``extract_tiling_edge_centers`` and for the vertex clustering
|
|
23
|
+
(rounding ties, float noise, large coordinates), reaching 100% coverage of the
|
|
24
|
+
tiling module.
|
|
25
|
+
|
|
5
26
|
0.5.0 (2026-09-27)
|
|
6
27
|
------------------
|
|
7
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: quickpaver
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: A python package providing a paving toolbox.
|
|
5
5
|
Author-email: Antoine Collet <antoinecollet5@gmail.com>
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -87,7 +87,7 @@ Provides-Extra: lint
|
|
|
87
87
|
Requires-Dist: pre-commit; extra == "lint"
|
|
88
88
|
Requires-Dist: pre-commit-hooks; extra == "lint"
|
|
89
89
|
Requires-Dist: codespell; extra == "lint"
|
|
90
|
-
Requires-Dist: ruff==0.16.
|
|
90
|
+
Requires-Dist: ruff==0.16.10; extra == "lint"
|
|
91
91
|
Requires-Dist: ty==0.0.84; extra == "lint"
|
|
92
92
|
Provides-Extra: install
|
|
93
93
|
Requires-Dist: pip; extra == "install"
|
|
@@ -44,6 +44,7 @@ both the generated polygons and adjacency information between kept tiles.
|
|
|
44
44
|
gen_polygonal_tiling
|
|
45
45
|
extract_tiling_centers
|
|
46
46
|
extract_tiling_vertices
|
|
47
|
+
extract_tiling_edge_centers
|
|
47
48
|
adjacency_by_shared_vertices
|
|
48
49
|
adjacency_to_edges
|
|
49
50
|
draw_adjacency
|
|
@@ -136,6 +137,7 @@ from quickpaver._tiling import (
|
|
|
136
137
|
PolygonType,
|
|
137
138
|
adjacency_by_shared_vertices,
|
|
138
139
|
extract_tiling_centers,
|
|
140
|
+
extract_tiling_edge_centers,
|
|
139
141
|
extract_tiling_vertices,
|
|
140
142
|
gen_hexagonal_tiling,
|
|
141
143
|
gen_polygon,
|
|
@@ -189,6 +191,7 @@ __all__ = [
|
|
|
189
191
|
"load_france_and_corsica_contour",
|
|
190
192
|
"extract_tiling_centers",
|
|
191
193
|
"extract_tiling_vertices",
|
|
194
|
+
"extract_tiling_edge_centers",
|
|
192
195
|
"compute_transfer_matrix",
|
|
193
196
|
"compute_transfer_matrix_with_intersections",
|
|
194
197
|
"get_array_borders_selection",
|
|
@@ -208,10 +208,12 @@ def _pairs_to_adj(
|
|
|
208
208
|
Parameters
|
|
209
209
|
----------
|
|
210
210
|
src, dst : NDArrayInt, shape (n_edges,)
|
|
211
|
-
Compact source and destination indices of every edge.
|
|
212
|
-
lie in ``[0, n_nodes)``.
|
|
211
|
+
Compact source and destination indices of every edge. ``src`` must
|
|
212
|
+
lie in ``[0, n_nodes)``. ``dst`` is any non-negative integer: it
|
|
213
|
+
need not be a node id (e.g. vertex -> polygon pairs, where there
|
|
214
|
+
can be more polygons than vertices).
|
|
213
215
|
n_nodes : int
|
|
214
|
-
|
|
216
|
+
Number of source nodes. Nodes without any edge are present in the
|
|
215
217
|
output with an empty neighbour list.
|
|
216
218
|
|
|
217
219
|
Returns
|
|
@@ -229,10 +231,13 @@ def _pairs_to_adj(
|
|
|
229
231
|
# is used rather than np.unique, whose hash-based path is an order of
|
|
230
232
|
# magnitude slower on this many keys; duplicates are then dropped in a
|
|
231
233
|
# single linear scan of the sorted array.
|
|
232
|
-
|
|
234
|
+
# The stride must exceed every destination, which can outnumber the
|
|
235
|
+
# source nodes; packing with n_nodes would then make keys collide.
|
|
236
|
+
stride = max(n_nodes, int(np.max(dst)) + 1)
|
|
237
|
+
code = src.astype(np.int64, copy=False) * stride + dst
|
|
233
238
|
code.sort()
|
|
234
239
|
code = code[np.concatenate(([True], np.diff(code) != 0))]
|
|
235
|
-
src_sorted, dst_sorted = np.divmod(code,
|
|
240
|
+
src_sorted, dst_sorted = np.divmod(code, stride)
|
|
236
241
|
|
|
237
242
|
# Slice the sorted destinations into one contiguous run per source.
|
|
238
243
|
counts = np.bincount(src_sorted, minlength=n_nodes)
|
|
@@ -829,6 +834,128 @@ def extract_tiling_centers(
|
|
|
829
834
|
return shapely.get_coordinates(centroids)
|
|
830
835
|
|
|
831
836
|
|
|
837
|
+
def _cluster_points(
|
|
838
|
+
coords: NDArrayFloat, tol: float
|
|
839
|
+
) -> Tuple[NDArrayInt, NDArrayFloat]:
|
|
840
|
+
"""Group coincident points, immune to floating-point noise.
|
|
841
|
+
|
|
842
|
+
Snapping coordinates to a grid (``rint(x / tol)``) is fragile: a value
|
|
843
|
+
lying on a grid boundary is sent to either neighbouring bucket by
|
|
844
|
+
~1e-15 of float noise, so the same physical point computed by two
|
|
845
|
+
different tiles may be split. Here points are instead merged by
|
|
846
|
+
*gaps*: they are sorted, and a new group starts only where two
|
|
847
|
+
consecutive values are further apart than ``tol``. A grid has
|
|
848
|
+
boundaries, a gap criterion does not, so noise far below ``tol`` can
|
|
849
|
+
never separate two copies of a point.
|
|
850
|
+
|
|
851
|
+
The grouping is done on ``x`` first, then on ``y`` inside every ``x``
|
|
852
|
+
group, so two points share a cluster when they are chained within
|
|
853
|
+
``tol`` along both axes. Distinct points closer than ``tol`` are
|
|
854
|
+
merged; callers must pick ``tol`` well below the smallest feature.
|
|
855
|
+
|
|
856
|
+
Cost is ``O(n log n)`` with two sorts, both vectorised. The second one
|
|
857
|
+
sorts a small unsigned group id (radix sort for up to 65535 groups),
|
|
858
|
+
which is far cheaper than a two-key ``lexsort`` on floats.
|
|
859
|
+
|
|
860
|
+
Parameters
|
|
861
|
+
----------
|
|
862
|
+
coords : NDArrayFloat, shape (n, 2)
|
|
863
|
+
Point coordinates (``n >= 1``).
|
|
864
|
+
tol : float
|
|
865
|
+
Largest gap, per axis, still considered the same point.
|
|
866
|
+
|
|
867
|
+
Returns
|
|
868
|
+
-------
|
|
869
|
+
cluster_indices : NDArrayInt, shape (n,)
|
|
870
|
+
Cluster id of every point. Ids are ordered lexicographically by
|
|
871
|
+
``(x, y)``.
|
|
872
|
+
representatives : NDArrayFloat, shape (n_clusters, 2)
|
|
873
|
+
One coordinate per cluster, in cluster-id order. All clusters of
|
|
874
|
+
an ``x`` group share that group's smallest ``x``, so rounding the
|
|
875
|
+
representatives preserves the strict lexicographic order.
|
|
876
|
+
"""
|
|
877
|
+
x, y = coords[:, 0], coords[:, 1]
|
|
878
|
+
|
|
879
|
+
# x groups: sorted x values chained within tol.
|
|
880
|
+
by_x = np.argsort(x, kind="stable")
|
|
881
|
+
x_sorted = x[by_x]
|
|
882
|
+
new_x_group = np.concatenate(([False], np.diff(x_sorted) > tol))
|
|
883
|
+
group_of_sorted_x = np.cumsum(new_x_group)
|
|
884
|
+
x_group = np.empty(len(x), dtype=group_of_sorted_x.dtype)
|
|
885
|
+
x_group[by_x] = group_of_sorted_x
|
|
886
|
+
|
|
887
|
+
# Order by (x group, y): sort y, then stably sort the group id, stored
|
|
888
|
+
# in the smallest unsigned dtype that holds it so numpy radix-sorts it.
|
|
889
|
+
by_y = np.argsort(y, kind="stable")
|
|
890
|
+
small = x_group[by_y].astype(np.min_scalar_type(int(group_of_sorted_x[-1])))
|
|
891
|
+
order = by_y[np.argsort(small, kind="stable")]
|
|
892
|
+
|
|
893
|
+
# y clusters inside every x group: split on gaps or group change.
|
|
894
|
+
group_sorted = x_group[order]
|
|
895
|
+
y_sorted = y[order]
|
|
896
|
+
new_cluster = np.concatenate(
|
|
897
|
+
(
|
|
898
|
+
[True],
|
|
899
|
+
(group_sorted[1:] != group_sorted[:-1]) | (np.diff(y_sorted) > tol),
|
|
900
|
+
)
|
|
901
|
+
)
|
|
902
|
+
cluster_indices = np.empty(len(x), dtype=np.int64)
|
|
903
|
+
cluster_indices[order] = np.cumsum(new_cluster) - 1
|
|
904
|
+
|
|
905
|
+
# Representatives: smallest x of the group, smallest y of the cluster.
|
|
906
|
+
first_in_cluster = np.flatnonzero(new_cluster)
|
|
907
|
+
group_x_min = x_sorted[np.flatnonzero(np.concatenate(([True], new_x_group[1:])))]
|
|
908
|
+
representatives = np.column_stack(
|
|
909
|
+
(group_x_min[group_sorted[first_in_cluster]], y_sorted[first_in_cluster])
|
|
910
|
+
)
|
|
911
|
+
return cluster_indices, representatives
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
def _vertex_clusters(
|
|
915
|
+
geom_array: NDArrayFloat, n_decimals: int
|
|
916
|
+
) -> Tuple[NDArrayFloat, NDArrayInt, NDArrayInt, NDArrayFloat]:
|
|
917
|
+
"""Array stage shared by the vertex and edge extractors.
|
|
918
|
+
|
|
919
|
+
Parameters
|
|
920
|
+
----------
|
|
921
|
+
geom_array : NDArray of shapely.Polygon, shape (n_polys,)
|
|
922
|
+
Polygons whose vertices are extracted.
|
|
923
|
+
n_decimals : int
|
|
924
|
+
Vertices closer than ``10**-n_decimals`` along both axes are merged.
|
|
925
|
+
|
|
926
|
+
Returns
|
|
927
|
+
-------
|
|
928
|
+
coords : NDArrayFloat, shape (n_input_verts, 2)
|
|
929
|
+
Raw vertex coordinates, closing repeats dropped, in polygon order.
|
|
930
|
+
poly_indices : NDArrayInt, shape (n_input_verts,)
|
|
931
|
+
Polygon id of every input vertex.
|
|
932
|
+
cluster_indices : NDArrayInt, shape (n_input_verts,)
|
|
933
|
+
Deduplicated vertex id of every input vertex.
|
|
934
|
+
unique_coords : NDArrayFloat, shape (n_verts, 2)
|
|
935
|
+
Deduplicated vertex coordinates rounded to ``n_decimals``, in
|
|
936
|
+
lexicographic ``(x, y)`` order.
|
|
937
|
+
"""
|
|
938
|
+
rings = shapely.get_rings(geom_array) # single call
|
|
939
|
+
n_per_ring = shapely.get_num_coordinates(rings)
|
|
940
|
+
all_coords, poly_indices = shapely.get_coordinates(geom_array, return_index=True)
|
|
941
|
+
|
|
942
|
+
# drop closing repeat (last vertex of every ring)
|
|
943
|
+
drop = np.zeros(len(all_coords), dtype=bool)
|
|
944
|
+
drop[np.cumsum(n_per_ring) - 1] = True
|
|
945
|
+
coords = all_coords[~drop]
|
|
946
|
+
poly_indices = poly_indices[~drop]
|
|
947
|
+
|
|
948
|
+
# merge coincident vertices by gap clustering (no rounding grid, hence no
|
|
949
|
+
# rounding ties for float noise to fall on)
|
|
950
|
+
cluster_indices, representatives = _cluster_points(coords, 10.0**-n_decimals)
|
|
951
|
+
return (
|
|
952
|
+
coords,
|
|
953
|
+
poly_indices,
|
|
954
|
+
cluster_indices,
|
|
955
|
+
np.round(representatives, decimals=n_decimals),
|
|
956
|
+
)
|
|
957
|
+
|
|
958
|
+
|
|
832
959
|
def extract_tiling_vertices(
|
|
833
960
|
polygons: Union[shapely.MultiPolygon, Iterable[shapely.Polygon]],
|
|
834
961
|
n_decimals: int = 2,
|
|
@@ -837,25 +964,26 @@ def extract_tiling_vertices(
|
|
|
837
964
|
Extract the vertices of all polygons, deduplicating shared vertices.
|
|
838
965
|
|
|
839
966
|
Vertices shared between adjacent polygons (identical coordinates up to
|
|
840
|
-
``n_decimals``
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
967
|
+
``10**-n_decimals``) are merged into a single entry. The closing repeat
|
|
968
|
+
of each exterior ring is dropped before deduplication. Both adjacency
|
|
969
|
+
mappings are built from the same ``(cluster_indices, poly_indices)``
|
|
970
|
+
arrays so ``shapely.get_rings`` is called only once.
|
|
971
|
+
|
|
972
|
+
Deduplication is a gap clustering (see :func:`_cluster_points`): two
|
|
973
|
+
vertices are the same point when they are chained within
|
|
974
|
+
``10**-n_decimals`` along both axes. Unlike snapping to a rounding
|
|
975
|
+
grid, this cannot be fooled by float noise on a rounding tie (e.g. a
|
|
976
|
+
coordinate of ``1.035`` computed as ``1.0349999999999999`` by one tile
|
|
977
|
+
and ``1.035`` by its neighbour). Cost is two sorts of the vertices.
|
|
851
978
|
|
|
852
979
|
Parameters
|
|
853
980
|
----------
|
|
854
981
|
polygons : Union[shapely.MultiPolygon, Iterable[shapely.Polygon]]
|
|
855
982
|
Polygons whose vertices are to be extracted.
|
|
856
983
|
n_decimals : int, optional
|
|
857
|
-
|
|
858
|
-
|
|
984
|
+
Vertices closer than ``10**-n_decimals`` along both axes are merged,
|
|
985
|
+
and the returned coordinates are rounded to this many decimals.
|
|
986
|
+
By default ``2``.
|
|
859
987
|
|
|
860
988
|
Returns
|
|
861
989
|
-------
|
|
@@ -878,27 +1006,9 @@ def extract_tiling_vertices(
|
|
|
878
1006
|
else:
|
|
879
1007
|
geom_array = np.asarray(list(polygons))
|
|
880
1008
|
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
# drop closing repeat (last vertex of every ring)
|
|
886
|
-
drop = np.zeros(len(all_coords), dtype=bool)
|
|
887
|
-
drop[np.cumsum(n_per_ring) - 1] = True
|
|
888
|
-
coords = all_coords[~drop]
|
|
889
|
-
poly_indices = poly_indices[~drop]
|
|
890
|
-
|
|
891
|
-
# quantise the coordinates on the rounding grid, shifted to non-negative
|
|
892
|
-
# values so the packing below is monotonic in x then y
|
|
893
|
-
key = np.rint(coords * 10.0**n_decimals).astype(np.int64)
|
|
894
|
-
key -= key.min(axis=0)
|
|
895
|
-
|
|
896
|
-
# pack (x, y) into a single integer and deduplicate
|
|
897
|
-
stride = int(key[:, 1].max()) + 1
|
|
898
|
-
code = key[:, 0] * stride + key[:, 1]
|
|
899
|
-
_, first, inverse = np.unique(code, return_index=True, return_inverse=True)
|
|
900
|
-
cluster_indices = inverse.ravel().astype(np.int64)
|
|
901
|
-
unique_coords = np.round(coords[first], decimals=n_decimals)
|
|
1009
|
+
_, poly_indices, cluster_indices, unique_coords = _vertex_clusters(
|
|
1010
|
+
geom_array, n_decimals
|
|
1011
|
+
)
|
|
902
1012
|
|
|
903
1013
|
# vertex → polygons, grouped in a single pass
|
|
904
1014
|
vert_to_polys = _pairs_to_adj(cluster_indices, poly_indices, len(unique_coords))
|
|
@@ -919,6 +1029,88 @@ def extract_tiling_vertices(
|
|
|
919
1029
|
)
|
|
920
1030
|
|
|
921
1031
|
|
|
1032
|
+
def extract_tiling_edge_centers(
|
|
1033
|
+
polygons: Union[shapely.MultiPolygon, Iterable[shapely.Polygon]],
|
|
1034
|
+
n_decimals: int = 2,
|
|
1035
|
+
) -> Tuple[NDArrayFloat, Dict[int, List[int]], Dict[int, List[int]]]:
|
|
1036
|
+
"""
|
|
1037
|
+
Extract the edge centres of all polygons, deduplicating shared edges.
|
|
1038
|
+
|
|
1039
|
+
The edge ``k`` of a polygon joins its ring vertex ``k`` to vertex
|
|
1040
|
+
``k + 1`` (the last edge wraps back to vertex ``0``). Two edges are the
|
|
1041
|
+
same edge when they join the same pair of *deduplicated vertices* (see
|
|
1042
|
+
:func:`extract_tiling_vertices`), irrespective of direction, so an edge
|
|
1043
|
+
shared by two adjacent tiles yields a single centre. Deduplicating on
|
|
1044
|
+
vertex-id pairs rather than on rounded midpoints keeps the topology
|
|
1045
|
+
consistent with :func:`extract_tiling_vertices` and inherits its
|
|
1046
|
+
immunity to rounding ties, while the returned coordinates are the exact
|
|
1047
|
+
(unrounded) midpoints.
|
|
1048
|
+
|
|
1049
|
+
Cost is one vertex clustering plus one integer sort of the edge keys;
|
|
1050
|
+
everything else is vectorised NumPy. The per-vertex dictionaries of
|
|
1051
|
+
:func:`extract_tiling_vertices` are not built.
|
|
1052
|
+
|
|
1053
|
+
Parameters
|
|
1054
|
+
----------
|
|
1055
|
+
polygons : Union[shapely.MultiPolygon, Iterable[shapely.Polygon]]
|
|
1056
|
+
Hole-free polygons (every tile built by this module is) whose edge
|
|
1057
|
+
centres are to be extracted.
|
|
1058
|
+
n_decimals : int, optional
|
|
1059
|
+
Vertices closer than ``10**-n_decimals`` are merged, forwarded to
|
|
1060
|
+
:func:`extract_tiling_vertices`. By default ``2``.
|
|
1061
|
+
|
|
1062
|
+
Returns
|
|
1063
|
+
-------
|
|
1064
|
+
edge_centers : NDArrayFloat, shape (n_edges, 2)
|
|
1065
|
+
Midpoints of the ``n_edges`` deduplicated edges, ordered by their
|
|
1066
|
+
(min vertex id, max vertex id) key.
|
|
1067
|
+
edge_to_polys : Dict[int, List[int]]
|
|
1068
|
+
Deduplicated edge id -> sorted list of polygon ids sharing it.
|
|
1069
|
+
Interior edges have two entries, boundary edges exactly one.
|
|
1070
|
+
poly_to_edges : Dict[int, List[int]]
|
|
1071
|
+
Polygon id -> deduplicated edge ids in ring order, i.e. entry ``k``
|
|
1072
|
+
is the edge from ring vertex ``k`` to ring vertex ``k + 1``. For a
|
|
1073
|
+
rectangle, entries ``(0, 2)`` and ``(1, 3)`` are the opposite pairs.
|
|
1074
|
+
"""
|
|
1075
|
+
if isinstance(polygons, shapely.MultiPolygon):
|
|
1076
|
+
geom_array = np.array(polygons.geoms)
|
|
1077
|
+
else:
|
|
1078
|
+
geom_array = np.asarray(list(polygons))
|
|
1079
|
+
|
|
1080
|
+
n_polys = len(geom_array)
|
|
1081
|
+
if n_polys == 0:
|
|
1082
|
+
return np.empty((0, 2), dtype=float), {}, {}
|
|
1083
|
+
|
|
1084
|
+
coords, poly_indices, cluster, _ = _vertex_clusters(geom_array, n_decimals)
|
|
1085
|
+
|
|
1086
|
+
# Index of the next vertex along each ring, wrapping at the ring end.
|
|
1087
|
+
n_per_poly = np.bincount(poly_indices, minlength=n_polys)
|
|
1088
|
+
ends = np.cumsum(n_per_poly)
|
|
1089
|
+
nxt = np.arange(len(coords)) + 1
|
|
1090
|
+
nxt[ends - 1] = ends - n_per_poly
|
|
1091
|
+
|
|
1092
|
+
# Undirected edge key from the two vertex ids, then one sort to dedupe
|
|
1093
|
+
# (a plain sort is far cheaper than np.unique with its index outputs).
|
|
1094
|
+
va = cluster
|
|
1095
|
+
vb = cluster[nxt]
|
|
1096
|
+
code = np.minimum(va, vb) * (int(np.max(cluster)) + 1) + np.maximum(va, vb)
|
|
1097
|
+
order = np.argsort(code, kind="stable")
|
|
1098
|
+
sorted_code = code[order]
|
|
1099
|
+
is_first = np.concatenate(([True], sorted_code[1:] != sorted_code[:-1]))
|
|
1100
|
+
edge_id = np.empty(len(code), dtype=np.int64)
|
|
1101
|
+
edge_id[order] = np.cumsum(is_first) - 1
|
|
1102
|
+
first = order[is_first] # stable sort: first occurrence of every edge
|
|
1103
|
+
|
|
1104
|
+
edge_centers = 0.5 * (coords[first] + coords[nxt[first]])
|
|
1105
|
+
|
|
1106
|
+
edge_to_polys = _pairs_to_adj(edge_id, poly_indices, len(first))
|
|
1107
|
+
poly_to_edges = {
|
|
1108
|
+
i: group.tolist() for i, group in enumerate(np.split(edge_id, ends[:-1]))
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
return edge_centers, edge_to_polys, poly_to_edges
|
|
1112
|
+
|
|
1113
|
+
|
|
922
1114
|
def adjacency_by_shared_vertices(
|
|
923
1115
|
polygons: List[shapely.Polygon],
|
|
924
1116
|
) -> Dict[int, List[int]]:
|
|
@@ -1427,7 +1427,7 @@ def _batch_clip_numba_and_verts(
|
|
|
1427
1427
|
out_x = np.zeros((N, 8))
|
|
1428
1428
|
out_y = np.zeros((N, 8))
|
|
1429
1429
|
out_n = np.zeros(N, dtype=np.intp)
|
|
1430
|
-
for idx in prange(N):
|
|
1430
|
+
for idx in prange(N):
|
|
1431
1431
|
area, n_verts = _clip_single_with_verts(
|
|
1432
1432
|
tvx[idx],
|
|
1433
1433
|
tvy[idx],
|
|
@@ -1870,7 +1870,7 @@ def _batch_clip_numba_nverts_and_verts(
|
|
|
1870
1870
|
out_x = np.zeros((N, width))
|
|
1871
1871
|
out_y = np.zeros((N, width))
|
|
1872
1872
|
out_n = np.zeros(N, dtype=np.intp)
|
|
1873
|
-
for idx in prange(N):
|
|
1873
|
+
for idx in prange(N):
|
|
1874
1874
|
area, n_out_verts = _clip_nverts_with_verts(
|
|
1875
1875
|
vx[idx],
|
|
1876
1876
|
vy[idx],
|
|
@@ -2087,7 +2087,7 @@ def _batch_clip_tri_rect_and_verts(
|
|
|
2087
2087
|
out_x = np.zeros((N, 8))
|
|
2088
2088
|
out_y = np.zeros((N, 8))
|
|
2089
2089
|
out_n = np.zeros(N, dtype=np.intp)
|
|
2090
|
-
for idx in prange(N):
|
|
2090
|
+
for idx in prange(N):
|
|
2091
2091
|
area, n_verts = _clip_tri_rect_with_verts(
|
|
2092
2092
|
vx[idx, 0],
|
|
2093
2093
|
vx[idx, 1],
|
|
@@ -3115,7 +3115,7 @@ def _batch_clip_triangles_and_verts(
|
|
|
3115
3115
|
out_x: NDArrayFloat = np.zeros((n, 9))
|
|
3116
3116
|
out_y = np.zeros((n, 9))
|
|
3117
3117
|
out_n = np.zeros(n, dtype=np.intp)
|
|
3118
|
-
for k in prange(n):
|
|
3118
|
+
for k in prange(n):
|
|
3119
3119
|
area, n_verts = _clip_triangle_pair_with_verts(
|
|
3120
3120
|
sx[k], sy[k], cx[k], cy[k], out_x[k], out_y[k]
|
|
3121
3121
|
)
|
|
@@ -3713,7 +3713,7 @@ def _batch_clip_numba_convexclip_and_verts(
|
|
|
3713
3713
|
out_x = np.zeros((N, width))
|
|
3714
3714
|
out_y = np.zeros((N, width))
|
|
3715
3715
|
out_n = np.zeros(N, dtype=np.intp)
|
|
3716
|
-
for idx in prange(N):
|
|
3716
|
+
for idx in prange(N):
|
|
3717
3717
|
area, n_out_verts = _clip_convexclip_with_verts(
|
|
3718
3718
|
subj_vx[idx],
|
|
3719
3719
|
subj_vy[idx],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: quickpaver
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: A python package providing a paving toolbox.
|
|
5
5
|
Author-email: Antoine Collet <antoinecollet5@gmail.com>
|
|
6
6
|
License: BSD 3-Clause License
|
|
@@ -87,7 +87,7 @@ Provides-Extra: lint
|
|
|
87
87
|
Requires-Dist: pre-commit; extra == "lint"
|
|
88
88
|
Requires-Dist: pre-commit-hooks; extra == "lint"
|
|
89
89
|
Requires-Dist: codespell; extra == "lint"
|
|
90
|
-
Requires-Dist: ruff==0.16.
|
|
90
|
+
Requires-Dist: ruff==0.16.10; extra == "lint"
|
|
91
91
|
Requires-Dist: ty==0.0.84; extra == "lint"
|
|
92
92
|
Provides-Extra: install
|
|
93
93
|
Requires-Dist: pip; extra == "install"
|