How to find out which elements were discarded?

12 views
Skip to first unread message

Jose

unread,
May 19, 2020, 4:46:02 AM5/19/20
to imposm
Hello,


Is there a way find out which elements did not match any mapping rule? 

I would like to add these non-matching elements to a separate table for analysis.


Thanks,
Jose

Imre Samu

unread,
May 19, 2020, 8:47:57 AM5/19/20
to imp...@googlegroups.com
> Is there a way find out which elements did not match any mapping rule? 

for a simple table  - probably the negative   " filters / reject " is useful

example:

    filters:
     reject:
        highway: ["residential","service","track"]
    mapping:
      highway:
      - __any__
    type: linestring



for ALL mapping rules - it is harder. 

the SQL + Imposm3 way:
- use non-documented : use_single_id_space flag ( https://github.com/omniscale/imposm3/search?q=use_single_id_space )
- create  5 extra table  based on type (  point, linestring, polygon,  relation and relation_member )
    - without geometry
    - with hstore
    - with "__any__": ["__any__"] mapping 
- and with a simple SQL script it is easy to find the differences in the osm_id.   

or export all osm_id  to the text file in osmium format ( n987 , w653, r321 )  
and use your favorite linux text command tool to select the differences with the input osm files
     ( it is useful if you want to check/detect  the "broken osm polygons"  )


Best,
 Imre 
 ( imposm3 power user )


--
--
_______________________________________________
Imposm mailing list
imp...@googlegroups.com
http://groups.google.com/group/imposm

---
You received this message because you are subscribed to the Google Groups "imposm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to imposm+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/imposm/82429efd-7dc4-4714-8cc2-9c70899a88fb%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages