Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Add option to osm2pgsql to keep data tagged as natural=coastline #3350

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: springmeyer
[Submitted to the original trac issue database at 11.55am, Monday, 29th November 2010]

Data tagged natural=coastline data is discarded (filtered out) in osm2pgsql based on the assumption that this information will be pulled from the [http://wiki.openstreetmap.org/wiki/Coastline_error_checker coastline error checker] application after being further processed.

But, it is foreseeable that users may prefer the raw ways to be imported, particularly to be able to store linestrings of the coastlines.

The attached patch adds a -K,--keep-coastlines option that if passed will skip the default behavior of discarding coastline data.

@openstreetmap-trac
Copy link
Author

Author: springmeyer
[Added to the original trac issue at 2.04pm, Monday, 29th November 2010]

It should be noted to anyone interested in this patch that your mileage will vary using the coastlines this way. The coastline error checker does some sophisticated topological processing of the data to try to make it more usable, and raw coastlines imported directly into the database may not meet expectations.

@openstreetmap-trac
Copy link
Author

Author: jburgess777[at]googlemail.com
[Added to the original trac issue at 11.24pm, Sunday, 5th December 2010]

Thanks for the patch Dane. I applied it with a minor modification to split out the island handling in r24605. I don't know whether my change is strictly necessary but it prevents these lines from being skipped when you keep the coastlines.

I noticed that when you enable the option there are also many more polygons, presumably from small islands and lakes which are all tagged with natural=coastline. There are also a few extra points from nodes tagged with natural=coastline.

@openstreetmap-trac
Copy link
Author

Author: springmeyer
[Added to the original trac issue at 4.45pm, Monday, 6th December 2010]

Hi Jon,

Thanks so much for the review, and applying it!

In my testing I noticed that closed islands did seem to remain (as polygons), but nevertheless seems wise to enforce that for predictability and code clarity.

Cheers,

Dane

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

No branches or pull requests

1 participant