#!/usr/bin/env perl

# gmt mapproject -W -Jt72/1:984252 -R67/16/78/29r
# 44.8382553286  57.9224279935

use strict;

my ($findex,$roll,$pitch,$yaw) = @ARGV;

system(join ' ',split ' ',<<"--")==0 or die;
/data1/www-data/oceancolor.gsfc.nasa.gov/src/finderpixcoords/finderpixcoords
WG1_SE1_2020_118_15_38_08_0018_201130542_HWK2020113054140.L1A_SE1
$findex $roll $pitch $yaw
| gmt mapproject --PROJ_LENGTH_UNIT=inch
 -Jt72/1:984252 -R67/16/78/29r
 -bi3f -bo3f
| gmt nearneighbor -Gtest.grd -I0.01
 -R0/44.84/0/57.92 -N4 -S0.05 -r -bi3f;
gmt grd2xyz test.grd -ZTLH >test.dat;
convert -size 4484x5792 -depth 16 GRAY:test.dat
 -transparent black -auto-level -evaluate log 10
/home/nkuring/oceanshare401/norman_kuring/Hawkeye/finder.png;
rm test.grd test.dat
--
