We'll install MSOffice using the PlayOnLinux wizard. Additionally, MSOffice requires samba and winbind to properly work.
So, if not installed, install them:
sudo apt-get install playonlinux samba winbind
| import numpy as np | |
| from osgeo import gdal, gdal_array, osr | |
| def npmatrix_to_geotiff (filepath, matrices, gdal_type, transform = None, projection = None, nodata = None): | |
| (y_res, x_res) = matrices[0].shape | |
| driver = gdal.GetDriverByName('GTiff') | |
| image = driver.Create(filepath, x_res, y_res, len(matrices), gdal_type) | |
| if transform is not None: | |
| image.SetGeoTransform(transform) | |
| if projection is not None: |
| # export mysql database into shapefile | |
| ogr2ogr out_shapes MYSQL:gis,user=root,password=password | |
| # import shapefile into mysql | |
| ogr2ogr -f MySQL MySQL:database_name,user=root,password=password my_shapefile.shp -nln table_name -a_srs EPSG:4326 -update -overwrite -lco engine=MYISAM | |
| # reproject spatial reference from WGS 84 UTM 48S to Geographic Lattitide/Longitude Coordinate System | |
| ogr2ogr -f "ESRI Shapefile" target_file.shp source_file.shp -s_srs EPSG:32748 -t_srs EPSG:4326 |