/* VModis_interpol.h */ /* remap Copyright (C) 2006 Fabrice Ducos, fabrice.ducos@icare.univ-lille1.fr This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "common.h" typedef enum { INTERP_SWATH } PROJTYPE; typedef enum { INTERP_BOUNDS, INTERP_CENTERS } INTERP_OUTPUT; typedef struct { struct { int Nl; int Np; } sds; struct { PROJTYPE type; } projparam; int Nl_geo; int Np_geo; float rowoffset; float rowstep; float coloffset; float colstep; } PRODUCT; /* Example for get_step_and_offset: get_step_and_offset(input.sds.Nl, input.Nl_geo, &input.rowoffset, &input.rowstep, input.projparam.type, FALSE); get_step_and_offset(input.sds.Np, input.Np_geo, &input.coloffset, &input.colstep, input.projparam.type, TRUE); */ void get_step_and_offset(int n1, int n2, float *offset, float *step, int rowsperscan, int georowsamplingstep, unsigned char crosstrack); void resample_row_geolocation(INTERP_OUTPUT output /* INTERP_BOUNDS or INTERP_CENTERS */, double *oldlon, double *oldlat, PRODUCT *product, coord_type *newlon, coord_type *newlat); void get_virtual_row(const coord_type *lon1, const coord_type *lat1, const coord_type *lon2, const coord_type *lat2, double t, int ncols, double *lon3, double *lat3); void get_georows(double fractrow, PRODUCT *input, int iscan, int *georow1, int *georow2, double *t);