Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source continuity.py from sgeop #186

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/algorithms/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import common, simplify, triangles
from . import simplify, triangles
94 changes: 0 additions & 94 deletions core/algorithms/common.py

This file was deleted.

2 changes: 1 addition & 1 deletion core/algorithms/simplify.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pandas as pd
from libpysal import graph
from scipy import sparse
from sgeop.continuity import continuity, get_stroke_info

from .artifacts import (
get_artifacts,
Expand All @@ -15,7 +16,6 @@
nx_gx_cluster,
nx_gx_identical,
)
from .common import continuity, get_stroke_info
from .nodes import (
_status,
consolidate_nodes,
Expand Down
34 changes: 0 additions & 34 deletions core/tests/test_common.py

This file was deleted.

3 changes: 2 additions & 1 deletion notebooks/typology-multiples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"import shapely\n",
"from libpysal import graph\n",
"from scipy import sparse\n",
"from sgeop.continuity import continuity\n",
"from sgeop.geometry import voronoi_skeleton\n",
"\n",
"from core import algorithms, utils"
Expand Down Expand Up @@ -102,7 +103,7 @@
"outputs": [],
"source": [
"# %%time\n",
"roads, coins = algorithms.common.continuity(roads)"
"roads, coins = continuity(roads)"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions notebooks/typology-rectangles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
"from libpysal import graph\n",
"from scipy import sparse, spatial\n",
"from sgeop import geometry\n",
"from sgeop.continuity import continuity\n",
"from tqdm import tqdm\n",
"\n",
"from core import algorithms, utils"
"from core import utils"
]
},
{
Expand Down Expand Up @@ -97,7 +98,7 @@
],
"source": [
"%%time\n",
"roads = algorithms.common.continuity(roads_clean)"
"roads = continuity(roads_clean)"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion notebooks/typology-triangles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"from folium import plugins\n",
"from libpysal import graph\n",
"from scipy import sparse\n",
"from sgeop.continuity import continuity\n",
"from sgeop.geometry import _is_within\n",
"\n",
"from core import algorithms, utils"
Expand Down Expand Up @@ -112,7 +113,7 @@
"source": [
"%%time\n",
"roads = roads[~roads.geometry.duplicated()].reset_index()\n",
"roads = algorithms.common.continuity(roads)"
"roads = continuity(roads)"
]
},
{
Expand Down