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

filtering? #603

Closed
freebrevik opened this issue Jul 7, 2016 · 3 comments
Closed

filtering? #603

freebrevik opened this issue Jul 7, 2016 · 3 comments

Comments

@freebrevik
Copy link

Is there anyway during import that I can filter out any rows where the column 'name' is blank? And is there any way I could not import anything from the 'roads' table?

@pnorman
Copy link
Collaborator

pnorman commented Jul 7, 2016

If you want custom logic you can use lua transforms which let you control what gets filtered and what is in the roads table.

@pnorman pnorman closed this as completed Jul 7, 2016
@freebrevik
Copy link
Author

@pnorman Thank you for the reference, I guess if I understand the transformation document correctly, on that second document if I replace the roads with just returning 0, nothing will go into the road table correct?

@SomeoneElseOSM
Copy link

It's actually easier than that - just remove the tags you're not interested in. Here, for example, is part of a lua script that removes all administrative boundaries:

https://github.com/SomeoneElseOSM/SomeoneElse-style/blob/master/style.lua#L359

You'll want to take the example lua script that comes with osm2pgsql, add in new code to remove what you don't want and use that script when loading the rendering database.

An example of using that script is here:

http://wiki.openstreetmap.org/wiki/User:SomeoneElse/Ubuntu_1404_tileserver_load#Reload_the_data_and_clear_previously_cached_tiles

but of course you'll want to use your own values for most of the parameters.

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

3 participants