polyfile-weave 0.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of polyfile-weave might be problematic. Click here for more details.

Files changed (585) hide show
  1. polyfile/__init__.py +15 -0
  2. polyfile/__main__.py +394 -0
  3. polyfile/arithmetic.py +27 -0
  4. polyfile/ast.py +114 -0
  5. polyfile/debugger.py +1039 -0
  6. polyfile/expressions.py +346 -0
  7. polyfile/fileutils.py +343 -0
  8. polyfile/html.py +135 -0
  9. polyfile/http/__init__.py +1 -0
  10. polyfile/http/defacto.py +37 -0
  11. polyfile/http/deprecated.py +51 -0
  12. polyfile/http/experimental.py +67 -0
  13. polyfile/http/http_11.py +548 -0
  14. polyfile/http/matcher.py +37 -0
  15. polyfile/http/structured_headers.py +48 -0
  16. polyfile/iterators.py +72 -0
  17. polyfile/jpeg.py +24 -0
  18. polyfile/kaitai/__init__.py +0 -0
  19. polyfile/kaitai/compiler.py +156 -0
  20. polyfile/kaitai/parser.py +312 -0
  21. polyfile/kaitai/parsers/__init__.py +0 -0
  22. polyfile/kaitai/parsers/aix_utmp.py +116 -0
  23. polyfile/kaitai/parsers/allegro_dat.py +367 -0
  24. polyfile/kaitai/parsers/andes_firmware.py +64 -0
  25. polyfile/kaitai/parsers/android_bootldr_asus.py +105 -0
  26. polyfile/kaitai/parsers/android_bootldr_huawei.py +181 -0
  27. polyfile/kaitai/parsers/android_bootldr_qcom.py +217 -0
  28. polyfile/kaitai/parsers/android_dto.py +138 -0
  29. polyfile/kaitai/parsers/android_img.py +319 -0
  30. polyfile/kaitai/parsers/android_nanoapp_header.py +83 -0
  31. polyfile/kaitai/parsers/android_opengl_shaders_cache.py +151 -0
  32. polyfile/kaitai/parsers/android_sparse.py +237 -0
  33. polyfile/kaitai/parsers/android_super.py +401 -0
  34. polyfile/kaitai/parsers/apm_partition_table.py +196 -0
  35. polyfile/kaitai/parsers/apple_single_double.py +180 -0
  36. polyfile/kaitai/parsers/asn1_der.py +235 -0
  37. polyfile/kaitai/parsers/au.py +138 -0
  38. polyfile/kaitai/parsers/avantes_roh60.py +112 -0
  39. polyfile/kaitai/parsers/avi.py +296 -0
  40. polyfile/kaitai/parsers/bcd.py +111 -0
  41. polyfile/kaitai/parsers/bitcoin_transaction.py +210 -0
  42. polyfile/kaitai/parsers/blender_blend.py +334 -0
  43. polyfile/kaitai/parsers/bmp.py +780 -0
  44. polyfile/kaitai/parsers/bson.py +411 -0
  45. polyfile/kaitai/parsers/btrfs_stream.py +318 -0
  46. polyfile/kaitai/parsers/bytes_with_io.py +27 -0
  47. polyfile/kaitai/parsers/chrome_pak.py +194 -0
  48. polyfile/kaitai/parsers/code_6502.py +456 -0
  49. polyfile/kaitai/parsers/compressed_resource.py +217 -0
  50. polyfile/kaitai/parsers/cpio_old_le.py +154 -0
  51. polyfile/kaitai/parsers/cramfs.py +344 -0
  52. polyfile/kaitai/parsers/creative_voice_file.py +342 -0
  53. polyfile/kaitai/parsers/dbf.py +274 -0
  54. polyfile/kaitai/parsers/dcmp_0.py +664 -0
  55. polyfile/kaitai/parsers/dcmp_1.py +422 -0
  56. polyfile/kaitai/parsers/dcmp_2.py +312 -0
  57. polyfile/kaitai/parsers/dcmp_variable_length_integer.py +66 -0
  58. polyfile/kaitai/parsers/dex.py +1086 -0
  59. polyfile/kaitai/parsers/dicom.py +4370 -0
  60. polyfile/kaitai/parsers/dime_message.py +201 -0
  61. polyfile/kaitai/parsers/dns_packet.py +569 -0
  62. polyfile/kaitai/parsers/doom_wad.py +654 -0
  63. polyfile/kaitai/parsers/dos_datetime.py +191 -0
  64. polyfile/kaitai/parsers/dos_mz.py +172 -0
  65. polyfile/kaitai/parsers/ds_store.py +513 -0
  66. polyfile/kaitai/parsers/dtb.py +310 -0
  67. polyfile/kaitai/parsers/dune_2_pak.py +126 -0
  68. polyfile/kaitai/parsers/edid.py +472 -0
  69. polyfile/kaitai/parsers/efivar_signature_list.py +331 -0
  70. polyfile/kaitai/parsers/elf.py +2482 -0
  71. polyfile/kaitai/parsers/ethernet_frame.py +114 -0
  72. polyfile/kaitai/parsers/exif.py +723 -0
  73. polyfile/kaitai/parsers/ext2.py +537 -0
  74. polyfile/kaitai/parsers/fallout2_dat.py +187 -0
  75. polyfile/kaitai/parsers/fallout_dat.py +156 -0
  76. polyfile/kaitai/parsers/fasttracker_xm_module.py +558 -0
  77. polyfile/kaitai/parsers/ftl_dat.py +90 -0
  78. polyfile/kaitai/parsers/genmidi_op2.py +161 -0
  79. polyfile/kaitai/parsers/gettext_mo.py +541 -0
  80. polyfile/kaitai/parsers/gif.py +492 -0
  81. polyfile/kaitai/parsers/gimp_brush.py +244 -0
  82. polyfile/kaitai/parsers/glibc_utmp.py +114 -0
  83. polyfile/kaitai/parsers/gltf_binary.py +132 -0
  84. polyfile/kaitai/parsers/google_protobuf.py +151 -0
  85. polyfile/kaitai/parsers/gpt_partition_table.py +175 -0
  86. polyfile/kaitai/parsers/gran_turismo_vol.py +140 -0
  87. polyfile/kaitai/parsers/grub2_font.py +337 -0
  88. polyfile/kaitai/parsers/gzip.py +232 -0
  89. polyfile/kaitai/parsers/hashcat_restore.py +60 -0
  90. polyfile/kaitai/parsers/hccap.py +111 -0
  91. polyfile/kaitai/parsers/hccapx.py +103 -0
  92. polyfile/kaitai/parsers/heaps_pak.py +177 -0
  93. polyfile/kaitai/parsers/heroes_of_might_and_magic_agg.py +116 -0
  94. polyfile/kaitai/parsers/heroes_of_might_and_magic_bmp.py +34 -0
  95. polyfile/kaitai/parsers/icmp_packet.py +136 -0
  96. polyfile/kaitai/parsers/ico.py +129 -0
  97. polyfile/kaitai/parsers/id3v1_1.py +220 -0
  98. polyfile/kaitai/parsers/id3v2_3.py +324 -0
  99. polyfile/kaitai/parsers/id3v2_4.py +423 -0
  100. polyfile/kaitai/parsers/ines.py +282 -0
  101. polyfile/kaitai/parsers/ipv4_packet.py +158 -0
  102. polyfile/kaitai/parsers/ipv6_packet.py +55 -0
  103. polyfile/kaitai/parsers/iso9660.py +544 -0
  104. polyfile/kaitai/parsers/java_class.py +1113 -0
  105. polyfile/kaitai/parsers/jpeg.py +361 -0
  106. polyfile/kaitai/parsers/luks.py +149 -0
  107. polyfile/kaitai/parsers/lzh.py +165 -0
  108. polyfile/kaitai/parsers/mac_os_resource_snd.py +493 -0
  109. polyfile/kaitai/parsers/mach_o.py +3033 -0
  110. polyfile/kaitai/parsers/mach_o_fat.py +92 -0
  111. polyfile/kaitai/parsers/magicavoxel_vox.py +391 -0
  112. polyfile/kaitai/parsers/manifest.json +1 -0
  113. polyfile/kaitai/parsers/mbr_partition_table.py +119 -0
  114. polyfile/kaitai/parsers/mcap.py +1015 -0
  115. polyfile/kaitai/parsers/microsoft_cfb.py +293 -0
  116. polyfile/kaitai/parsers/microsoft_network_monitor_v2.py +309 -0
  117. polyfile/kaitai/parsers/microsoft_pe.py +765 -0
  118. polyfile/kaitai/parsers/mifare_classic.py +706 -0
  119. polyfile/kaitai/parsers/minecraft_nbt.py +449 -0
  120. polyfile/kaitai/parsers/monomakh_sapr_chg.py +69 -0
  121. polyfile/kaitai/parsers/mozilla_mar.py +239 -0
  122. polyfile/kaitai/parsers/mp4.py +333 -0
  123. polyfile/kaitai/parsers/msgpack.py +467 -0
  124. polyfile/kaitai/parsers/nitf.py +1189 -0
  125. polyfile/kaitai/parsers/nt_mdt_pal.py +155 -0
  126. polyfile/kaitai/parsers/ogg.py +118 -0
  127. polyfile/kaitai/parsers/openpgp_message.py +993 -0
  128. polyfile/kaitai/parsers/packet_ppi.py +515 -0
  129. polyfile/kaitai/parsers/pcap.py +344 -0
  130. polyfile/kaitai/parsers/pcf_font.py +506 -0
  131. polyfile/kaitai/parsers/pcx.py +195 -0
  132. polyfile/kaitai/parsers/pcx_dcx.py +79 -0
  133. polyfile/kaitai/parsers/phar_without_stub.py +399 -0
  134. polyfile/kaitai/parsers/php_serialized_value.py +505 -0
  135. polyfile/kaitai/parsers/png.py +721 -0
  136. polyfile/kaitai/parsers/protocol_body.py +260 -0
  137. polyfile/kaitai/parsers/psx_tim.py +104 -0
  138. polyfile/kaitai/parsers/python_pickle.py +718 -0
  139. polyfile/kaitai/parsers/python_pyc_27.py +510 -0
  140. polyfile/kaitai/parsers/quake_mdl.py +441 -0
  141. polyfile/kaitai/parsers/quake_pak.py +112 -0
  142. polyfile/kaitai/parsers/quicktime_mov.py +634 -0
  143. polyfile/kaitai/parsers/rar.py +265 -0
  144. polyfile/kaitai/parsers/regf.py +569 -0
  145. polyfile/kaitai/parsers/renderware_binary_stream.py +877 -0
  146. polyfile/kaitai/parsers/resource_fork.py +611 -0
  147. polyfile/kaitai/parsers/respack.py +57 -0
  148. polyfile/kaitai/parsers/riff.py +409 -0
  149. polyfile/kaitai/parsers/rpm.py +964 -0
  150. polyfile/kaitai/parsers/rtcp_payload.py +579 -0
  151. polyfile/kaitai/parsers/rtp_packet.py +150 -0
  152. polyfile/kaitai/parsers/rtpdump.py +115 -0
  153. polyfile/kaitai/parsers/ruby_marshal.py +423 -0
  154. polyfile/kaitai/parsers/s3m.py +493 -0
  155. polyfile/kaitai/parsers/saints_row_2_vpp_pc.py +254 -0
  156. polyfile/kaitai/parsers/shapefile_index.py +174 -0
  157. polyfile/kaitai/parsers/shapefile_main.py +893 -0
  158. polyfile/kaitai/parsers/some_ip.py +209 -0
  159. polyfile/kaitai/parsers/some_ip_container.py +37 -0
  160. polyfile/kaitai/parsers/some_ip_sd.py +86 -0
  161. polyfile/kaitai/parsers/some_ip_sd_entries.py +160 -0
  162. polyfile/kaitai/parsers/some_ip_sd_options.py +374 -0
  163. polyfile/kaitai/parsers/specpr.py +404 -0
  164. polyfile/kaitai/parsers/sqlite3.py +472 -0
  165. polyfile/kaitai/parsers/ssh_public_key.py +252 -0
  166. polyfile/kaitai/parsers/standard_midi_file.py +390 -0
  167. polyfile/kaitai/parsers/stl.py +111 -0
  168. polyfile/kaitai/parsers/sudoers_ts.py +201 -0
  169. polyfile/kaitai/parsers/swf.py +406 -0
  170. polyfile/kaitai/parsers/systemd_journal.py +361 -0
  171. polyfile/kaitai/parsers/tcp_segment.py +57 -0
  172. polyfile/kaitai/parsers/tga.py +213 -0
  173. polyfile/kaitai/parsers/tls_client_hello.py +293 -0
  174. polyfile/kaitai/parsers/tr_dos_image.py +322 -0
  175. polyfile/kaitai/parsers/tsm.py +198 -0
  176. polyfile/kaitai/parsers/ttf.py +1847 -0
  177. polyfile/kaitai/parsers/udp_datagram.py +42 -0
  178. polyfile/kaitai/parsers/uefi_te.py +236 -0
  179. polyfile/kaitai/parsers/uimage.py +198 -0
  180. polyfile/kaitai/parsers/utf8_string.py +137 -0
  181. polyfile/kaitai/parsers/vfat.py +410 -0
  182. polyfile/kaitai/parsers/vlq_base128_be.py +104 -0
  183. polyfile/kaitai/parsers/vlq_base128_le.py +129 -0
  184. polyfile/kaitai/parsers/vmware_vmdk.py +167 -0
  185. polyfile/kaitai/parsers/vp8_ivf.py +112 -0
  186. polyfile/kaitai/parsers/warcraft_2_pud.py +423 -0
  187. polyfile/kaitai/parsers/wav.py +1014 -0
  188. polyfile/kaitai/parsers/websocket.py +167 -0
  189. polyfile/kaitai/parsers/windows_evt_log.py +304 -0
  190. polyfile/kaitai/parsers/windows_lnk_file.py +467 -0
  191. polyfile/kaitai/parsers/windows_minidump.py +575 -0
  192. polyfile/kaitai/parsers/windows_resource_file.py +243 -0
  193. polyfile/kaitai/parsers/windows_shell_items.py +190 -0
  194. polyfile/kaitai/parsers/windows_systemtime.py +52 -0
  195. polyfile/kaitai/parsers/wmf.py +502 -0
  196. polyfile/kaitai/parsers/xar.py +181 -0
  197. polyfile/kaitai/parsers/xwd.py +189 -0
  198. polyfile/kaitai/parsers/zip.py +685 -0
  199. polyfile/kaitai/parsers/zisofs.py +158 -0
  200. polyfile/kaitai/parsers/zx_spectrum_tap.py +184 -0
  201. polyfile/kaitaimatcher.py +113 -0
  202. polyfile/languagematcher.py +217 -0
  203. polyfile/logger.py +135 -0
  204. polyfile/magic.py +2983 -0
  205. polyfile/magic_defs/COPYING +29 -0
  206. polyfile/magic_defs/__init__.py +0 -0
  207. polyfile/magic_defs/acorn +102 -0
  208. polyfile/magic_defs/adi +13 -0
  209. polyfile/magic_defs/adventure +122 -0
  210. polyfile/magic_defs/aes +29 -0
  211. polyfile/magic_defs/algol68 +35 -0
  212. polyfile/magic_defs/allegro +9 -0
  213. polyfile/magic_defs/alliant +18 -0
  214. polyfile/magic_defs/alpha +32 -0
  215. polyfile/magic_defs/amanda +12 -0
  216. polyfile/magic_defs/amigaos +218 -0
  217. polyfile/magic_defs/android +259 -0
  218. polyfile/magic_defs/animation +1197 -0
  219. polyfile/magic_defs/aout +46 -0
  220. polyfile/magic_defs/apache +28 -0
  221. polyfile/magic_defs/apl +7 -0
  222. polyfile/magic_defs/apple +773 -0
  223. polyfile/magic_defs/application +7 -0
  224. polyfile/magic_defs/applix +13 -0
  225. polyfile/magic_defs/apt +52 -0
  226. polyfile/magic_defs/archive +2586 -0
  227. polyfile/magic_defs/aria +38 -0
  228. polyfile/magic_defs/arm +50 -0
  229. polyfile/magic_defs/asf +132 -0
  230. polyfile/magic_defs/assembler +18 -0
  231. polyfile/magic_defs/asterix +18 -0
  232. polyfile/magic_defs/att3b +41 -0
  233. polyfile/magic_defs/audio +1291 -0
  234. polyfile/magic_defs/avm +33 -0
  235. polyfile/magic_defs/basis +18 -0
  236. polyfile/magic_defs/beetle +7 -0
  237. polyfile/magic_defs/ber +65 -0
  238. polyfile/magic_defs/bflt +14 -0
  239. polyfile/magic_defs/bhl +10 -0
  240. polyfile/magic_defs/bioinformatics +178 -0
  241. polyfile/magic_defs/biosig +154 -0
  242. polyfile/magic_defs/blackberry +8 -0
  243. polyfile/magic_defs/blcr +25 -0
  244. polyfile/magic_defs/blender +50 -0
  245. polyfile/magic_defs/blit +24 -0
  246. polyfile/magic_defs/bm +10 -0
  247. polyfile/magic_defs/bout +11 -0
  248. polyfile/magic_defs/bsdi +33 -0
  249. polyfile/magic_defs/bsi +10 -0
  250. polyfile/magic_defs/btsnoop +13 -0
  251. polyfile/magic_defs/burp +7 -0
  252. polyfile/magic_defs/bytecode +41 -0
  253. polyfile/magic_defs/c-lang +110 -0
  254. polyfile/magic_defs/c64 +531 -0
  255. polyfile/magic_defs/cad +437 -0
  256. polyfile/magic_defs/cafebabe +107 -0
  257. polyfile/magic_defs/cbor +21 -0
  258. polyfile/magic_defs/ccf +14 -0
  259. polyfile/magic_defs/cddb +12 -0
  260. polyfile/magic_defs/chord +15 -0
  261. polyfile/magic_defs/cisco +12 -0
  262. polyfile/magic_defs/citrus +12 -0
  263. polyfile/magic_defs/clarion +27 -0
  264. polyfile/magic_defs/claris +48 -0
  265. polyfile/magic_defs/clipper +65 -0
  266. polyfile/magic_defs/clojure +30 -0
  267. polyfile/magic_defs/coff +98 -0
  268. polyfile/magic_defs/commands +201 -0
  269. polyfile/magic_defs/communications +22 -0
  270. polyfile/magic_defs/compress +461 -0
  271. polyfile/magic_defs/console +1213 -0
  272. polyfile/magic_defs/convex +69 -0
  273. polyfile/magic_defs/coverage +91 -0
  274. polyfile/magic_defs/cracklib +14 -0
  275. polyfile/magic_defs/crypto +31 -0
  276. polyfile/magic_defs/csv +8 -0
  277. polyfile/magic_defs/ctags +6 -0
  278. polyfile/magic_defs/ctf +23 -0
  279. polyfile/magic_defs/cubemap +8 -0
  280. polyfile/magic_defs/cups +56 -0
  281. polyfile/magic_defs/dact +11 -0
  282. polyfile/magic_defs/database +886 -0
  283. polyfile/magic_defs/dataone +47 -0
  284. polyfile/magic_defs/dbpf +15 -0
  285. polyfile/magic_defs/der +146 -0
  286. polyfile/magic_defs/diamond +12 -0
  287. polyfile/magic_defs/dif +33 -0
  288. polyfile/magic_defs/diff +41 -0
  289. polyfile/magic_defs/digital +59 -0
  290. polyfile/magic_defs/dolby +69 -0
  291. polyfile/magic_defs/dsf +25 -0
  292. polyfile/magic_defs/dump +96 -0
  293. polyfile/magic_defs/dwarfs +45 -0
  294. polyfile/magic_defs/dyadic +61 -0
  295. polyfile/magic_defs/ebml +8 -0
  296. polyfile/magic_defs/edid +11 -0
  297. polyfile/magic_defs/editors +43 -0
  298. polyfile/magic_defs/efi +15 -0
  299. polyfile/magic_defs/elf +379 -0
  300. polyfile/magic_defs/encore +22 -0
  301. polyfile/magic_defs/epoc +62 -0
  302. polyfile/magic_defs/erlang +21 -0
  303. polyfile/magic_defs/espressif +57 -0
  304. polyfile/magic_defs/esri +28 -0
  305. polyfile/magic_defs/etf +33 -0
  306. polyfile/magic_defs/fcs +9 -0
  307. polyfile/magic_defs/filesystems +2694 -0
  308. polyfile/magic_defs/finger +16 -0
  309. polyfile/magic_defs/firmware +133 -0
  310. polyfile/magic_defs/flash +62 -0
  311. polyfile/magic_defs/flif +36 -0
  312. polyfile/magic_defs/fonts +449 -0
  313. polyfile/magic_defs/forth +82 -0
  314. polyfile/magic_defs/fortran +9 -0
  315. polyfile/magic_defs/frame +62 -0
  316. polyfile/magic_defs/freebsd +164 -0
  317. polyfile/magic_defs/fsav +128 -0
  318. polyfile/magic_defs/fusecompress +12 -0
  319. polyfile/magic_defs/games +696 -0
  320. polyfile/magic_defs/gcc +17 -0
  321. polyfile/magic_defs/gconv +10 -0
  322. polyfile/magic_defs/gentoo +85 -0
  323. polyfile/magic_defs/geo +166 -0
  324. polyfile/magic_defs/geos +20 -0
  325. polyfile/magic_defs/gimp +77 -0
  326. polyfile/magic_defs/git +13 -0
  327. polyfile/magic_defs/glibc +21 -0
  328. polyfile/magic_defs/gnome +59 -0
  329. polyfile/magic_defs/gnu +173 -0
  330. polyfile/magic_defs/gnumeric +8 -0
  331. polyfile/magic_defs/gpt +240 -0
  332. polyfile/magic_defs/gpu +28 -0
  333. polyfile/magic_defs/grace +21 -0
  334. polyfile/magic_defs/graphviz +12 -0
  335. polyfile/magic_defs/gringotts +48 -0
  336. polyfile/magic_defs/guile +13 -0
  337. polyfile/magic_defs/hardware +12 -0
  338. polyfile/magic_defs/hitachi-sh +30 -0
  339. polyfile/magic_defs/hp +433 -0
  340. polyfile/magic_defs/human68k +26 -0
  341. polyfile/magic_defs/ibm370 +52 -0
  342. polyfile/magic_defs/ibm6000 +35 -0
  343. polyfile/magic_defs/icc +214 -0
  344. polyfile/magic_defs/iff +80 -0
  345. polyfile/magic_defs/images +4210 -0
  346. polyfile/magic_defs/inform +9 -0
  347. polyfile/magic_defs/intel +310 -0
  348. polyfile/magic_defs/interleaf +9 -0
  349. polyfile/magic_defs/island +10 -0
  350. polyfile/magic_defs/ispell +63 -0
  351. polyfile/magic_defs/isz +15 -0
  352. polyfile/magic_defs/java +52 -0
  353. polyfile/magic_defs/javascript +171 -0
  354. polyfile/magic_defs/jpeg +252 -0
  355. polyfile/magic_defs/json +8 -0
  356. polyfile/magic_defs/karma +9 -0
  357. polyfile/magic_defs/kde +11 -0
  358. polyfile/magic_defs/keepass +20 -0
  359. polyfile/magic_defs/kerberos +45 -0
  360. polyfile/magic_defs/kicad +85 -0
  361. polyfile/magic_defs/kml +34 -0
  362. polyfile/magic_defs/lammps +64 -0
  363. polyfile/magic_defs/lecter +6 -0
  364. polyfile/magic_defs/lex +12 -0
  365. polyfile/magic_defs/lif +50 -0
  366. polyfile/magic_defs/linux +557 -0
  367. polyfile/magic_defs/lisp +78 -0
  368. polyfile/magic_defs/llvm +22 -0
  369. polyfile/magic_defs/locoscript +12 -0
  370. polyfile/magic_defs/lua +31 -0
  371. polyfile/magic_defs/luks +126 -0
  372. polyfile/magic_defs/m4 +11 -0
  373. polyfile/magic_defs/mach +303 -0
  374. polyfile/magic_defs/macintosh +505 -0
  375. polyfile/magic_defs/macos +7 -0
  376. polyfile/magic_defs/magic +10 -0
  377. polyfile/magic_defs/magic.mgc +0 -0
  378. polyfile/magic_defs/mail.news +132 -0
  379. polyfile/magic_defs/make +21 -0
  380. polyfile/magic_defs/map +413 -0
  381. polyfile/magic_defs/maple +109 -0
  382. polyfile/magic_defs/marc21 +30 -0
  383. polyfile/magic_defs/mathcad +8 -0
  384. polyfile/magic_defs/mathematica +188 -0
  385. polyfile/magic_defs/matroska +17 -0
  386. polyfile/magic_defs/mcrypt +52 -0
  387. polyfile/magic_defs/measure +44 -0
  388. polyfile/magic_defs/mercurial +13 -0
  389. polyfile/magic_defs/metastore +8 -0
  390. polyfile/magic_defs/meteorological +53 -0
  391. polyfile/magic_defs/microfocus +21 -0
  392. polyfile/magic_defs/mime +9 -0
  393. polyfile/magic_defs/mips +120 -0
  394. polyfile/magic_defs/mirage +8 -0
  395. polyfile/magic_defs/misctools +140 -0
  396. polyfile/magic_defs/mkid +11 -0
  397. polyfile/magic_defs/mlssa +8 -0
  398. polyfile/magic_defs/mmdf +6 -0
  399. polyfile/magic_defs/modem +92 -0
  400. polyfile/magic_defs/modulefile +9 -0
  401. polyfile/magic_defs/motorola +71 -0
  402. polyfile/magic_defs/mozilla +37 -0
  403. polyfile/magic_defs/msdos +2304 -0
  404. polyfile/magic_defs/msooxml +68 -0
  405. polyfile/magic_defs/msvc +222 -0
  406. polyfile/magic_defs/msx +309 -0
  407. polyfile/magic_defs/mup +24 -0
  408. polyfile/magic_defs/music +17 -0
  409. polyfile/magic_defs/nasa +7 -0
  410. polyfile/magic_defs/natinst +24 -0
  411. polyfile/magic_defs/ncr +49 -0
  412. polyfile/magic_defs/neko +12 -0
  413. polyfile/magic_defs/netbsd +251 -0
  414. polyfile/magic_defs/netscape +26 -0
  415. polyfile/magic_defs/netware +11 -0
  416. polyfile/magic_defs/news +13 -0
  417. polyfile/magic_defs/nifty +202 -0
  418. polyfile/magic_defs/nim-lang +29 -0
  419. polyfile/magic_defs/nitpicker +14 -0
  420. polyfile/magic_defs/numpy +9 -0
  421. polyfile/magic_defs/oasis +12 -0
  422. polyfile/magic_defs/ocaml +14 -0
  423. polyfile/magic_defs/octave +6 -0
  424. polyfile/magic_defs/ole2compounddocs +760 -0
  425. polyfile/magic_defs/olf +98 -0
  426. polyfile/magic_defs/openfst +17 -0
  427. polyfile/magic_defs/opentimestamps +16 -0
  428. polyfile/magic_defs/oric +16 -0
  429. polyfile/magic_defs/os2 +186 -0
  430. polyfile/magic_defs/os400 +39 -0
  431. polyfile/magic_defs/os9 +80 -0
  432. polyfile/magic_defs/osf1 +10 -0
  433. polyfile/magic_defs/palm +156 -0
  434. polyfile/magic_defs/parix +13 -0
  435. polyfile/magic_defs/parrot +22 -0
  436. polyfile/magic_defs/pascal +39 -0
  437. polyfile/magic_defs/pbf +11 -0
  438. polyfile/magic_defs/pbm +8 -0
  439. polyfile/magic_defs/pc88 +24 -0
  440. polyfile/magic_defs/pc98 +77 -0
  441. polyfile/magic_defs/pci_ids +116 -0
  442. polyfile/magic_defs/pcjr +8 -0
  443. polyfile/magic_defs/pdf +51 -0
  444. polyfile/magic_defs/pdp +42 -0
  445. polyfile/magic_defs/perl +100 -0
  446. polyfile/magic_defs/pgf +52 -0
  447. polyfile/magic_defs/pgp +581 -0
  448. polyfile/magic_defs/pgp-binary-keys +388 -0
  449. polyfile/magic_defs/pkgadd +7 -0
  450. polyfile/magic_defs/plan9 +25 -0
  451. polyfile/magic_defs/playdate +57 -0
  452. polyfile/magic_defs/plus5 +18 -0
  453. polyfile/magic_defs/pmem +46 -0
  454. polyfile/magic_defs/polyfile_zip +5 -0
  455. polyfile/magic_defs/polyml +23 -0
  456. polyfile/magic_defs/printer +269 -0
  457. polyfile/magic_defs/project +10 -0
  458. polyfile/magic_defs/psdbms +14 -0
  459. polyfile/magic_defs/psl +14 -0
  460. polyfile/magic_defs/pulsar +13 -0
  461. polyfile/magic_defs/puzzle +17 -0
  462. polyfile/magic_defs/pwsafe +14 -0
  463. polyfile/magic_defs/pyramid +12 -0
  464. polyfile/magic_defs/python +305 -0
  465. polyfile/magic_defs/qt +30 -0
  466. polyfile/magic_defs/revision +66 -0
  467. polyfile/magic_defs/riff +840 -0
  468. polyfile/magic_defs/rinex +44 -0
  469. polyfile/magic_defs/ringdove +45 -0
  470. polyfile/magic_defs/rpi +52 -0
  471. polyfile/magic_defs/rpm +45 -0
  472. polyfile/magic_defs/rpmsg +7 -0
  473. polyfile/magic_defs/rst +11 -0
  474. polyfile/magic_defs/rtf +94 -0
  475. polyfile/magic_defs/ruby +55 -0
  476. polyfile/magic_defs/rust +21 -0
  477. polyfile/magic_defs/sc +7 -0
  478. polyfile/magic_defs/sccs +24 -0
  479. polyfile/magic_defs/scientific +144 -0
  480. polyfile/magic_defs/securitycerts +6 -0
  481. polyfile/magic_defs/selinux +24 -0
  482. polyfile/magic_defs/sendmail +37 -0
  483. polyfile/magic_defs/sequent +42 -0
  484. polyfile/magic_defs/sereal +35 -0
  485. polyfile/magic_defs/sgi +144 -0
  486. polyfile/magic_defs/sgml +161 -0
  487. polyfile/magic_defs/sharc +23 -0
  488. polyfile/magic_defs/sinclair +40 -0
  489. polyfile/magic_defs/sisu +18 -0
  490. polyfile/magic_defs/sketch +6 -0
  491. polyfile/magic_defs/smalltalk +25 -0
  492. polyfile/magic_defs/smile +34 -0
  493. polyfile/magic_defs/sniffer +482 -0
  494. polyfile/magic_defs/softquad +40 -0
  495. polyfile/magic_defs/sosi +40 -0
  496. polyfile/magic_defs/spec +21 -0
  497. polyfile/magic_defs/spectrum +184 -0
  498. polyfile/magic_defs/sql +288 -0
  499. polyfile/magic_defs/ssh +39 -0
  500. polyfile/magic_defs/ssl +20 -0
  501. polyfile/magic_defs/statistics +45 -0
  502. polyfile/magic_defs/subtitle +38 -0
  503. polyfile/magic_defs/sun +141 -0
  504. polyfile/magic_defs/svf +5 -0
  505. polyfile/magic_defs/sylk +36 -0
  506. polyfile/magic_defs/symbos +42 -0
  507. polyfile/magic_defs/sysex +429 -0
  508. polyfile/magic_defs/tcl +29 -0
  509. polyfile/magic_defs/teapot +6 -0
  510. polyfile/magic_defs/terminfo +63 -0
  511. polyfile/magic_defs/tex +141 -0
  512. polyfile/magic_defs/tgif +7 -0
  513. polyfile/magic_defs/ti-8x +239 -0
  514. polyfile/magic_defs/timezone +42 -0
  515. polyfile/magic_defs/tplink +95 -0
  516. polyfile/magic_defs/troff +38 -0
  517. polyfile/magic_defs/tuxedo +8 -0
  518. polyfile/magic_defs/typeset +8 -0
  519. polyfile/magic_defs/uf2 +72 -0
  520. polyfile/magic_defs/unicode +15 -0
  521. polyfile/magic_defs/unisig +12 -0
  522. polyfile/magic_defs/unknown +34 -0
  523. polyfile/magic_defs/usd +21 -0
  524. polyfile/magic_defs/uterus +16 -0
  525. polyfile/magic_defs/uuencode +28 -0
  526. polyfile/magic_defs/vacuum-cleaner +54 -0
  527. polyfile/magic_defs/varied.out +46 -0
  528. polyfile/magic_defs/varied.script +21 -0
  529. polyfile/magic_defs/vax +32 -0
  530. polyfile/magic_defs/vicar +17 -0
  531. polyfile/magic_defs/virtual +307 -0
  532. polyfile/magic_defs/virtutech +12 -0
  533. polyfile/magic_defs/visx +32 -0
  534. polyfile/magic_defs/vms +30 -0
  535. polyfile/magic_defs/vmware +6 -0
  536. polyfile/magic_defs/vorbis +155 -0
  537. polyfile/magic_defs/vxl +14 -0
  538. polyfile/magic_defs/warc +16 -0
  539. polyfile/magic_defs/weak +16 -0
  540. polyfile/magic_defs/web +18 -0
  541. polyfile/magic_defs/webassembly +17 -0
  542. polyfile/magic_defs/windows +1811 -0
  543. polyfile/magic_defs/wireless +7 -0
  544. polyfile/magic_defs/wordprocessors +630 -0
  545. polyfile/magic_defs/wsdl +23 -0
  546. polyfile/magic_defs/x68000 +25 -0
  547. polyfile/magic_defs/xdelta +13 -0
  548. polyfile/magic_defs/xenix +106 -0
  549. polyfile/magic_defs/xilinx +58 -0
  550. polyfile/magic_defs/xo65 +37 -0
  551. polyfile/magic_defs/xwindows +43 -0
  552. polyfile/magic_defs/yara +17 -0
  553. polyfile/magic_defs/zfs +96 -0
  554. polyfile/magic_defs/zilog +12 -0
  555. polyfile/magic_defs/zip +126 -0
  556. polyfile/magic_defs/zyxel +17 -0
  557. polyfile/nes.py +144 -0
  558. polyfile/nitf.py +15 -0
  559. polyfile/pdf.py +1264 -0
  560. polyfile/pickles.py +45 -0
  561. polyfile/polyfile.py +409 -0
  562. polyfile/profiling.py +115 -0
  563. polyfile/repl.py +624 -0
  564. polyfile/search.py +310 -0
  565. polyfile/serialization.py +323 -0
  566. polyfile/structmatcher.py +46 -0
  567. polyfile/structs.py +281 -0
  568. polyfile/templates/download.js +162 -0
  569. polyfile/templates/hexdump.css +268 -0
  570. polyfile/templates/hexdump.js +756 -0
  571. polyfile/templates/jquery-3.4.1.min.js +2 -0
  572. polyfile/templates/template.html +119 -0
  573. polyfile/wildcards.py +62 -0
  574. polyfile/zipmatcher.py +183 -0
  575. polyfile_weave-0.5.5.dist-info/METADATA +173 -0
  576. polyfile_weave-0.5.5.dist-info/RECORD +585 -0
  577. polyfile_weave-0.5.5.dist-info/WHEEL +5 -0
  578. polyfile_weave-0.5.5.dist-info/entry_points.txt +2 -0
  579. polyfile_weave-0.5.5.dist-info/licenses/LICENSE +202 -0
  580. polyfile_weave-0.5.5.dist-info/top_level.txt +2 -0
  581. polymerge/__init__.py +1 -0
  582. polymerge/__main__.py +296 -0
  583. polymerge/cfg.py +127 -0
  584. polymerge/polymerge.py +227 -0
  585. polymerge/polytracker.py +190 -0
