Open kj-9 opened 1 year ago
crs is important especailly when you call buffer
in shapely object.
shapley does not know about units of distance:
https://gis.stackexchange.com/questions/304914/python-shapely-intersection-with-buffer-in-meter
it was weird when I plot 4326 projected gdf of streets without width it was proper:
but with gdf.geometry.buffer(1) applied, it is just circle and axis is messed:
It appeared in crs:4326, buffering 1 unit means 1 degree in lat or lng, far more than 1 meter. (I don't know exact unit)
If I buffer(0.00001)
:
That's why original implementation, before plotting, prettymap projects each gdf in utm.
(which is default behaviour of ox.project_gdf
)
in utm 1 unit is 1 meter.
need to refactor function args: https://github.com/kj-9/prettymaps/actions/runs/5589272216/jobs/10217297818#step:6:35
feels like width
in layer parameter should be in styles parameter.
https://github.com/kj-9/prettymaps/blob/123e347ac5783bf74a02a532fe2e89b1ee8b094d/prettymaps/new_api/plot.py#L335
this needs presets to be rewritten.
Integration tests should cover more presets (or map styles). There is feature which does not cover one preset.
Can be introduce test coverage soon.
see here for pytest-regressions parameterized: https://pytest-regressions.readthedocs.io/en/latest/overview.html#parametrized-tests
can we test this? np.random.choice(palette)
by setting seeds?
imports:
can you rewrite?