Tools for processing and analyzing MOJ XML data archives commonly used for Japanese cadastral information.
- Coordinate system statistics: Scans directories containing MOJ ZIP archives, including nested ZIPs, and counts the occurrences of "任意座標系" and "公共座標系" inside the XML files. The
-search-list.csvfile in the top-level archive is used to determine how many parcels each nested ZIP contributes.
- Rust and Cargo. Install Rust
The tool expects a directory containing one or more ZIP archives. Each main ZIP archive should contain:
- A CSV file named
...-search-list.csv(encoded in Shift-JIS). This file lists the nested ZIP files and is used to count parcels associated with each nested archive. - Nested ZIP archives (e.g.,
13101-0000-0000.zip) referenced in the search list CSV. - These nested ZIP archives contain the actual MOJ XML files (
.xml). The tool reads the<座標系>tag within these XML files to determine the coordinate system type.
Note: You can download the required MOJ ZIP archives using tools like amx-project/dl-tool.
cargo build --releaseThe executable is written to target/release/.
cargo testRun the coordinate statistics tool with the path to the directory containing your MOJ ZIP archives:
./target/release/mojxml-tools coordinate-stats --path <path_to_your_zip_directory>The tool will scan the directory, process each ZIP file in parallel (showing a progress bar), and output the total counts for each coordinate system type found.
Example Output:
Scanning directory for zip files: path/to/your/zip/directory
Found 15 zip files. Starting parallel processing...
[00:00:05] [########################################] 15/15 (00:00:00)
Finished processing all zip files.
--- Coordinate System Stats ---
任意座標系 count: 12345
公共座標系 count: 67890
------------------------------
Contributions are welcome! Please feel free to submit pull requests or open issues.
This project is licensed under the MIT License. See LICENSE.