亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? geo_trans.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
字號:
/****************************************************************************** * $Id: geo_trans.c,v 1.10 2003/07/08 17:31:30 warmerda Exp $ * * Project:  libgeotiff * Purpose:  Code to abstract translation between pixel/line and PCS *           coordinates. * Author:   Frank Warmerdam, warmerda@home.com * ****************************************************************************** * Copyright (c) 1999, Frank Warmerdam * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************** * * $Log: geo_trans.c,v $ * Revision 1.10  2003/07/08 17:31:30  warmerda * cleanup various warnings * * Revision 1.9  2001/11/28 14:20:30  warmerda * fixed transform memory leak in GTIFPCSToImage * * Revision 1.8  2001/04/06 16:56:22  warmerda * added support for PCSToImage with matrix * * Revision 1.7  2001/03/05 03:25:23  warmerda * restructure cleanup, and apply to GTIFPCSToImage() * * Revision 1.6  2001/03/04 22:37:39  warmerda * fixed memory leak for fields fetched with gt_methods.get - Alan Gray * * Revision 1.5  2000/08/22 03:32:46  warmerda * removed GTIFTiepointTranslate code * * Revision 1.4  1999/09/17 01:19:51  warmerda * Fixed bug in use of transform matrix. * * Revision 1.3  1999/09/16 21:25:40  warmerda * Added tiepoint, and transformation matrix based translation.  Note * that we don't try to invert the transformation matrix for * GTIFPCSToImage(). * * Revision 1.2  1999/09/07 20:00:40  warmerda * Fixed count/tiepoint_count bug in GTIFPCSToImage(). * * Revision 1.1  1999/05/04 03:07:57  warmerda * New * */ #include "geotiff.h"#include "geo_tiffp.h" /* external TIFF interface */#include "geo_keyp.h"  /* private interface       */#include "geokeys.h"/************************************************************************//*                          inv_geotransform()                          *//*                                                                      *//*      Invert a 6 term geotransform style matrix.                      *//************************************************************************/static int inv_geotransform( double *gt_in, double *gt_out ){    double	det, inv_det;    /* we assume a 3rd row that is [0 0 1] */    /* Compute determinate */    det = gt_in[0] * gt_in[4] - gt_in[1] * gt_in[3];    if( fabs(det) < 0.000000000000001 )        return 0;    inv_det = 1.0 / det;    /* compute adjoint, and devide by determinate */    gt_out[0] =  gt_in[4] * inv_det;    gt_out[3] = -gt_in[3] * inv_det;    gt_out[1] = -gt_in[1] * inv_det;    gt_out[4] =  gt_in[0] * inv_det;    gt_out[2] = ( gt_in[1] * gt_in[5] - gt_in[2] * gt_in[4]) * inv_det;    gt_out[5] = (-gt_in[0] * gt_in[5] + gt_in[2] * gt_in[3]) * inv_det;    return 1;}/************************************************************************//*                       GTIFTiepointTranslate()                        *//************************************************************************/int GTIFTiepointTranslate( int gcp_count, double * gcps_in, double * gcps_out,                           double x_in, double y_in,                           double *x_out, double *y_out ){    (void) gcp_count;    (void) gcps_in;    (void) gcps_out;    (void) x_in;    (void) y_in;    (void) x_out;    (void) y_out;        /* I would appreciate a _brief_ block of code for doing second order       polynomial regression here! */    return FALSE;}/************************************************************************//*                           GTIFImageToPCS()                           *//************************************************************************//** * Translate a pixel/line coordinate to projection coordinates. * * At this time this function does not support image to PCS translations for * tiepoints-only definitions,  only pixelscale and transformation matrix * formulations. * * @param gtif The handle from GTIFNew() indicating the target file. * @param x A pointer to the double containing the pixel offset on input, * and into which the easting/longitude will be put on completion. * @param y A pointer to the double containing the line offset on input, * and into which the northing/latitude will be put on completion. * * @return TRUE if the transformation succeeds, or FALSE if it fails.  It may * fail if the file doesn't have properly setup transformation information, * or it is in a form unsupported by this function. */int GTIFImageToPCS( GTIF *gtif, double *x, double *y ){    int     res = FALSE;    int     tiepoint_count, count, transform_count;    tiff_t *tif=gtif->gt_tif;    double *tiepoints   = 0;    double *pixel_scale = 0;    double *transform   = 0;    if (!(gtif->gt_methods.get)(tif, GTIFF_TIEPOINTS,                              &tiepoint_count, &tiepoints ))        tiepoint_count = 0;    if (!(gtif->gt_methods.get)(tif, GTIFF_PIXELSCALE, &count, &pixel_scale ))        count = 0;    if (!(gtif->gt_methods.get)(tif, GTIFF_TRANSMATRIX,                                &transform_count, &transform ))        transform_count = 0;/* -------------------------------------------------------------------- *//*      If the pixelscale count is zero, but we have tiepoints use      *//*      the tiepoint based approach.                                    *//* -------------------------------------------------------------------- */    if( tiepoint_count > 6 && count == 0 )     {        res = GTIFTiepointTranslate( tiepoint_count / 6,                                     tiepoints, tiepoints + 3,                                     *x, *y, x, y );    }/* -------------------------------------------------------------------- *//*	If we have a transformation matrix, use it. 			*//* -------------------------------------------------------------------- */    else if( transform_count == 16 )     {        double x_in = *x, y_in = *y;        *x = x_in * transform[0] + y_in * transform[1] + transform[3];        *y = x_in * transform[4] + y_in * transform[5] + transform[7];                res = TRUE;    } /* -------------------------------------------------------------------- *//*      For now we require one tie point, and a valid pixel scale.      *//* -------------------------------------------------------------------- */    else if( count < 3 || tiepoint_count < 6 )     {        res = FALSE;    }     else     {        *x = (*x - tiepoints[0]) * pixel_scale[0] + tiepoints[3];        *y = (*y - tiepoints[1]) * (-1 * pixel_scale[1]) + tiepoints[4];        res = TRUE;    }/* -------------------------------------------------------------------- *//*      Cleanup                                                         *//* -------------------------------------------------------------------- */    if(tiepoints)           _GTIFFree(tiepoints);    if(pixel_scale)        _GTIFFree(pixel_scale);    if(transform)          _GTIFFree(transform);    return res;}/************************************************************************//*                           GTIFPCSToImage()                           *//************************************************************************//** * Translate a projection coordinate to pixel/line coordinates. * * At this time this function does not support PCS to image translations for * tiepoints-only based definitions, only matrix and pixelscale/tiepoints  * formulations are supposed. * * @param gtif The handle from GTIFNew() indicating the target file. * @param x A pointer to the double containing the pixel offset on input, * and into which the easting/longitude will be put on completion. * @param y A pointer to the double containing the line offset on input, * and into which the northing/latitude will be put on completion. * * @return TRUE if the transformation succeeds, or FALSE if it fails.  It may * fail if the file doesn't have properly setup transformation information, * or it is in a form unsupported by this function. */int GTIFPCSToImage( GTIF *gtif, double *x, double *y ){    double 	*tiepoints = NULL;    int 	tiepoint_count, count, transform_count = 0;    double	*pixel_scale = NULL;    double 	*transform   = NULL;    tiff_t 	*tif=gtif->gt_tif;    int		result = FALSE;/* -------------------------------------------------------------------- *//*      Fetch tiepoints and pixel scale.                                *//* -------------------------------------------------------------------- */    if (!(gtif->gt_methods.get)(tif, GTIFF_TIEPOINTS,                              &tiepoint_count, &tiepoints ))        tiepoint_count = 0;    if (!(gtif->gt_methods.get)(tif, GTIFF_PIXELSCALE, &count, &pixel_scale ))        count = 0;    if (!(gtif->gt_methods.get)(tif, GTIFF_TRANSMATRIX,                                &transform_count, &transform ))        transform_count = 0;/* -------------------------------------------------------------------- *//*      If the pixelscale count is zero, but we have tiepoints use      *//*      the tiepoint based approach.                                    *//* -------------------------------------------------------------------- */    if( tiepoint_count > 6 && count == 0 )    {        result = GTIFTiepointTranslate( tiepoint_count / 6,                                        tiepoints + 3, tiepoints,                                        *x, *y, x, y );    }/* -------------------------------------------------------------------- *//*      Handle matrix - convert to "geotransform" format, invert and    *//*      apply.                                                          *//* -------------------------------------------------------------------- */    else if( transform_count == 16 )    {        double  x_in = *x, y_in = *y;        double	gt_in[6], gt_out[6];                gt_in[0] = transform[0];        gt_in[1] = transform[1];        gt_in[2] = transform[3];        gt_in[3] = transform[4];        gt_in[4] = transform[5];        gt_in[5] = transform[7];        if( !inv_geotransform( gt_in, gt_out ) )            result = FALSE;        else        {            *x = x_in * gt_out[0] + y_in * gt_out[1] + gt_out[2];            *y = x_in * gt_out[3] + y_in * gt_out[4] + gt_out[5];                        result = TRUE;        }    }/* -------------------------------------------------------------------- *//*      For now we require one tie point, and a valid pixel scale.      *//* -------------------------------------------------------------------- */    else if( count >= 3 && tiepoint_count >= 6 )    {        *x = (*x - tiepoints[3]) / pixel_scale[0] + tiepoints[0];        *y = (*y - tiepoints[4]) / (-1 * pixel_scale[1]) + tiepoints[1];        result = TRUE;    }/* -------------------------------------------------------------------- *//*      Cleanup.                                                        *//* -------------------------------------------------------------------- */    if(tiepoints)           _GTIFFree(tiepoints);    if(pixel_scale)        _GTIFFree(pixel_scale);    if(transform)          _GTIFFree(transform);    return result;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲r级在线视频| 欧美日韩精品免费观看视频 | 国产成人精品免费视频网站| 美女www一区二区| 久久福利视频一区二区| 国产乱子伦视频一区二区三区 | 久久午夜免费电影| 久久一区二区视频| 国产精品人人做人人爽人人添 | 日本一区二区视频在线| 国产精品理伦片| 亚洲福利视频一区二区| 麻豆精品精品国产自在97香蕉| 黑人精品欧美一区二区蜜桃| 豆国产96在线|亚洲| 在线一区二区观看| 91精品国产乱码久久蜜臀| 久久精品亚洲国产奇米99| 日韩毛片一二三区| 免费美女久久99| 91免费版pro下载短视频| 日韩欧美中文字幕精品| 1024精品合集| 婷婷夜色潮精品综合在线| 美女www一区二区| 在线观看日产精品| 久久九九99视频| 免费看欧美美女黄的网站| 91福利精品第一导航| 中文字幕精品综合| 国产乱码字幕精品高清av| 在线观看一区日韩| 最新国产成人在线观看| 国内国产精品久久| 欧美日本韩国一区| 亚洲影院在线观看| 色88888久久久久久影院野外| 久久免费美女视频| 激情图区综合网| 91精品麻豆日日躁夜夜躁| 亚洲女同女同女同女同女同69| 成人黄色在线视频| 国产天堂亚洲国产碰碰| 国产综合久久久久久鬼色| 欧美大度的电影原声| 日本人妖一区二区| 日韩一区二区三区精品视频| 亚洲成av人影院| 在线综合视频播放| 日本系列欧美系列| 欧美一级黄色片| 国产综合成人久久大片91| 久久久99免费| 99v久久综合狠狠综合久久| 国产精品视频一二| 在线精品视频一区二区三四| 亚洲一卡二卡三卡四卡| 精品视频色一区| 捆绑调教美女网站视频一区| 精品成人一区二区| 精品视频在线免费看| 欧美美女直播网站| 亚洲女同一区二区| 91精品国产综合久久蜜臀| 美女脱光内衣内裤视频久久网站 | 国产精品三级电影| 色天天综合久久久久综合片| 亚洲国产一区二区a毛片| 欧美日韩精品福利| 免费成人在线播放| 日韩一区二区三区在线| 国产一区二区三区在线观看免费视频 | 麻豆一区二区三| 国产精品美女久久久久久久| 九一久久久久久| 亚洲人成网站色在线观看| 欧洲精品在线观看| 午夜精品在线看| 久久伊人中文字幕| 91影视在线播放| 美女一区二区在线观看| 日韩欧美在线一区二区三区| 国产精品一区二区久久精品爱涩| 亚洲国产精品激情在线观看| 欧美三级资源在线| 国产盗摄视频一区二区三区| 亚洲色图20p| 久久综合一区二区| 在线看国产一区| 国产精品乡下勾搭老头1| 自拍av一区二区三区| 日韩情涩欧美日韩视频| 91视频在线观看| 精品综合免费视频观看| 亚洲第一av色| 国产嫩草影院久久久久| 91精品国产综合久久久久久久久久| 岛国精品在线观看| 理论片日本一区| 日韩av一区二区在线影视| 亚洲女与黑人做爰| 国产精品高潮呻吟| 国产女人aaa级久久久级| 久久综合一区二区| 精品久久久久久久一区二区蜜臀| 色婷婷国产精品综合在线观看| 粉嫩绯色av一区二区在线观看| 久久成人羞羞网站| 精品一区二区三区免费毛片爱 | 国产精品69毛片高清亚洲| 视频在线观看国产精品| 专区另类欧美日韩| 亚洲视频在线一区二区| 亚洲特黄一级片| 亚洲欧美日韩综合aⅴ视频| 亚洲视频精选在线| 亚洲黄色在线视频| 亚洲成a人v欧美综合天堂| 一区二区三区欧美激情| 亚洲欧美二区三区| 日韩美女视频一区二区| 亚洲一区二区三区中文字幕在线| 日韩一区二区精品葵司在线| 国产一区二区三区黄视频| 性欧美大战久久久久久久久| 亚洲18影院在线观看| 日韩av成人高清| 国产精品亚洲第一| 91蜜桃传媒精品久久久一区二区| k8久久久一区二区三区| www..com久久爱| 欧美日韩精品专区| 久久久亚洲国产美女国产盗摄| 国产精品热久久久久夜色精品三区| 国产精品美女久久久久久久久久久 | 亚洲激情网站免费观看| 日韩精品91亚洲二区在线观看 | 日韩av在线发布| 成人aa视频在线观看| 欧美日韩高清一区二区不卡| 日韩精品一区在线| 亚洲精品免费电影| 久久99国产精品尤物| 色综合久久综合网欧美综合网| 欧洲一区二区三区在线| 国产日韩av一区| 蜜桃视频在线观看一区二区| 91在线精品一区二区三区| 欧美日韩成人一区| 亚洲精品菠萝久久久久久久| 精品一区二区三区免费毛片爱 | 成人免费毛片app| 精品福利在线导航| 日韩va欧美va亚洲va久久| 色八戒一区二区三区| 国产精品日韩精品欧美在线| 久久精品99国产国产精| 欧美午夜电影在线播放| 亚洲免费观看高清完整版在线观看熊 | 欧美久久一区二区| 亚洲欧美另类在线| 一本大道久久精品懂色aⅴ| 久久久久久久国产精品影院| 午夜伊人狠狠久久| 色天天综合色天天久久| 亚洲免费观看高清完整| 91在线视频免费91| 国产精品久久久久婷婷二区次| 日本不卡视频在线| 精品女同一区二区| 国产精品一级片| 精品国产三级a在线观看| 国产麻豆91精品| 中文字幕不卡在线观看| 韩日av一区二区| 综合电影一区二区三区| 在线日韩国产精品| 午夜视频一区二区三区| 欧美精品在线观看一区二区| 天天av天天翘天天综合网| 欧美剧在线免费观看网站| 蜜桃视频一区二区三区| 国产欧美一区二区精品秋霞影院 | 亚洲成av人影院| 精品国产3级a| 国产电影一区在线| 一区二区三区久久| 天天色 色综合| 2020国产精品自拍| 在线播放中文字幕一区| 成人福利视频网站| 蜜臀久久久久久久| 亚洲男人的天堂在线观看| 久久―日本道色综合久久| 欧美日韩精品专区| 91黄视频在线| 成人一二三区视频| 国产iv一区二区三区| 麻豆国产精品官网| 蜜臀av性久久久久av蜜臀妖精|