A web application that provides tools for working with GeoJSON files:
- GeoJSON Decimal Fixer: Fix decimal places in GeoJSON coordinates to meet EUDR requirements
- GeoJSON Validator: Validate GeoJSON structure and geometry
- 🌐 Web-based interface accessible from any browser
- 📁 Drag-and-drop file upload
- 📂 Process multiple files simultaneously
- 📁 Support for both individual files and directory uploads
- ⚙️ Configurable decimal places (1-10) and output prefix
- 💾 Immediate file download after processing
- 📱 Responsive design works on all devices
- 🚀 Fast processing with progress tracking
- ❌ Comprehensive error handling
- Comprehensive validation of GeoJSON files:
- JSON structure validation
- GeoJSON format validation
- Geometry validation
- Detailed validation results including:
- Feature count and types
- Invalid geometry issues
- Interactive map preview of valid geometries
- Visual feedback with color-coded results
- OpenStreetMap integration for geometry visualization
Access the live application at: [https://json-decimal-fixer.onrender.com]
- Python 3.9 or higher
- pip (Python package manager)
- Clone the repository:
git clone https://github.com/Mudassarahmed123/json-decimal-fixer.git
cd json-decimal-fixer
- Install dependencies:
pip install -r requirements.txt
- Run the application:
uvicorn main:app --reload
- Open your browser and navigate to:
http://localhost:8000
- Build the Docker image:
docker build -t geojson-fixer .
- Run the container:
docker run -p 8000:8000 geojson-fixer
- Upload files:
- Drag and drop files or click to select
- Select a directory for batch processing
- Configure settings:
- Set minimum decimal places (1-10)
- Set output file prefix (optional)
- Click "Process Files"
- Download processed files
- Select a GeoJSON file
- Click "Validate File"
- View validation results and map preview
POST /process
- Process GeoJSON files to fix decimal places
Parameters:
files
: List of GeoJSON files (multipart/form-data)min_decimals
: Minimum number of decimal places (default: 6)prefix
: Prefix for processed files (default: "fixed_")
Response:
{
"status": "success",
"message": "Successfully processed X files",
"processed_files": [
{
"original_name": "input.geojson",
"processed_name": "fixed_input.geojson",
"processed_data": {...}
}
]
}
geojson-decimal-fixer/
├── main.py # FastAPI backend
├── static/
│ └── index.html # Frontend interface
├── requirements.txt # Python dependencies
├── Dockerfile # Docker configuration
└── README.md # Documentation
- FastAPI
- Uvicorn
- Python Multipart
- Shapely
- OpenLayers (for map visualization)
The application handles various types of errors:
- Invalid JSON structure
- Invalid GeoJSON format
- Invalid geometries
- File processing errors
- Coordinate system issues
- Fork this repository
- Create a new Web Service on Render
- Connect your GitHub repository
- Configure:
- Environment: Docker
- Build Command:
docker build -t app .
- Start Command:
uvicorn main:app --host 0.0.0.0 --port $PORT
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue in the GitHub repository.
- Built with FastAPI
- Frontend styled with Tailwind CSS
- Deployed on Render
Mudassar Ahmad
⭐ Star this repository if you find it helpful!