enzet / map-machine

Python renderer for OpenStreetMap with custom icons intended to display as many map features as possible
MIT License
503 stars 31 forks source link

Deal with edge case of zero length paths. #147

Open RadostW opened 1 year ago

RadostW commented 1 year ago

When cropping larger OSM datasets sometimes paths with zero nodes are formed. Such paths break path -> svg code.

Checking for len < 2 resolves this problem.

enzet commented 1 year ago

Checks had failed mostly because of style issues. The project uses Black style formatter. To apply Black style, one have to simply run

black -l 80 map_machine

with the Black installed (pip install black).