Skip to content

Conversation

@jake-low
Copy link
Contributor

@jake-low jake-low commented Mar 8, 2025

This PR does two things:

  1. Changes EmptyTagFilter().apply_to() to EmptyTagFilter().enable_for() in the GeoJSON example, so that the example works (see first commit).
  2. Renames some variables in the examples (see second and third commits). I found it confusing that the name o was used both for the osmium library and also for an OSM Node/Way/Relation, such that the latter sometimes shadowed the former. So I changed the examples to refer to the library by its full name, and to refer to OSM objects as n/w/a/r if their type is known (e.g. when they are arguments to the node/way/area/relation handler functions). I tested all of the examples to make sure they still worked after the changes.

Let me know if you have any feedback on these changes, and thanks for maintaining pyosmium.

@lonvia lonvia merged commit f8d9d13 into osmcode:master Mar 9, 2025
22 checks passed
@lonvia
Copy link
Member

lonvia commented Mar 9, 2025

Looks all good to me. I had already stepped away from the o alias for osmium in the cookbooks, precisely for the reason you mention. So definitely a step in the right direction. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants