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

Make -G / --multi-geometry option default #660

Closed
Komzpa opened this issue Dec 22, 2016 · 8 comments
Closed

Make -G / --multi-geometry option default #660

Komzpa opened this issue Dec 22, 2016 · 8 comments

Comments

@Komzpa
Copy link
Contributor

Komzpa commented Dec 22, 2016

Option --multi-geometry allows for more flexibility in processing and in general produces better rendering results. This option is subtle and is often lost, giving some unexpected results.

Related:
gravitystorm/openstreetmap-carto#59
#609

@Zverik
Copy link
Contributor

Zverik commented Dec 22, 2016

A possible reason is a significant speed decrease of tile rendering: http://www.paulnorman.ca/blog/2014/03/osm2pgsql-multipolygons/ (see the chart at the end).

@Komzpa
Copy link
Contributor Author

Komzpa commented Dec 22, 2016

For linear features there is an automated split-up based on feature length. This split is enabled unconditionally.

https://github.com/openstreetmap/osm2pgsql/blob/95a3a2036aa6c45698378e5b7b6643d9a7a276b1/geometry-builder.cpp#L293

Polygon split could be implemented in a similar way: if bounding box is wide (probably wider than 180 degrees), split up the rightmost part into a second part, until it grows up to being 180 degrees wide. This way Russia/Alaska will be split into two parts not affecting performance in Europe, but labeling for then would become much better.

@pnorman pnorman added this to the 0.94.0 milestone Feb 28, 2017
@pnorman
Copy link
Collaborator

pnorman commented Feb 28, 2017

Let's decide on this for the next release.

@Komzpa
Copy link
Contributor Author

Komzpa commented Mar 1, 2017

@pnorman what are the things I can do to help with decision?

@pnorman
Copy link
Collaborator

pnorman commented Mar 2, 2017

@pnorman what are the things I can do to help with decision?

I don't think there's anything. We don't need more information, the various factors need to be weighed and a decision made on if we're going to do this or not.

@lonvia
Copy link
Collaborator

lonvia commented May 6, 2017

I really have no opinion on that. I don't think it seriously hurts to have a less used defaults for historical reasons (there are others like --slim) but it neither hurts much to change the default in this case. Just make sure that changing the default doesn't break existing scripts, i.e. -G/--multi-geometry should continue to work as expected and we'd need a new --no-multi-geometry option.

@lonvia
Copy link
Collaborator

lonvia commented Jul 26, 2017

If somebody would like to make a PR implementing this along the lines I've outlined in the previous comment (please make sure the tests still pass), then we can merge this. Otherwise the option will stay as is.

@lonvia lonvia removed this from the 0.94.0 milestone Aug 19, 2017
@pnorman
Copy link
Collaborator

pnorman commented Oct 4, 2017

No PR was forthcoming, so we're going to keep the current defaults.

@pnorman pnorman closed this as completed Oct 4, 2017
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

4 participants