uscuni / simplification

Simplification of street network geometry
Other
10 stars 0 forks source link

network preprocessing #109

Closed martinfleis closed 3 months ago

martinfleis commented 3 months ago

This is what we do now based on the original road networks before doing anything with it

roads = momepy.remove_false_nodes(roads)
roads = roads[~roads.geometry.duplicated()].reset_index()
roads = momepy.remove_false_nodes(roads)

I believe that the Parquet versions of "no node 2" networks should be an output of this, not just a single remove_false_nodes run.

jGaboardi commented 3 months ago

OK, so I will update #80 with:

Let me know how this sounds

martinfleis commented 3 months ago

Seems I should remove this chunk from common.continuity(), correct?

Yeah, that will be redundant.

jGaboardi commented 3 months ago

We want to drop or keep the index after resetting in line 2?

roads = momepy.remove_false_nodes(roads)
roads = roads[~roads.geometry.duplicated()].reset_index()
roads = momepy.remove_false_nodes(roads)

@martinfleis @anastassiavybornova

I think .reset_index(drop=True) is what we want. Is there a reason to keep the original index for tracking the count dropped? And if so, should that new column be renamed something other than index?

martinfleis commented 3 months ago

Reset. We don't care.

jGaboardi commented 3 months ago

Resolving #80