Skip to content

CIAT-DAPA/aclimate_v3_spatial_importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📘 aclimate_v3_spatial_importer

🏷️ Version and tags

  • Current version: v3.0.1
  • Relevant tags: raster, spatial data, geoserver

📌 Introduction

Package developed to facilitate the upload of spatial data to the Geoserver platform in ImageMosaic format.


⚙️ Prerequisites

List of necessary tools to run the project:

  • Python 3.10
  • Geoserver
  • gsconfig-py3 package installed

⚙️ Installation of gsconfig-py3

In you enviroment install as follows:

git clone https://github.com/dimitri-justeau/gsconfig-py3.git 
cd gsconfig-py3/
python setup.py install 

⚙️ Installation of aclimate_v3_spatial_importer

pip install git+https://github.com/CIAT-DAPA/aclimate_v3_spatial_importer

To install a specific version:

pip install git+https://github.com/CIAT-DAPA/aclimate_v3_spatial_importer@v3.0.1

🔐 Environment Variable Configuration

Set environmental variables as follows:

  • Windows:
set GEOSERVER_URL=http://your_geoserver/geoserver/rest/
set GEOSERVER_USER=your_user
set GEOSERVER_PASSWORD=your_password
  • Linux:
export GEOSERVER_URL=http://your_geoserver/geoserver/rest/
export GEOSERVER_USER=your_user
export GEOSERVER_PASSWORD=your_password

🚀 Basic Usage

  1. Upload raster files or delete store
from aclimate_v3_spatial_importer import upload_image_mosaic

# Define required parameters
workspace = "test"
store = "test_store"
date_format = "yyyyMM"
data_dir = "./data/"
    
# Function to upload the image mosaic
upload_image_mosaic(workspace, store, data_dir, date_format)

#Functions to delete a store
delete_store(workspace, store)

Note

You must change the paths to where your files are located.
Required variables:


🗂️ Project Structure

aclimate_v3_spatial_importer/
│
├── .github/
│   └── workflows/ # CI/CD pipeline configurations
├── src/
│   └── aclimate_v3_spatial_importer/
│       ├── conf/           # Date format for layers
│       ├── __init__.py     # Public interface
│       ├── importer.py     # Import to Geoserver function
│       └── tools.py        # gsconfig-py package functions
├── setup.py
└── requirements.txt        # Package dependencies

About

Repositorio del paquete aclimate_v3_spatial_importer para importar mosaicos de rasters en GeoServer

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages