#!/usr/bin/env perl

# gmt mapproject -W -Jt130/1:984252 -R125/-23/135/-9r
# 42.5410895705  62.1714081966

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_283_15_15_04_0017_202500131_HWK2020250012944.L1A_SE1
$findex $roll $pitch $yaw
| gmt mapproject --PROJ_LENGTH_UNIT=inch
 -Jt130/1:984252 -R125/-23/135/-9r
 -bi3f -bo3f
| gmt nearneighbor -Gtest.grd -I0.01
 -R0/42.54/0/62.17 -N4 -S0.05 -r -bi3f;
gmt grd2xyz test.grd -ZTLH >test.dat;
convert -size 4254x6217 -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
--
