Compile ASF MapReady using a modern Docker Base Image
Mostly trial and error, googling gcc
/ make
/ cmake
errors, and a little luck.
I think most of the problems centered around finding versions that worked with Proj
< 6.0. This is likely the source of most of the build failures reported in issues.
This was a big one. There is an implicit dependancy in MapReady to an internal header file in proj. This header was deprecated after version 4, but not removed until version 6.
I needed version of libgeotiff
that was old enough to work with the ancient version of prof
, but new enough that it had all the cmake
architecture and pkgconfig
support. Also, it had to be libgeotiff
version < 1.5 when PJ_CONTEXT
was introduced, causing Issue #505.
gsl v2.1
IIRC, nothing special here. This one sort of work out of the box and didn't require tinkering
gdal v2.1.2
gdal
needs to be old enough to be compatible with ancient versions of proj
. There may have also been some dependencie from MapReady itself that I'm not recalling.
shapelib v1.3.0
Not much to be said about this.
LOTS of fumbling around here because both MapReady issues 498 and 505 seem to suggest an incompatible version of hdf5. In the end, the newest version worked just fine.
I think there was some problem with newer version, but I don't recall the specifics.
# Pull public image from GitHub Container Registry
docker run -it ghcr.io/asfadmin/mapready:v1.1.1
# Do MapReady Stuff
[root@43b365c2b259 /]# /usr/local/bin/asf_import
Usage:
asf_import [-amplitude | -sigma | -gamma | -beta | -power] [-db]
[-format <inputFormat>] [-ancillary-file <file>]
[-colormap <colormap_file>] [-band <band_id | all>]
[-no-ers2-gain-fix] [-image-data-type <type>] [-lut <file>]
[-lat <lower> <upper>] [-prc] [-log <logFile>]
[-quiet] [-real-quiet] [-license] [-version] [-multilook]
[-azimuth-look-count <looks>] [-range-look-count <looks>]
[-azimuth-scale[=<scale>] | -fix-meta-ypix[=<pixsiz>]]
[-range-scale[=<scale>] [-complex] [-metadata <file>]
[-interferogam <file>] [-coherence <file>] [-slave <file>]
[-baseline <file>] [-cpx_gamma <file>] [-line <start line subset>]
[-sample <start sample subset>] [-width <subset width>]
[-height <subset height>] [-uavsar <type>]
[-subset <latUL> <lonUL> <latLR> <lonLR>] [-help]
<inBaseName> <outBaseName>