This open-source application provides fast and efficient reverse geocoding using administrative division data published by the Geospatial Information Authority of Japan (GSI). This app operates on both iOS and Android platforms using Kotlin Multiplatform and Room.
- Integration with Kotlin Multiplatform and Room: Unified database handling for both iOS and Android.
- Optimized GSI Data: Conversion of GSI's administrative division data into a format suitable for smartphone operations, enabling fast reverse geocoding.
- Open Source: The application's source code is available for free use within the bounds of the license.
This project consists of multiple modules managed by Gradle. The roles of each module are as follows:
This module contains the database file to be embedded in the application when executed on a smartphone. Due to the large size of the DB file, it is provided via Play Asset Delivery for Android and On-Demand Resources for iOS.
A Java project that converts administrative division data downloaded from GSI into a format usable within the app, generating the DB file.
A Kotlin multiplatform library module that defines the schema and DAO for the Room Database referenced by both Android and iOS.
The application for iOS.
The application for Android.
Download the latest administrative division data from the National Land Numerical Information download site and extract it. As of July 2024, the latest file name for nationwide data is N03-20240101_GML.zip
.
Download the JCC/JCG number information provided by JARL from 7K2ABV's Heisei All Municipalities Communication Award.
Place the downloaded files in an appropriate location on your PC and create/edit the gsi_feature_preparation/src/main/resources/config.properties
file.
inputFilePath = /path/to/N03-20240101.geojson # Path to the geojson file included in the downloaded zip
awardFilePath = /path/to/ZSKTS-AWD.mcsv.txt # Path to the downloaded ZSKTS-AWD.mcsv file
outputDirectoryPath = /path/to/ReverseGeocoder/japan_administrative_divisions/src/main/assets # Output directory path. Absolute path to japan_administrative_divisions/src/main/assets
Open the same directory level where the cloned directory is located in Android Studio.
Build the project and run gsi_feature_preparation/src/main/java/com/covelline/gsi_feature_preparation/Main.kt. The data will be automatically converted and the DB file will be created.
Set the Build Variants of the app module to ossDebug and run the app.
Open iosApp/iosApp.xcodeproj in Xcode, set the Target to oss, and build and run the project.
This project is licensed under the MIT License. See the LICENSE file for details.