@@ -0,0 +1,893 @@
1
+ # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
2
+
3
+ from pkg_resources import parse_version
4
+ import kaitaistruct
5
+ from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO
6
+ from enum import Enum
7
+ import collections
8
+
9
+
10
+ if parse_version(kaitaistruct.__version__) < parse_version('0.9'):
11
+ raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, but you have %s" % (kaitaistruct.__version__))
12
+
13
+ class ShapefileMain(KaitaiStruct):
14
+
15
+ class ShapeType(Enum):
16
+ null_shape = 0
17
+ point = 1
18
+ poly_line = 3
19
+ polygon = 5
20
+ multi_point = 8
21
+ point_z = 11
22
+ poly_line_z = 13
23
+ polygon_z = 15
24
+ multi_point_z = 18
25
+ point_m = 21
26
+ poly_line_m = 23
27
+ polygon_m = 25
28
+ multi_point_m = 28
29
+ multi_patch = 31
30
+
31
+ class PartType(Enum):
32
+ triangle_strip = 0
33
+ triangle_fan = 1
34
+ outer_ring = 2
35
+ inner_ring = 3
36
+ first_ring = 4
37
+ ring = 5
38
+ SEQ_FIELDS = ["header", "records"]
39
+ def __init__(self, _io, _parent=None, _root=None):
40
+ self._io = _io
41
+ self._parent = _parent
42
+ self._root = _root if _root else self
43
+ self._debug = collections.defaultdict(dict)
44
+
45
+ def _read(self):
46
+ self._debug['header']['start'] = self._io.pos()
47
+ self.header = ShapefileMain.FileHeader(self._io, self, self._root)
48
+ self.header._read()
49
+ self._debug['header']['end'] = self._io.pos()
50
+ self._debug['records']['start'] = self._io.pos()
51
+ self.records = []
52
+ i = 0
53
+ while not self._io.is_eof():
54
+ if not 'arr' in self._debug['records']:
55
+ self._debug['records']['arr'] = []
56
+ self._debug['records']['arr'].append({'start': self._io.pos()})
57
+ _t_records = ShapefileMain.Record(self._io, self, self._root)
58
+ _t_records._read()
59
+ self.records.append(_t_records)
60
+ self._debug['records']['arr'][len(self.records) - 1]['end'] = self._io.pos()
61
+ i += 1
62
+
63
+ self._debug['records']['end'] = self._io.pos()
64
+
65
+ class MultiPointM(KaitaiStruct):
66
+ SEQ_FIELDS = ["bounding_box", "number_of_points", "points", "m_range", "m_values"]
67
+ def __init__(self, _io, _parent=None, _root=None):
68
+ self._io = _io
69
+ self._parent = _parent
70
+ self._root = _root if _root else self
71
+ self._debug = collections.defaultdict(dict)
72
+
73
+ def _read(self):
74
+ self._debug['bounding_box']['start'] = self._io.pos()
75
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
76
+ self.bounding_box._read()
77
+ self._debug['bounding_box']['end'] = self._io.pos()
78
+ self._debug['number_of_points']['start'] = self._io.pos()
79
+ self.number_of_points = self._io.read_s4le()
80
+ self._debug['number_of_points']['end'] = self._io.pos()
81
+ self._debug['points']['start'] = self._io.pos()
82
+ self.points = [None] * (self.number_of_points)
83
+ for i in range(self.number_of_points):
84
+ if not 'arr' in self._debug['points']:
85
+ self._debug['points']['arr'] = []
86
+ self._debug['points']['arr'].append({'start': self._io.pos()})
87
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
88
+ _t_points._read()
89
+ self.points[i] = _t_points
90
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
91
+
92
+ self._debug['points']['end'] = self._io.pos()
93
+ self._debug['m_range']['start'] = self._io.pos()
94
+ self.m_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
95
+ self.m_range._read()
96
+ self._debug['m_range']['end'] = self._io.pos()
97
+ self._debug['m_values']['start'] = self._io.pos()
98
+ self.m_values = [None] * (self.number_of_points)
99
+ for i in range(self.number_of_points):
100
+ if not 'arr' in self._debug['m_values']:
101
+ self._debug['m_values']['arr'] = []
102
+ self._debug['m_values']['arr'].append({'start': self._io.pos()})
103
+ self.m_values[i] = self._io.read_f8le()
104
+ self._debug['m_values']['arr'][i]['end'] = self._io.pos()
105
+
106
+ self._debug['m_values']['end'] = self._io.pos()
107
+
108
+
109
+ class BoundingBoxXYZM(KaitaiStruct):
110
+ SEQ_FIELDS = ["x", "y", "z", "m"]
111
+ def __init__(self, _io, _parent=None, _root=None):
112
+ self._io = _io
113
+ self._parent = _parent
114
+ self._root = _root if _root else self
115
+ self._debug = collections.defaultdict(dict)
116
+
117
+ def _read(self):
118
+ self._debug['x']['start'] = self._io.pos()
119
+ self.x = ShapefileMain.BoundsMinMax(self._io, self, self._root)
120
+ self.x._read()
121
+ self._debug['x']['end'] = self._io.pos()
122
+ self._debug['y']['start'] = self._io.pos()
123
+ self.y = ShapefileMain.BoundsMinMax(self._io, self, self._root)
124
+ self.y._read()
125
+ self._debug['y']['end'] = self._io.pos()
126
+ self._debug['z']['start'] = self._io.pos()
127
+ self.z = ShapefileMain.BoundsMinMax(self._io, self, self._root)
128
+ self.z._read()
129
+ self._debug['z']['end'] = self._io.pos()
130
+ self._debug['m']['start'] = self._io.pos()
131
+ self.m = ShapefileMain.BoundsMinMax(self._io, self, self._root)
132
+ self.m._read()
133
+ self._debug['m']['end'] = self._io.pos()
134
+
135
+
136
+ class Point(KaitaiStruct):
137
+ SEQ_FIELDS = ["x", "y"]
138
+ def __init__(self, _io, _parent=None, _root=None):
139
+ self._io = _io
140
+ self._parent = _parent
141
+ self._root = _root if _root else self
142
+ self._debug = collections.defaultdict(dict)
143
+
144
+ def _read(self):
145
+ self._debug['x']['start'] = self._io.pos()
146
+ self.x = self._io.read_f8le()
147
+ self._debug['x']['end'] = self._io.pos()
148
+ self._debug['y']['start'] = self._io.pos()
149
+ self.y = self._io.read_f8le()
150
+ self._debug['y']['end'] = self._io.pos()
151
+
152
+
153
+ class Polygon(KaitaiStruct):
154
+ SEQ_FIELDS = ["bounding_box", "number_of_parts", "number_of_points", "parts", "points"]
155
+ def __init__(self, _io, _parent=None, _root=None):
156
+ self._io = _io
157
+ self._parent = _parent
158
+ self._root = _root if _root else self
159
+ self._debug = collections.defaultdict(dict)
160
+
161
+ def _read(self):
162
+ self._debug['bounding_box']['start'] = self._io.pos()
163
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
164
+ self.bounding_box._read()
165
+ self._debug['bounding_box']['end'] = self._io.pos()
166
+ self._debug['number_of_parts']['start'] = self._io.pos()
167
+ self.number_of_parts = self._io.read_s4le()
168
+ self._debug['number_of_parts']['end'] = self._io.pos()
169
+ self._debug['number_of_points']['start'] = self._io.pos()
170
+ self.number_of_points = self._io.read_s4le()
171
+ self._debug['number_of_points']['end'] = self._io.pos()
172
+ self._debug['parts']['start'] = self._io.pos()
173
+ self.parts = [None] * (self.number_of_parts)
174
+ for i in range(self.number_of_parts):
175
+ if not 'arr' in self._debug['parts']:
176
+ self._debug['parts']['arr'] = []
177
+ self._debug['parts']['arr'].append({'start': self._io.pos()})
178
+ self.parts[i] = self._io.read_s4le()
179
+ self._debug['parts']['arr'][i]['end'] = self._io.pos()
180
+
181
+ self._debug['parts']['end'] = self._io.pos()
182
+ self._debug['points']['start'] = self._io.pos()
183
+ self.points = [None] * (self.number_of_points)
184
+ for i in range(self.number_of_points):
185
+ if not 'arr' in self._debug['points']:
186
+ self._debug['points']['arr'] = []
187
+ self._debug['points']['arr'].append({'start': self._io.pos()})
188
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
189
+ _t_points._read()
190
+ self.points[i] = _t_points
191
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
192
+
193
+ self._debug['points']['end'] = self._io.pos()
194
+
195
+
196
+ class BoundsMinMax(KaitaiStruct):
197
+ SEQ_FIELDS = ["min", "max"]
198
+ def __init__(self, _io, _parent=None, _root=None):
199
+ self._io = _io
200
+ self._parent = _parent
201
+ self._root = _root if _root else self
202
+ self._debug = collections.defaultdict(dict)
203
+
204
+ def _read(self):
205
+ self._debug['min']['start'] = self._io.pos()
206
+ self.min = self._io.read_f8le()
207
+ self._debug['min']['end'] = self._io.pos()
208
+ self._debug['max']['start'] = self._io.pos()
209
+ self.max = self._io.read_f8le()
210
+ self._debug['max']['end'] = self._io.pos()
211
+
212
+
213
+ class PolyLine(KaitaiStruct):
214
+ SEQ_FIELDS = ["bounding_box", "number_of_parts", "number_of_points", "parts", "points"]
215
+ def __init__(self, _io, _parent=None, _root=None):
216
+ self._io = _io
217
+ self._parent = _parent
218
+ self._root = _root if _root else self
219
+ self._debug = collections.defaultdict(dict)
220
+
221
+ def _read(self):
222
+ self._debug['bounding_box']['start'] = self._io.pos()
223
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
224
+ self.bounding_box._read()
225
+ self._debug['bounding_box']['end'] = self._io.pos()
226
+ self._debug['number_of_parts']['start'] = self._io.pos()
227
+ self.number_of_parts = self._io.read_s4le()
228
+ self._debug['number_of_parts']['end'] = self._io.pos()
229
+ self._debug['number_of_points']['start'] = self._io.pos()
230
+ self.number_of_points = self._io.read_s4le()
231
+ self._debug['number_of_points']['end'] = self._io.pos()
232
+ self._debug['parts']['start'] = self._io.pos()
233
+ self.parts = [None] * (self.number_of_parts)
234
+ for i in range(self.number_of_parts):
235
+ if not 'arr' in self._debug['parts']:
236
+ self._debug['parts']['arr'] = []
237
+ self._debug['parts']['arr'].append({'start': self._io.pos()})
238
+ self.parts[i] = self._io.read_s4le()
239
+ self._debug['parts']['arr'][i]['end'] = self._io.pos()
240
+
241
+ self._debug['parts']['end'] = self._io.pos()
242
+ self._debug['points']['start'] = self._io.pos()
243
+ self.points = [None] * (self.number_of_points)
244
+ for i in range(self.number_of_points):
245
+ if not 'arr' in self._debug['points']:
246
+ self._debug['points']['arr'] = []
247
+ self._debug['points']['arr'].append({'start': self._io.pos()})
248
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
249
+ _t_points._read()
250
+ self.points[i] = _t_points
251
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
252
+
253
+ self._debug['points']['end'] = self._io.pos()
254
+
255
+
256
+ class MultiPointZ(KaitaiStruct):
257
+ SEQ_FIELDS = ["bounding_box", "number_of_points", "points", "z_range", "z_values", "m_range", "m_values"]
258
+ def __init__(self, _io, _parent=None, _root=None):
259
+ self._io = _io
260
+ self._parent = _parent
261
+ self._root = _root if _root else self
262
+ self._debug = collections.defaultdict(dict)
263
+
264
+ def _read(self):
265
+ self._debug['bounding_box']['start'] = self._io.pos()
266
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
267
+ self.bounding_box._read()
268
+ self._debug['bounding_box']['end'] = self._io.pos()
269
+ self._debug['number_of_points']['start'] = self._io.pos()
270
+ self.number_of_points = self._io.read_s4le()
271
+ self._debug['number_of_points']['end'] = self._io.pos()
272
+ self._debug['points']['start'] = self._io.pos()
273
+ self.points = [None] * (self.number_of_points)
274
+ for i in range(self.number_of_points):
275
+ if not 'arr' in self._debug['points']:
276
+ self._debug['points']['arr'] = []
277
+ self._debug['points']['arr'].append({'start': self._io.pos()})
278
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
279
+ _t_points._read()
280
+ self.points[i] = _t_points
281
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
282
+
283
+ self._debug['points']['end'] = self._io.pos()
284
+ self._debug['z_range']['start'] = self._io.pos()
285
+ self.z_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
286
+ self.z_range._read()
287
+ self._debug['z_range']['end'] = self._io.pos()
288
+ self._debug['z_values']['start'] = self._io.pos()
289
+ self.z_values = [None] * (self.number_of_points)
290
+ for i in range(self.number_of_points):
291
+ if not 'arr' in self._debug['z_values']:
292
+ self._debug['z_values']['arr'] = []
293
+ self._debug['z_values']['arr'].append({'start': self._io.pos()})
294
+ self.z_values[i] = self._io.read_f8le()
295
+ self._debug['z_values']['arr'][i]['end'] = self._io.pos()
296
+
297
+ self._debug['z_values']['end'] = self._io.pos()
298
+ self._debug['m_range']['start'] = self._io.pos()
299
+ self.m_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
300
+ self.m_range._read()
301
+ self._debug['m_range']['end'] = self._io.pos()
302
+ self._debug['m_values']['start'] = self._io.pos()
303
+ self.m_values = [None] * (self.number_of_points)
304
+ for i in range(self.number_of_points):
305
+ if not 'arr' in self._debug['m_values']:
306
+ self._debug['m_values']['arr'] = []
307
+ self._debug['m_values']['arr'].append({'start': self._io.pos()})
308
+ self.m_values[i] = self._io.read_f8le()
309
+ self._debug['m_values']['arr'][i]['end'] = self._io.pos()
310
+
311
+ self._debug['m_values']['end'] = self._io.pos()
312
+
313
+
314
+ class PolyLineZ(KaitaiStruct):
315
+ SEQ_FIELDS = ["bounding_box", "number_of_parts", "number_of_points", "parts", "points", "z_range", "z_values", "m_range", "m_values"]
316
+ def __init__(self, _io, _parent=None, _root=None):
317
+ self._io = _io
318
+ self._parent = _parent
319
+ self._root = _root if _root else self
320
+ self._debug = collections.defaultdict(dict)
321
+
322
+ def _read(self):
323
+ self._debug['bounding_box']['start'] = self._io.pos()
324
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
325
+ self.bounding_box._read()
326
+ self._debug['bounding_box']['end'] = self._io.pos()
327
+ self._debug['number_of_parts']['start'] = self._io.pos()
328
+ self.number_of_parts = self._io.read_s4le()
329
+ self._debug['number_of_parts']['end'] = self._io.pos()
330
+ self._debug['number_of_points']['start'] = self._io.pos()
331
+ self.number_of_points = self._io.read_s4le()
332
+ self._debug['number_of_points']['end'] = self._io.pos()
333
+ self._debug['parts']['start'] = self._io.pos()
334
+ self.parts = [None] * (self.number_of_parts)
335
+ for i in range(self.number_of_parts):
336
+ if not 'arr' in self._debug['parts']:
337
+ self._debug['parts']['arr'] = []
338
+ self._debug['parts']['arr'].append({'start': self._io.pos()})
339
+ self.parts[i] = self._io.read_s4le()
340
+ self._debug['parts']['arr'][i]['end'] = self._io.pos()
341
+
342
+ self._debug['parts']['end'] = self._io.pos()
343
+ self._debug['points']['start'] = self._io.pos()
344
+ self.points = [None] * (self.number_of_points)
345
+ for i in range(self.number_of_points):
346
+ if not 'arr' in self._debug['points']:
347
+ self._debug['points']['arr'] = []
348
+ self._debug['points']['arr'].append({'start': self._io.pos()})
349
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
350
+ _t_points._read()
351
+ self.points[i] = _t_points
352
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
353
+
354
+ self._debug['points']['end'] = self._io.pos()
355
+ self._debug['z_range']['start'] = self._io.pos()
356
+ self.z_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
357
+ self.z_range._read()
358
+ self._debug['z_range']['end'] = self._io.pos()
359
+ self._debug['z_values']['start'] = self._io.pos()
360
+ self.z_values = [None] * (self.number_of_points)
361
+ for i in range(self.number_of_points):
362
+ if not 'arr' in self._debug['z_values']:
363
+ self._debug['z_values']['arr'] = []
364
+ self._debug['z_values']['arr'].append({'start': self._io.pos()})
365
+ self.z_values[i] = self._io.read_f8le()
366
+ self._debug['z_values']['arr'][i]['end'] = self._io.pos()
367
+
368
+ self._debug['z_values']['end'] = self._io.pos()
369
+ self._debug['m_range']['start'] = self._io.pos()
370
+ self.m_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
371
+ self.m_range._read()
372
+ self._debug['m_range']['end'] = self._io.pos()
373
+ self._debug['m_values']['start'] = self._io.pos()
374
+ self.m_values = [None] * (self.number_of_points)
375
+ for i in range(self.number_of_points):
376
+ if not 'arr' in self._debug['m_values']:
377
+ self._debug['m_values']['arr'] = []
378
+ self._debug['m_values']['arr'].append({'start': self._io.pos()})
379
+ self.m_values[i] = self._io.read_f8le()
380
+ self._debug['m_values']['arr'][i]['end'] = self._io.pos()
381
+
382
+ self._debug['m_values']['end'] = self._io.pos()
383
+
384
+
385
+ class PolygonZ(KaitaiStruct):
386
+ SEQ_FIELDS = ["bounding_box", "number_of_parts", "number_of_points", "parts", "points", "z_range", "z_values", "m_range", "m_values"]
387
+ def __init__(self, _io, _parent=None, _root=None):
388
+ self._io = _io
389
+ self._parent = _parent
390
+ self._root = _root if _root else self
391
+ self._debug = collections.defaultdict(dict)
392
+
393
+ def _read(self):
394
+ self._debug['bounding_box']['start'] = self._io.pos()
395
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
396
+ self.bounding_box._read()
397
+ self._debug['bounding_box']['end'] = self._io.pos()
398
+ self._debug['number_of_parts']['start'] = self._io.pos()
399
+ self.number_of_parts = self._io.read_s4le()
400
+ self._debug['number_of_parts']['end'] = self._io.pos()
401
+ self._debug['number_of_points']['start'] = self._io.pos()
402
+ self.number_of_points = self._io.read_s4le()
403
+ self._debug['number_of_points']['end'] = self._io.pos()
404
+ self._debug['parts']['start'] = self._io.pos()
405
+ self.parts = [None] * (self.number_of_parts)
406
+ for i in range(self.number_of_parts):
407
+ if not 'arr' in self._debug['parts']:
408
+ self._debug['parts']['arr'] = []
409
+ self._debug['parts']['arr'].append({'start': self._io.pos()})
410
+ self.parts[i] = self._io.read_s4le()
411
+ self._debug['parts']['arr'][i]['end'] = self._io.pos()
412
+
413
+ self._debug['parts']['end'] = self._io.pos()
414
+ self._debug['points']['start'] = self._io.pos()
415
+ self.points = [None] * (self.number_of_points)
416
+ for i in range(self.number_of_points):
417
+ if not 'arr' in self._debug['points']:
418
+ self._debug['points']['arr'] = []
419
+ self._debug['points']['arr'].append({'start': self._io.pos()})
420
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
421
+ _t_points._read()
422
+ self.points[i] = _t_points
423
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
424
+
425
+ self._debug['points']['end'] = self._io.pos()
426
+ self._debug['z_range']['start'] = self._io.pos()
427
+ self.z_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
428
+ self.z_range._read()
429
+ self._debug['z_range']['end'] = self._io.pos()
430
+ self._debug['z_values']['start'] = self._io.pos()
431
+ self.z_values = [None] * (self.number_of_points)
432
+ for i in range(self.number_of_points):
433
+ if not 'arr' in self._debug['z_values']:
434
+ self._debug['z_values']['arr'] = []
435
+ self._debug['z_values']['arr'].append({'start': self._io.pos()})
436
+ self.z_values[i] = self._io.read_f8le()
437
+ self._debug['z_values']['arr'][i]['end'] = self._io.pos()
438
+
439
+ self._debug['z_values']['end'] = self._io.pos()
440
+ self._debug['m_range']['start'] = self._io.pos()
441
+ self.m_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
442
+ self.m_range._read()
443
+ self._debug['m_range']['end'] = self._io.pos()
444
+ self._debug['m_values']['start'] = self._io.pos()
445
+ self.m_values = [None] * (self.number_of_points)
446
+ for i in range(self.number_of_points):
447
+ if not 'arr' in self._debug['m_values']:
448
+ self._debug['m_values']['arr'] = []
449
+ self._debug['m_values']['arr'].append({'start': self._io.pos()})
450
+ self.m_values[i] = self._io.read_f8le()
451
+ self._debug['m_values']['arr'][i]['end'] = self._io.pos()
452
+
453
+ self._debug['m_values']['end'] = self._io.pos()
454
+
455
+
456
+ class BoundingBoxXY(KaitaiStruct):
457
+ SEQ_FIELDS = ["x", "y"]
458
+ def __init__(self, _io, _parent=None, _root=None):
459
+ self._io = _io
460
+ self._parent = _parent
461
+ self._root = _root if _root else self
462
+ self._debug = collections.defaultdict(dict)
463
+
464
+ def _read(self):
465
+ self._debug['x']['start'] = self._io.pos()
466
+ self.x = ShapefileMain.BoundsMinMax(self._io, self, self._root)
467
+ self.x._read()
468
+ self._debug['x']['end'] = self._io.pos()
469
+ self._debug['y']['start'] = self._io.pos()
470
+ self.y = ShapefileMain.BoundsMinMax(self._io, self, self._root)
471
+ self.y._read()
472
+ self._debug['y']['end'] = self._io.pos()
473
+
474
+
475
+ class PointM(KaitaiStruct):
476
+ SEQ_FIELDS = ["x", "y", "m"]
477
+ def __init__(self, _io, _parent=None, _root=None):
478
+ self._io = _io
479
+ self._parent = _parent
480
+ self._root = _root if _root else self
481
+ self._debug = collections.defaultdict(dict)
482
+
483
+ def _read(self):
484
+ self._debug['x']['start'] = self._io.pos()
485
+ self.x = self._io.read_f8le()
486
+ self._debug['x']['end'] = self._io.pos()
487
+ self._debug['y']['start'] = self._io.pos()
488
+ self.y = self._io.read_f8le()
489
+ self._debug['y']['end'] = self._io.pos()
490
+ self._debug['m']['start'] = self._io.pos()
491
+ self.m = self._io.read_f8le()
492
+ self._debug['m']['end'] = self._io.pos()
493
+
494
+
495
+ class PolygonM(KaitaiStruct):
496
+ SEQ_FIELDS = ["bounding_box", "number_of_parts", "number_of_points", "parts", "points", "m_range", "m_values"]
497
+ def __init__(self, _io, _parent=None, _root=None):
498
+ self._io = _io
499
+ self._parent = _parent
500
+ self._root = _root if _root else self
501
+ self._debug = collections.defaultdict(dict)
502
+
503
+ def _read(self):
504
+ self._debug['bounding_box']['start'] = self._io.pos()
505
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
506
+ self.bounding_box._read()
507
+ self._debug['bounding_box']['end'] = self._io.pos()
508
+ self._debug['number_of_parts']['start'] = self._io.pos()
509
+ self.number_of_parts = self._io.read_s4le()
510
+ self._debug['number_of_parts']['end'] = self._io.pos()
511
+ self._debug['number_of_points']['start'] = self._io.pos()
512
+ self.number_of_points = self._io.read_s4le()
513
+ self._debug['number_of_points']['end'] = self._io.pos()
514
+ self._debug['parts']['start'] = self._io.pos()
515
+ self.parts = [None] * (self.number_of_parts)
516
+ for i in range(self.number_of_parts):
517
+ if not 'arr' in self._debug['parts']:
518
+ self._debug['parts']['arr'] = []
519
+ self._debug['parts']['arr'].append({'start': self._io.pos()})
520
+ self.parts[i] = self._io.read_s4le()
521
+ self._debug['parts']['arr'][i]['end'] = self._io.pos()
522
+
523
+ self._debug['parts']['end'] = self._io.pos()
524
+ self._debug['points']['start'] = self._io.pos()
525
+ self.points = [None] * (self.number_of_points)
526
+ for i in range(self.number_of_points):
527
+ if not 'arr' in self._debug['points']:
528
+ self._debug['points']['arr'] = []
529
+ self._debug['points']['arr'].append({'start': self._io.pos()})
530
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
531
+ _t_points._read()
532
+ self.points[i] = _t_points
533
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
534
+
535
+ self._debug['points']['end'] = self._io.pos()
536
+ self._debug['m_range']['start'] = self._io.pos()
537
+ self.m_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
538
+ self.m_range._read()
539
+ self._debug['m_range']['end'] = self._io.pos()
540
+ self._debug['m_values']['start'] = self._io.pos()
541
+ self.m_values = [None] * (self.number_of_points)
542
+ for i in range(self.number_of_points):
543
+ if not 'arr' in self._debug['m_values']:
544
+ self._debug['m_values']['arr'] = []
545
+ self._debug['m_values']['arr'].append({'start': self._io.pos()})
546
+ self.m_values[i] = self._io.read_f8le()
547
+ self._debug['m_values']['arr'][i]['end'] = self._io.pos()
548
+
549
+ self._debug['m_values']['end'] = self._io.pos()
550
+
551
+
552
+ class RecordHeader(KaitaiStruct):
553
+ SEQ_FIELDS = ["record_number", "content_length"]
554
+ def __init__(self, _io, _parent=None, _root=None):
555
+ self._io = _io
556
+ self._parent = _parent
557
+ self._root = _root if _root else self
558
+ self._debug = collections.defaultdict(dict)
559
+
560
+ def _read(self):
561
+ self._debug['record_number']['start'] = self._io.pos()
562
+ self.record_number = self._io.read_s4be()
563
+ self._debug['record_number']['end'] = self._io.pos()
564
+ self._debug['content_length']['start'] = self._io.pos()
565
+ self.content_length = self._io.read_s4be()
566
+ self._debug['content_length']['end'] = self._io.pos()
567
+
568
+
569
+ class MultiPoint(KaitaiStruct):
570
+ SEQ_FIELDS = ["bounding_box", "number_of_points", "points"]
571
+ def __init__(self, _io, _parent=None, _root=None):
572
+ self._io = _io
573
+ self._parent = _parent
574
+ self._root = _root if _root else self
575
+ self._debug = collections.defaultdict(dict)
576
+
577
+ def _read(self):
578
+ self._debug['bounding_box']['start'] = self._io.pos()
579
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
580
+ self.bounding_box._read()
581
+ self._debug['bounding_box']['end'] = self._io.pos()
582
+ self._debug['number_of_points']['start'] = self._io.pos()
583
+ self.number_of_points = self._io.read_s4le()
584
+ self._debug['number_of_points']['end'] = self._io.pos()
585
+ self._debug['points']['start'] = self._io.pos()
586
+ self.points = [None] * (self.number_of_points)
587
+ for i in range(self.number_of_points):
588
+ if not 'arr' in self._debug['points']:
589
+ self._debug['points']['arr'] = []
590
+ self._debug['points']['arr'].append({'start': self._io.pos()})
591
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
592
+ _t_points._read()
593
+ self.points[i] = _t_points
594
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
595
+
596
+ self._debug['points']['end'] = self._io.pos()
597
+
598
+
599
+ class FileHeader(KaitaiStruct):
600
+ SEQ_FIELDS = ["file_code", "unused_field_1", "unused_field_2", "unused_field_3", "unused_field_4", "unused_field_5", "file_length", "version", "shape_type", "bounding_box"]
601
+ def __init__(self, _io, _parent=None, _root=None):
602
+ self._io = _io
603
+ self._parent = _parent
604
+ self._root = _root if _root else self
605
+ self._debug = collections.defaultdict(dict)
606
+
607
+ def _read(self):
608
+ self._debug['file_code']['start'] = self._io.pos()
609
+ self.file_code = self._io.read_bytes(4)
610
+ self._debug['file_code']['end'] = self._io.pos()
611
+ if not self.file_code == b"\x00\x00\x27\x0A":
612
+ raise kaitaistruct.ValidationNotEqualError(b"\x00\x00\x27\x0A", self.file_code, self._io, u"/types/file_header/seq/0")
613
+ self._debug['unused_field_1']['start'] = self._io.pos()
614
+ self.unused_field_1 = self._io.read_bytes(4)
615
+ self._debug['unused_field_1']['end'] = self._io.pos()
616
+ if not self.unused_field_1 == b"\x00\x00\x00\x00":
617
+ raise kaitaistruct.ValidationNotEqualError(b"\x00\x00\x00\x00", self.unused_field_1, self._io, u"/types/file_header/seq/1")
618
+ self._debug['unused_field_2']['start'] = self._io.pos()
619
+ self.unused_field_2 = self._io.read_bytes(4)
620
+ self._debug['unused_field_2']['end'] = self._io.pos()
621
+ if not self.unused_field_2 == b"\x00\x00\x00\x00":
622
+ raise kaitaistruct.ValidationNotEqualError(b"\x00\x00\x00\x00", self.unused_field_2, self._io, u"/types/file_header/seq/2")
623
+ self._debug['unused_field_3']['start'] = self._io.pos()
624
+ self.unused_field_3 = self._io.read_bytes(4)
625
+ self._debug['unused_field_3']['end'] = self._io.pos()
626
+ if not self.unused_field_3 == b"\x00\x00\x00\x00":
627
+ raise kaitaistruct.ValidationNotEqualError(b"\x00\x00\x00\x00", self.unused_field_3, self._io, u"/types/file_header/seq/3")
628
+ self._debug['unused_field_4']['start'] = self._io.pos()
629
+ self.unused_field_4 = self._io.read_bytes(4)
630
+ self._debug['unused_field_4']['end'] = self._io.pos()
631
+ if not self.unused_field_4 == b"\x00\x00\x00\x00":
632
+ raise kaitaistruct.ValidationNotEqualError(b"\x00\x00\x00\x00", self.unused_field_4, self._io, u"/types/file_header/seq/4")
633
+ self._debug['unused_field_5']['start'] = self._io.pos()
634
+ self.unused_field_5 = self._io.read_bytes(4)
635
+ self._debug['unused_field_5']['end'] = self._io.pos()
636
+ if not self.unused_field_5 == b"\x00\x00\x00\x00":
637
+ raise kaitaistruct.ValidationNotEqualError(b"\x00\x00\x00\x00", self.unused_field_5, self._io, u"/types/file_header/seq/5")
638
+ self._debug['file_length']['start'] = self._io.pos()
639
+ self.file_length = self._io.read_s4be()
640
+ self._debug['file_length']['end'] = self._io.pos()
641
+ self._debug['version']['start'] = self._io.pos()
642
+ self.version = self._io.read_bytes(4)
643
+ self._debug['version']['end'] = self._io.pos()
644
+ if not self.version == b"\xE8\x03\x00\x00":
645
+ raise kaitaistruct.ValidationNotEqualError(b"\xE8\x03\x00\x00", self.version, self._io, u"/types/file_header/seq/7")
646
+ self._debug['shape_type']['start'] = self._io.pos()
647
+ self.shape_type = KaitaiStream.resolve_enum(ShapefileMain.ShapeType, self._io.read_s4le())
648
+ self._debug['shape_type']['end'] = self._io.pos()
649
+ self._debug['bounding_box']['start'] = self._io.pos()
650
+ self.bounding_box = ShapefileMain.BoundingBoxXYZM(self._io, self, self._root)
651
+ self.bounding_box._read()
652
+ self._debug['bounding_box']['end'] = self._io.pos()
653
+
654
+
655
+ class PointZ(KaitaiStruct):
656
+ SEQ_FIELDS = ["x", "y", "z", "m"]
657
+ def __init__(self, _io, _parent=None, _root=None):
658
+ self._io = _io
659
+ self._parent = _parent
660
+ self._root = _root if _root else self
661
+ self._debug = collections.defaultdict(dict)
662
+
663
+ def _read(self):
664
+ self._debug['x']['start'] = self._io.pos()
665
+ self.x = self._io.read_f8le()
666
+ self._debug['x']['end'] = self._io.pos()
667
+ self._debug['y']['start'] = self._io.pos()
668
+ self.y = self._io.read_f8le()
669
+ self._debug['y']['end'] = self._io.pos()
670
+ self._debug['z']['start'] = self._io.pos()
671
+ self.z = self._io.read_f8le()
672
+ self._debug['z']['end'] = self._io.pos()
673
+ self._debug['m']['start'] = self._io.pos()
674
+ self.m = self._io.read_f8le()
675
+ self._debug['m']['end'] = self._io.pos()
676
+
677
+
678
+ class Record(KaitaiStruct):
679
+ SEQ_FIELDS = ["header", "contents"]
680
+ def __init__(self, _io, _parent=None, _root=None):
681
+ self._io = _io
682
+ self._parent = _parent
683
+ self._root = _root if _root else self
684
+ self._debug = collections.defaultdict(dict)
685
+
686
+ def _read(self):
687
+ self._debug['header']['start'] = self._io.pos()
688
+ self.header = ShapefileMain.RecordHeader(self._io, self, self._root)
689
+ self.header._read()
690
+ self._debug['header']['end'] = self._io.pos()
691
+ self._debug['contents']['start'] = self._io.pos()
692
+ self.contents = ShapefileMain.RecordContents(self._io, self, self._root)
693
+ self.contents._read()
694
+ self._debug['contents']['end'] = self._io.pos()
695
+
696
+
697
+ class RecordContents(KaitaiStruct):
698
+ SEQ_FIELDS = ["shape_type", "shape_parameters"]
699
+ def __init__(self, _io, _parent=None, _root=None):
700
+ self._io = _io
701
+ self._parent = _parent
702
+ self._root = _root if _root else self
703
+ self._debug = collections.defaultdict(dict)
704
+
705
+ def _read(self):
706
+ self._debug['shape_type']['start'] = self._io.pos()
707
+ self.shape_type = KaitaiStream.resolve_enum(ShapefileMain.ShapeType, self._io.read_s4le())
708
+ self._debug['shape_type']['end'] = self._io.pos()
709
+ if self.shape_type != ShapefileMain.ShapeType.null_shape:
710
+ self._debug['shape_parameters']['start'] = self._io.pos()
711
+ _on = self.shape_type
712
+ if _on == ShapefileMain.ShapeType.poly_line_z:
713
+ self.shape_parameters = ShapefileMain.PolyLineZ(self._io, self, self._root)
714
+ self.shape_parameters._read()
715
+ elif _on == ShapefileMain.ShapeType.multi_patch:
716
+ self.shape_parameters = ShapefileMain.MultiPatch(self._io, self, self._root)
717
+ self.shape_parameters._read()
718
+ elif _on == ShapefileMain.ShapeType.poly_line_m:
719
+ self.shape_parameters = ShapefileMain.PolyLineM(self._io, self, self._root)
720
+ self.shape_parameters._read()
721
+ elif _on == ShapefileMain.ShapeType.polygon:
722
+ self.shape_parameters = ShapefileMain.Polygon(self._io, self, self._root)
723
+ self.shape_parameters._read()
724
+ elif _on == ShapefileMain.ShapeType.polygon_z:
725
+ self.shape_parameters = ShapefileMain.PolygonZ(self._io, self, self._root)
726
+ self.shape_parameters._read()
727
+ elif _on == ShapefileMain.ShapeType.point_z:
728
+ self.shape_parameters = ShapefileMain.PointZ(self._io, self, self._root)
729
+ self.shape_parameters._read()
730
+ elif _on == ShapefileMain.ShapeType.poly_line:
731
+ self.shape_parameters = ShapefileMain.PolyLine(self._io, self, self._root)
732
+ self.shape_parameters._read()
733
+ elif _on == ShapefileMain.ShapeType.point_m:
734
+ self.shape_parameters = ShapefileMain.PointM(self._io, self, self._root)
735
+ self.shape_parameters._read()
736
+ elif _on == ShapefileMain.ShapeType.polygon_m:
737
+ self.shape_parameters = ShapefileMain.PolygonM(self._io, self, self._root)
738
+ self.shape_parameters._read()
739
+ elif _on == ShapefileMain.ShapeType.multi_point:
740
+ self.shape_parameters = ShapefileMain.MultiPoint(self._io, self, self._root)
741
+ self.shape_parameters._read()
742
+ elif _on == ShapefileMain.ShapeType.point:
743
+ self.shape_parameters = ShapefileMain.Point(self._io, self, self._root)
744
+ self.shape_parameters._read()
745
+ elif _on == ShapefileMain.ShapeType.multi_point_m:
746
+ self.shape_parameters = ShapefileMain.MultiPointM(self._io, self, self._root)
747
+ self.shape_parameters._read()
748
+ elif _on == ShapefileMain.ShapeType.multi_point_z:
749
+ self.shape_parameters = ShapefileMain.MultiPointZ(self._io, self, self._root)
750
+ self.shape_parameters._read()
751
+ self._debug['shape_parameters']['end'] = self._io.pos()
752
+
753
+
754
+
755
+ class MultiPatch(KaitaiStruct):
756
+ SEQ_FIELDS = ["bounding_box", "number_of_parts", "number_of_points", "parts", "part_types", "points", "z_range", "z_values", "m_range", "m_values"]
757
+ def __init__(self, _io, _parent=None, _root=None):
758
+ self._io = _io
759
+ self._parent = _parent
760
+ self._root = _root if _root else self
761
+ self._debug = collections.defaultdict(dict)
762
+
763
+ def _read(self):
764
+ self._debug['bounding_box']['start'] = self._io.pos()
765
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
766
+ self.bounding_box._read()
767
+ self._debug['bounding_box']['end'] = self._io.pos()
768
+ self._debug['number_of_parts']['start'] = self._io.pos()
769
+ self.number_of_parts = self._io.read_s4le()
770
+ self._debug['number_of_parts']['end'] = self._io.pos()
771
+ self._debug['number_of_points']['start'] = self._io.pos()
772
+ self.number_of_points = self._io.read_s4le()
773
+ self._debug['number_of_points']['end'] = self._io.pos()
774
+ self._debug['parts']['start'] = self._io.pos()
775
+ self.parts = [None] * (self.number_of_parts)
776
+ for i in range(self.number_of_parts):
777
+ if not 'arr' in self._debug['parts']:
778
+ self._debug['parts']['arr'] = []
779
+ self._debug['parts']['arr'].append({'start': self._io.pos()})
780
+ self.parts[i] = self._io.read_s4le()
781
+ self._debug['parts']['arr'][i]['end'] = self._io.pos()
782
+
783
+ self._debug['parts']['end'] = self._io.pos()
784
+ self._debug['part_types']['start'] = self._io.pos()
785
+ self.part_types = [None] * (self.number_of_parts)
786
+ for i in range(self.number_of_parts):
787
+ if not 'arr' in self._debug['part_types']:
788
+ self._debug['part_types']['arr'] = []
789
+ self._debug['part_types']['arr'].append({'start': self._io.pos()})
790
+ self.part_types[i] = KaitaiStream.resolve_enum(ShapefileMain.PartType, self._io.read_s4le())
791
+ self._debug['part_types']['arr'][i]['end'] = self._io.pos()
792
+
793
+ self._debug['part_types']['end'] = self._io.pos()
794
+ self._debug['points']['start'] = self._io.pos()
795
+ self.points = [None] * (self.number_of_points)
796
+ for i in range(self.number_of_points):
797
+ if not 'arr' in self._debug['points']:
798
+ self._debug['points']['arr'] = []
799
+ self._debug['points']['arr'].append({'start': self._io.pos()})
800
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
801
+ _t_points._read()
802
+ self.points[i] = _t_points
803
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
804
+
805
+ self._debug['points']['end'] = self._io.pos()
806
+ self._debug['z_range']['start'] = self._io.pos()
807
+ self.z_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
808
+ self.z_range._read()
809
+ self._debug['z_range']['end'] = self._io.pos()
810
+ self._debug['z_values']['start'] = self._io.pos()
811
+ self.z_values = [None] * (self.number_of_points)
812
+ for i in range(self.number_of_points):
813
+ if not 'arr' in self._debug['z_values']:
814
+ self._debug['z_values']['arr'] = []
815
+ self._debug['z_values']['arr'].append({'start': self._io.pos()})
816
+ self.z_values[i] = self._io.read_f8le()
817
+ self._debug['z_values']['arr'][i]['end'] = self._io.pos()
818
+
819
+ self._debug['z_values']['end'] = self._io.pos()
820
+ self._debug['m_range']['start'] = self._io.pos()
821
+ self.m_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
822
+ self.m_range._read()
823
+ self._debug['m_range']['end'] = self._io.pos()
824
+ self._debug['m_values']['start'] = self._io.pos()
825
+ self.m_values = [None] * (self.number_of_points)
826
+ for i in range(self.number_of_points):
827
+ if not 'arr' in self._debug['m_values']:
828
+ self._debug['m_values']['arr'] = []
829
+ self._debug['m_values']['arr'].append({'start': self._io.pos()})
830
+ self.m_values[i] = self._io.read_f8le()
831
+ self._debug['m_values']['arr'][i]['end'] = self._io.pos()
832
+
833
+ self._debug['m_values']['end'] = self._io.pos()
834
+
835
+
836
+ class PolyLineM(KaitaiStruct):
837
+ SEQ_FIELDS = ["bounding_box", "number_of_parts", "number_of_points", "parts", "points", "m_range", "m_values"]
838
+ def __init__(self, _io, _parent=None, _root=None):
839
+ self._io = _io
840
+ self._parent = _parent
841
+ self._root = _root if _root else self
842
+ self._debug = collections.defaultdict(dict)
843
+
844
+ def _read(self):
845
+ self._debug['bounding_box']['start'] = self._io.pos()
846
+ self.bounding_box = ShapefileMain.BoundingBoxXY(self._io, self, self._root)
847
+ self.bounding_box._read()
848
+ self._debug['bounding_box']['end'] = self._io.pos()
849
+ self._debug['number_of_parts']['start'] = self._io.pos()
850
+ self.number_of_parts = self._io.read_s4le()
851
+ self._debug['number_of_parts']['end'] = self._io.pos()
852
+ self._debug['number_of_points']['start'] = self._io.pos()
853
+ self.number_of_points = self._io.read_s4le()
854
+ self._debug['number_of_points']['end'] = self._io.pos()
855
+ self._debug['parts']['start'] = self._io.pos()
856
+ self.parts = [None] * (self.number_of_parts)
857
+ for i in range(self.number_of_parts):
858
+ if not 'arr' in self._debug['parts']:
859
+ self._debug['parts']['arr'] = []
860
+ self._debug['parts']['arr'].append({'start': self._io.pos()})
861
+ self.parts[i] = self._io.read_s4le()
862
+ self._debug['parts']['arr'][i]['end'] = self._io.pos()
863
+
864
+ self._debug['parts']['end'] = self._io.pos()
865
+ self._debug['points']['start'] = self._io.pos()
866
+ self.points = [None] * (self.number_of_points)
867
+ for i in range(self.number_of_points):
868
+ if not 'arr' in self._debug['points']:
869
+ self._debug['points']['arr'] = []
870
+ self._debug['points']['arr'].append({'start': self._io.pos()})
871
+ _t_points = ShapefileMain.Point(self._io, self, self._root)
872
+ _t_points._read()
873
+ self.points[i] = _t_points
874
+ self._debug['points']['arr'][i]['end'] = self._io.pos()
875
+
876
+ self._debug['points']['end'] = self._io.pos()
877
+ self._debug['m_range']['start'] = self._io.pos()
878
+ self.m_range = ShapefileMain.BoundsMinMax(self._io, self, self._root)
879
+ self.m_range._read()
880
+ self._debug['m_range']['end'] = self._io.pos()
881
+ self._debug['m_values']['start'] = self._io.pos()
882
+ self.m_values = [None] * (self.number_of_points)
883
+ for i in range(self.number_of_points):
884
+ if not 'arr' in self._debug['m_values']:
885
+ self._debug['m_values']['arr'] = []
886
+ self._debug['m_values']['arr'].append({'start': self._io.pos()})
887
+ self.m_values[i] = self._io.read_f8le()
888
+ self._debug['m_values']['arr'][i]['end'] = self._io.pos()
889
+
890
+ self._debug['m_values']['end'] = self._io.pos()
891
+
892
+
893
+