Skip to content

wetransform-os/conversion-gdal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

conversion-gdal

Docker Hub Badge

Docker image for format conversion based on GDAL/OGR.

The image is meant to be used for one-off docker run commands running a specific conversion task. The script ./ogr-convert.sh in the working directory should be called when running a container. The default command prints the script usage.

Example calls

Build docker image after changes using command:

docker build -t wetransform/conversion-gdal:latest .

Convert remote file, result is stored in internal container volume:

docker run -it wetransform/conversion-gdal:latest ./ogr-convert.sh --source https://wetransform.box.com/shared/static/2fe8kbl6psu3ul2bth3uqymx2chlwkdc.gml --target-name hydroEx.shp -f "ESRI Shapefile"

Convert remote file, result is stored in mounted folder as current user:

docker run -it --user=$(id -u):$(id -g) -v $(pwd):/data wetransform/conversion-gdal:latest ./ogr-convert.sh --source https://wetransform.box.com/shared/static/2fe8kbl6psu3ul2bth3uqymx2chlwkdc.gml --target-dir /data --target-name hydroEx.json -f "GeoJson"

Similarly, files from mounted volumes can be converted as well, by providing a file path resolvable in the container instead of a remote (http/https) location.

Example to mount a volume and run docker image:

docker run -it -v <local_path_to_folder_to_be_mounted>:/data wetransform/conversion-gdal:latest ./ogr-convert.sh --source /data/<example.gml> --target-dir /data/target --target-name test.shp -f "ESRI Shapefile"

About

Docker image for format conversion based on GDAL/OGR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published