davidfrantz / force

Framework for Operational Radiometric Correction for Environmental monitoring
GNU General Public License v3.0
172 stars 50 forks source link

Projection problem when force-cubing Sentinel-1 images #251

Closed pleitebier closed 1 year ago

pleitebier commented 1 year ago

Hi, when trying to import Sentinel-1-Images (Int16, Nodata=-9999) with force-cube I run into an error:

ERROR 1: PROJ: proj_as_wkt: SQLite error on SELECT name, ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name, prime_meridian_code, area_of_use_auth_name, area_of_use_code, publication_date, deprecated FROM geodetic_datum WHERE auth_name = ? AND code = ?: no such column: publication_date ERROR 1: PROJ: proj_create_from_database: cannot build projectedCRS 32723: cannot build geodeticCRS 4326: SQLite error on SELECT name, ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name, prime_meridian_code, area_of_use_auth_name, area_of_use_code, publication_date, deprecated FROM geodetic_datum WHERE auth_name = ? AND code = ?: no such column: publication_date ERROR 1: PROJ: proj_create_operations: cannot build geodeticCRS 4326: SQLite error on SELECT name, ellipsoid_auth_name, ellipsoid_code, prime_meridian_auth_name, prime_meridian_code, area_of_use_auth_name, area_of_use_code, publication_date, deprecated FROM geodetic_datum WHERE auth_name = ? AND code = ?: no such column: publication_date ERROR 6: Cannot find coordinate operations from PROJCRS["WGS 84 / UTM zone 23S",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["Transverse Mercator",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",-45,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",10000000,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1]],ID["EPSG",32723]]' toGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],CS[ellipsoidal,2],AXIS["latitude",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["longitude",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]'

It might be that this problem arises from different versions of PROJ (https://www.mail-archive.com/postgis-users@lists.osgeo.org/msg09041.html). My gdal is GDAL 3.4.1, released 2021/12/27. Just pulled and tried with the latest force version - it didn't work.

I have no idea how to solve this issue... Thanks for any help

ernstste commented 1 year ago

Without knowing what the exact cause of the issue here is: If you have the possibility to run FORCE in Docker, please do so. This will ensure that the environment that FORCE is running in is configured properly without conflicting packages and also gives you full flexibility when switching between versions etc.

thielfab commented 1 year ago

If you are by any chance running the force command from a terminal where a conda environment is activated that includes GDAL, then this might be the issue. See here https://github.com/davidfrantz/force/discussions/146#discussioncomment-1784703

pleitebier commented 1 year ago

autsch I haven't seen that thread before and is exactly going to the bottom of the issue... thanks