-
Notifications
You must be signed in to change notification settings - Fork 1
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
Script Stuck When Running build_map.py with mosstool #4
Comments
Thank you for raising this issue! It seems that the problem might be due to the logging level not being set in the code, which results in only warnings being displayed while info-level updates that show the progress of the code are hidden. To resolve this, you can try adding the following lines to your code: import logging
logging.basicConfig(level=logging.INFO) This should allow you to see more detailed information about the code's execution and help determine if it is getting stuck at any point. Please let us know if this helps or if there's anything else we can assist you with. |
Hi,
logging.info("Starting map construction...")
builder = Builder(
net=roadnet,
aois=aois,
merge_aoi=False,
proj_str="+proj=tmerc +lat_0=-33.882244 +lon_0=151.111935", # Projection string for Sydney
)
m = builder.build("example")
logging.info("Map construction completed!") |
Bug Report Summary Issue 1: When running the Builder class without merge_aoi=False, a TypeError occurs on MacOS. Issue Description
TypeError: _add_poly_aoi_unit() missing 1 required positional argument: 'arg'
TypeError: _find_aoi_parent_unit() missing 1 required positional argument: 'i_aoi' Steps to Reproduce
import logging 设置日志级别logging.basicConfig(level=logging.INFO) 初始化路网和建筑数据rn = RoadNet( 路网数据logging.info("开始创建路网数据...") 建筑数据logging.info("开始创建建筑数据...") 构建地图logging.info("开始构建地图...") try:
Expected Behavior The Builder.build() function should construct the map successfully without requiring the arg parameter for _add_poly_aoi_unit() or _find_aoi_parent_unit(). Actual Behavior The following errors occur: Screenshots
Additional Context
|
Hello, I think the |
Describe the bug
The process for building the map using mosstool does not complete successfully. It appears to be stuck or repeatedly outputs warnings without generating the expected results.
To Reproduce
Steps to reproduce the behavior:
1. Clone the repository and set up the required environment using conda and dependencies as instructed.
2. Prepare the input files: sydney_topo.geojson and sydney_aois.geojson (both are in map_cache).
3. Run the script build_map.py with the provided code snippet:
from mosstool.map.osm import RoadNet, Building
rn = RoadNet(
proj_str="+proj=merc +lat_0=-33.882244 +lon_0=151.111935",
max_latitude=-33.721288,
min_latitude=-34.0432,
max_longitude=151.243988,
min_longitude=150.839882
)
roadnet = rn.create_road_net("map_cache/sydney_topo.geojson")
building = Building(
proj_str="+proj=merc +lat_0=-33.882244 +lon_0=151.111935",
max_latitude=-33.721288,
min_latitude=-34.0432,
max_longitude=151.243988,
min_longitude=150.839882
)
aois = building.create_building("map_cache/sydney_aois.geojson")
from mosstool.map.builder import Builder
builder = Builder(
net=roadnet,
aois=aois,
proj_str="+proj=merc +lat_0=-33.882244 +lon_0=151.111935"
)
m = builder.build("example")
Expected behavior
The script should process the input files and produce the expected results, such as generating the built map or any relevant output.
Screenshots
Attached are the relevant screenshots:
1. Repeated warnings in the terminal.
Versions
• OS: Linux Ubuntu 22.04
• Python Version: Python 3.9 (installed via Conda)
• CUDA Version: CUDA 12.2
• Tool Version: mosstool 1.2.0
Additional context
• Input files used: sydney_topo.geojson and sydney_aois.geojson.
• Temporary issues like insufficient disk space were resolved during the testing. The remaining problem persists even after ensuring proper configurations for cache and environment.
• Environment was activated using Conda with sufficient privileges.
The text was updated successfully, but these errors were encountered: