some_rules.xml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <not-osm>
  3. <osm-script name="Area::Create_from_admin_level" version="1">
  4. <query type="relation">
  5. <has-kv k="admin_level"/>
  6. <has-kv k="name"/>
  7. </query>
  8. <foreach into="rel">
  9. <union>
  10. <recurse type="relation-way" from="rel"/>
  11. <recurse type="way-node"/>
  12. </union>
  13. <make-area pivot="rel" into="odd"/>
  14. <detect-odd-nodes into="odd"/>
  15. <foreach from="odd" into="i">
  16. <union><item set="i"/><item set="rel"/></union>
  17. <conflict>In <item set="rel"/>, the <item set="i"/> is contained in an odd number of segments.</conflict>
  18. </foreach>
  19. </foreach>
  20. </osm-script>
  21. <osm-script name="Area::Create_from_multipolygon" version="2">
  22. <query type="relation">
  23. <has-kv k="type" v="multipolygon"/>
  24. <has-kv k="name"/>
  25. </query>
  26. <foreach into="rel">
  27. <union>
  28. <recurse type="relation-way" from="rel"/>
  29. <recurse type="way-node"/>
  30. </union>
  31. <make-area pivot="rel" into="odd"/>
  32. <detect-odd-nodes into="odd"/>
  33. <foreach from="odd" into="i">
  34. <union><item set="i"/><item set="rel"/></union>
  35. <conflict>In <item set="rel"/>, the <item set="i"/> is contained in an odd number of segments.</conflict>
  36. </foreach>
  37. </foreach>
  38. </osm-script>
  39. </not-osm>