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

Two possible enhancement #130

Open
tufftuff93 opened this issue Apr 7, 2017 · 0 comments
Open

Two possible enhancement #130

tufftuff93 opened this issue Apr 7, 2017 · 0 comments

Comments

@tufftuff93
Copy link

Hello,

Two little remarks after finishing using OSMDeepOD. These are not a issues, the program is great and the results quite good.

1 - OSMDeepOD with the option FollowStreets = yes.
In my work, i have to use a topology rule, « a point crosswalk must be on a road street line »

Looking at the code in node_merger.py, it seems that when nodes are merged by the function box_walker.walk(), the process doesn't try to snap (capture) the merged node on the nearest road street line. The pink points are the detected nodes vs the streets lines.

image

image

It would have been of use for me to find this option in the config.ini file. But it is not a problem, i will snap point to the nearest line with qgis or similar.

Looking at the code in node_merger.py, it seems possible :

@staticmethod
def _merge(sub_graph):
    node_count = len(sub_graph)
    latitude_sum = 0
    longitude_sum = 0
    for node in sub_graph:
        latitude_sum += node.latitude
        longitude_sum += node.longitude

    latitude = latitude_sum / node_count
    longitude = longitude_sum / node_count
_« « «  May be something to snap (capture) node to street if option = true» » »_
    merged = Node(latitude, longitude, 0)
return merged

2 – Config.ini, stepwidth vs step_distance :

For me, it was hard to understand the StepWidth option of the ini file, even with the docs. Was it a distance ? a ratio of something ? But if it is a ratio, why is it a step ?

After looking at the code, I discover the self._step_distance property of Walker() Object. This step_distance is much easier to understant for me ; ) It may help others.

And, you still can calculate step_width if you fix the step_distance in the config.ini.
self._step_distance = resolution * (self._square_image_length * self._step_width).

Bye

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant