imagery-footprints-report.json 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. {
  2. "source": "yuanlingPic3 z19 TMS local imagery, per-pixel classified then 8-connected segmented",
  3. "imageryDir": "D:/GIS/GIS/yuanlingPic3",
  4. "command": "node tools/city-massing/segment-imagery-footprints.mjs",
  5. "thresholds": {
  6. "greenMin": 8,
  7. "greenG": 55,
  8. "waterBrightness": 90,
  9. "waterBlueGreen": 14,
  10. "waterTexture": 9,
  11. "darkLightSplit": 95,
  12. "edgeBarrier": 14,
  13. "erodeRadius": 1,
  14. "minAreaSqm": 40,
  15. "maxAreaSqm": 4000,
  16. "minFillRatio": 0.55,
  17. "maxLongSideM": 90,
  18. "minShortSideM": 4,
  19. "ringRadiusPx": 3,
  20. "maxRingVegetation": 0.5
  21. },
  22. "tiles": {
  23. "z19": {
  24. "considered": 4885,
  25. "read": 4885,
  26. "missing": 0
  27. },
  28. "z18Audit": {
  29. "read": 1296,
  30. "missing": 0
  31. }
  32. },
  33. "tileRefFormat": "tileRefs entries are [z, x, tmsY]; tmsY = 2**z - 1 - googleY matches the on-disk path",
  34. "perMask": [
  35. {
  36. "maskId": 63,
  37. "maskAreaSqm": 47969,
  38. "tileRange": {
  39. "z": 19,
  40. "x0": 423015,
  41. "x1": 423021,
  42. "googleY0": 218927,
  43. "googleY1": 218930
  44. },
  45. "tilesConsidered": 28,
  46. "tilesRead": 28,
  47. "tilesMissing": 0,
  48. "windowPx": [
  49. 1792,
  50. 1024
  51. ],
  52. "metresPerPixel": 0.2626,
  53. "candidateComponents": 1442,
  54. "accepted": 21,
  55. "rejected": 1421,
  56. "rejections": {
  57. "areaBelowMin": 1378,
  58. "areaAboveMax": 0,
  59. "fillRatioBelowMin": 34,
  60. "longSideAboveMax": 0,
  61. "shortSideBelowMin": 4,
  62. "ringDominatedByVegetation": 1,
  63. "outsideMask": 4,
  64. "outsidePrimaryArea": 0,
  65. "intersectsRoad": 0,
  66. "intersectsWater": 0,
  67. "intersectsOsmBuilding": 0,
  68. "overlapsRegularEstateRoof": 0
  69. }
  70. },
  71. {
  72. "maskId": 65,
  73. "maskAreaSqm": 2595985,
  74. "tileRange": {
  75. "z": 19,
  76. "x0": 422916,
  77. "x1": 422952,
  78. "googleY0": 218889,
  79. "googleY1": 218941
  80. },
  81. "tilesConsidered": 1961,
  82. "tilesRead": 1961,
  83. "tilesMissing": 0,
  84. "windowPx": [
  85. 9472,
  86. 13568
  87. ],
  88. "metresPerPixel": 0.2626,
  89. "candidateComponents": 59883,
  90. "accepted": 1763,
  91. "rejected": 58120,
  92. "rejections": {
  93. "areaBelowMin": 55920,
  94. "areaAboveMax": 26,
  95. "fillRatioBelowMin": 1938,
  96. "longSideAboveMax": 9,
  97. "shortSideBelowMin": 78,
  98. "ringDominatedByVegetation": 18,
  99. "outsideMask": 88,
  100. "outsidePrimaryArea": 0,
  101. "intersectsRoad": 25,
  102. "intersectsWater": 0,
  103. "intersectsOsmBuilding": 18,
  104. "overlapsRegularEstateRoof": 0
  105. }
  106. },
  107. {
  108. "maskId": 66,
  109. "maskAreaSqm": 4293111,
  110. "tileRange": {
  111. "z": 19,
  112. "x0": 422893,
  113. "x1": 422938,
  114. "googleY0": 218858,
  115. "googleY1": 218894
  116. },
  117. "tilesConsidered": 1702,
  118. "tilesRead": 1702,
  119. "tilesMissing": 0,
  120. "windowPx": [
  121. 11776,
  122. 9472
  123. ],
  124. "metresPerPixel": 0.2625,
  125. "candidateComponents": 114053,
  126. "accepted": 3779,
  127. "rejected": 110274,
  128. "rejections": {
  129. "areaBelowMin": 105208,
  130. "areaAboveMax": 18,
  131. "fillRatioBelowMin": 4170,
  132. "longSideAboveMax": 11,
  133. "shortSideBelowMin": 158,
  134. "ringDominatedByVegetation": 27,
  135. "outsideMask": 83,
  136. "outsidePrimaryArea": 0,
  137. "intersectsRoad": 328,
  138. "intersectsWater": 0,
  139. "intersectsOsmBuilding": 271,
  140. "overlapsRegularEstateRoof": 0
  141. }
  142. },
  143. {
  144. "maskId": 126,
  145. "maskAreaSqm": 60802,
  146. "tileRange": {
  147. "z": 19,
  148. "x0": 422884,
  149. "x1": 422889,
  150. "googleY0": 218888,
  151. "googleY1": 218896
  152. },
  153. "tilesConsidered": 54,
  154. "tilesRead": 54,
  155. "tilesMissing": 0,
  156. "windowPx": [
  157. 1536,
  158. 2304
  159. ],
  160. "metresPerPixel": 0.2625,
  161. "candidateComponents": 1810,
  162. "accepted": 33,
  163. "rejected": 1777,
  164. "rejections": {
  165. "areaBelowMin": 1710,
  166. "areaAboveMax": 0,
  167. "fillRatioBelowMin": 47,
  168. "longSideAboveMax": 1,
  169. "shortSideBelowMin": 1,
  170. "ringDominatedByVegetation": 0,
  171. "outsideMask": 18,
  172. "outsidePrimaryArea": 0,
  173. "intersectsRoad": 0,
  174. "intersectsWater": 0,
  175. "intersectsOsmBuilding": 0,
  176. "overlapsRegularEstateRoof": 0
  177. }
  178. },
  179. {
  180. "maskId": 130,
  181. "maskAreaSqm": 1018440,
  182. "tileRange": {
  183. "z": 19,
  184. "x0": 422952,
  185. "x1": 422981,
  186. "googleY0": 218947,
  187. "googleY1": 218984
  188. },
  189. "tilesConsidered": 1140,
  190. "tilesRead": 1140,
  191. "tilesMissing": 0,
  192. "windowPx": [
  193. 7680,
  194. 9728
  195. ],
  196. "metresPerPixel": 0.2626,
  197. "candidateComponents": 26599,
  198. "accepted": 404,
  199. "rejected": 26195,
  200. "rejections": {
  201. "areaBelowMin": 25374,
  202. "areaAboveMax": 13,
  203. "fillRatioBelowMin": 718,
  204. "longSideAboveMax": 6,
  205. "shortSideBelowMin": 28,
  206. "ringDominatedByVegetation": 9,
  207. "outsideMask": 47,
  208. "outsidePrimaryArea": 0,
  209. "intersectsRoad": 0,
  210. "intersectsWater": 0,
  211. "intersectsOsmBuilding": 0,
  212. "overlapsRegularEstateRoof": 0
  213. }
  214. }
  215. ],
  216. "totals": {
  217. "accepted": 6000,
  218. "candidateComponents": 203787,
  219. "rejected": 197787
  220. },
  221. "rejectionReasons": {
  222. "areaBelowMin": 189590,
  223. "fillRatioBelowMin": 6907,
  224. "intersectsRoad": 353,
  225. "intersectsOsmBuilding": 289,
  226. "shortSideBelowMin": 269,
  227. "outsideMask": 240,
  228. "areaAboveMax": 57,
  229. "ringDominatedByVegetation": 55,
  230. "longSideAboveMax": 27,
  231. "outsidePrimaryArea": 0,
  232. "intersectsWater": 0,
  233. "overlapsRegularEstateRoof": 0
  234. },
  235. "exclusionAssertions": {
  236. "checked": 6000,
  237. "violations": 0,
  238. "tests": [
  239. "fullyInsideResidentialMask",
  240. "fullyInsidePrimaryArea",
  241. "noRoadIntersection",
  242. "noWaterIntersection",
  243. "noOsmBuildingIntersection",
  244. "noRegularEstateRoofOverlap"
  245. ]
  246. },
  247. "auditImage": {
  248. "path": "tools/city-massing/city/imagery-footprints-audit.png",
  249. "layout": "per-mask z18 crops stacked vertically; accepted footprints 2 px bright yellow, rejected components 1 px red; panels top to bottom: mask 63, mask 65, mask 66, mask 126, mask 130",
  250. "size": [
  251. 2400,
  252. 8748
  253. ]
  254. },
  255. "limitations": [
  256. "This is imagery segmentation, not survey geometry. Boundaries follow visible roof pixels at about 0.26 m/px.",
  257. "Two touching buildings with no shadow or brightness edge between them merge into a single footprint.",
  258. "Very dark roofs on dark ground are missed or merged with the ground, because brightness cannot separate them.",
  259. "Dark blue roofs can be classified as water, because they are dark, blue-dominant and smooth.",
  260. "The emitted polygon is a minimum-area rotated rectangle: it does not follow L-shapes, courtyards or roof ridges.",
  261. "Bare bright ground (construction spoil, concrete yards) can be classified as light roof; the fill, side and ring filters remove most but not all of it.",
  262. "Positional uncertainty is on the order of one to two pixels, roughly 0.3-0.6 m.",
  263. "No height, storey count or roof material is derived; only the footprint outline."
  264. ]
  265. }