#!/usr/bin/env perl

# gmt mapproject -W -Ja-78/-10/1:984252 -R-86/-16/-70/-5r
# 69.7572050904	48.7508611657

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_0014_201121523_HWK2020112152302.L1A_SE1
$findex $roll $pitch $yaw
| gmt mapproject --PROJ_LENGTH_UNIT=inch
 -Ja-78/-10/1:984252 -R-86/-16/-70/-5r
 -bi3f -bo3f
| gmt nearneighbor -Gtest.grd -I0.01
 -R0/69.76/0/48.75 -N4 -S0.05 -r -bi3f;
gmt grd2xyz test.grd -ZTLH >test.dat;
convert -size 6976x4875 -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
--
