Skip to content

mcsc-impact-climate/geo-converter

Repository files navigation

Geo Converter

Convert various geo formats (tiff, netcdf into csv)

Dependencies

Installing this package is as easy as:

Ubuntu:

sudo apt-get install libgdal-dev

Mac:

brew install gdal

Installation

Install python dependencies

pip install .

Usage

geo-converter -i /path/to/input/dem.tif -o /path/to/output/output.csv

-i is mandatory, -o is optional and if ommited will take the name of the input file and default to parquet

Example from a python script

factory = GeoConverterFactory(args.input, args.output)
converter = factory.get_converter()
converter.convert()

Create new converter

Create a new converter class extending BaseConverter and register it:

factory = GeoConverterFactory(args.input, args.output)
factory.register_converter(file_type, converter_class)

Project Road Map

Core Features

  • Convert tiff files to csv
  • Convert netcdf files to csv

Troubleshhoot

If there are issues while installing gdal run and make sure you have the same gdal version in setup.py

gdal-config --version

NetCDF datetime decoding error

xr.open_dataset(self.input_file, decode_times=False)

About

Convert netcdf, tiff to parquet or csv

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages