Skip to main content
Question

OSM PBF reader Map Features vs Feature Types


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor

I was experimenting with the OSM PBF reader, and I noticed that I get different results when I filtered on the Map Features vs the Feature types.

 

In my sample data, if I selected building in the OSM Map Features, it read in 47691 features.OSMMapFeaturesIf on the other hand I left the Map Features blank and selected building in the Feature Types to Read, only 45050 features were read in.

OSMFeatureTypesThoughts on why the mapping is different?

OSMDiff 

 I assume it has something to do with Multiple Map Feature Resolution, and I would expect extra features if it was set to Duplicate Features, but since it was Use First, I'm at a loss.

2 replies

debbiatsafe
Safer
Forum|alt.badge.img+20

Hello @jdh​ 

I was able to reproduce the different number of features with Map Features vs feature type behaviour.

 

On my test data with the feature type as "building", I was able to produce the same number of features as the Map Feature=Building FeatureReader if I set the Multiple Map Feature Resolution parameter to Duplicate Features. The osmpbf_id's of features output all matched as well.

 

Are you able to see the same behaviour with your dataset?


jdh
Contributor
Forum|alt.badge.img+28
  • Author
  • Contributor
  • May 4, 2023
debbiatsafe wrote:

Hello @jdh​ 

I was able to reproduce the different number of features with Map Features vs feature type behaviour.

 

On my test data with the feature type as "building", I was able to produce the same number of features as the Map Feature=Building FeatureReader if I set the Multiple Map Feature Resolution parameter to Duplicate Features. The osmpbf_id's of features output all matched as well.

 

Are you able to see the same behaviour with your dataset?

Hi Debbie,

 

Yes, I was able to see that behaviour.

 

Thinking about it a bit more, I ran the original setup (Multiple Map Feature Resolution - Use First), but with both amenity and building selected for the Map Feature

In that case the building numbers were 45050 for the Feature Types and 45056 for the Map Features.

 

So a feature with tags for multiple feature types (building and amenity) will end up in the amenity feature type if using the default Map Features (ie nothing selected, 29 OSM themes) and Use First.

If both amenity and buildings are explicitly selected, it will still end up in amenity. But if building is selected and amenity isn't, then the amenity tag is not considered during feature mapping so the feature ends up in the building feature type.

 

This is probably the behaviour we want, but it would be good to document it.

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings