<commit_before>/*
 * libgnomonic - Gnomonic projection algorithms library
 *
 * Copyright (c) 2013-2015 FOXEL SA - http://foxel.ch
 * Please read <http://foxel.ch/license> for more information.
 *
 *
 * Author(s):
 *
 *      <NAME> <<EMAIL>>
 *
 *
 * This file is part of the FOXEL project <http://foxel.ch>.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 * Additional Terms:
 *
 *      You are required to preserve legal notices and author attributions in
 *      that material or in the Appropriate Legal Notices displayed by works
 *      containing it.
 *
 *      You are required to attribute the work as explained in the "Usage and
 *      Attribution" section of <http://foxel.ch/license>.
 */


/*
    Source - Includes
 */

    # include "gnomonic-gtt.h"

/*
    Source - Rectilinear to equirectangular tile transform - Centered-specific
 */

    lg_Void_t lg_gtt_center(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgFocal,
        lg_Real_t   const         lgPixel,
        li_Method_t const         lgInter

    ) { lg_gtt_centerp(

        lgeBitmap,
        lgeWidth,
        lgeHeight,
        lgeLayers,
        lgrBitmap,
        lgrWidth,
        lgrHeight,
        lgrLayers,
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgAzim,
        lgElev,
        lgRoll,
        lgFocal,
        lgPixel,
        lgInter,
        lg_Size_s( 1 )

    ); }

    lg_Void_t lg_gtt_centerp(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgFocal,
        lg_Real_t   const         lgPixel,
        li_Method_t const         lgInter,
        lg_Size_t   const         lgThread

    ) { lg_gtt_genericp(

        lgeBitmap,
        lgeWidth,
        lgeHeight,
        lgeLayers,
        lgrBitmap,
        lgrWidth,
        lgrHeight,
        lgrLayers,
        lg_Real_c( lgrWidth  ) / lg_Real_s( 2.0 ),
        lg_Real_c( lgrHeight ) / lg_Real_s( 2.0 ),
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgAzim,
        lgElev,
        lgRoll,
        lgFocal,
        lgPixel,
        lgInter,
        lgThread

    ); }

/*
    Source - Rectilinear to equirectangular tile transform - Elphel-specific
 */

    lg_Void_t lg_gtt_elphel(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Real_t   const         lgrSightX,
        lg_Real_t   const         lgrSightY,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgHead,
        lg_Real_t   const         lgPixel,
        lg_Real_t   const         lgFocal,
        li_Method_t const         lgInter

    ) { lg_gtt_elphelp(

        lgeBitmap,
        lgeWidth,
        lgeHeight,
        lgeLayers,
        lgrBitmap,
        lgrWidth,
        lgrHeight,
        lgrLayers,
        lgrSightX,
        lgrSightY,
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgRoll,
        lgAzim,
        lgElev,
        lgHead,
        lgPixel,
        lgFocal,
        lgInter,
        lg_Size_s( 1 )

    ); }

    lg_Void_t lg_gtt_elphelp(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Real_t   const         lgrSightX,
        lg_Real_t   const         lgrSightY,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgHead,
        lg_Real_t   const         lgPixel,
        lg_Real_t   const         lgFocal,
        li_Method_t const         lgInter,
        lg_Size_t   const         lgThread

    ) { lg_gtt_genericp(

            lgeBitmap,
            lgeWidth,
            lgeHeight,
            lgeLayers,
            lgrBitmap,
            lgrWidth,
            lgrHeight,
            lgrLayers,
            lgrSightX,
            lgrSightY,
            lgmWidth,
            lgmHeight,
            lgmCornerX,
            lgmCornerY,
            lgAzim + lgHead + LG_PI,
            lgElev,
            lgRoll,
            lgFocal,
            lgPixel,
            lgInter,
            lgThread

    ); }

/*
    Source - Rectilinear to equirectangular tile transform
 */

    lg_Void_t lg_gtt_generic(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Real_t   const         lgrSightX,
        lg_Real_t   const         lgrSightY,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgFocal,
        lg_Real_t   const         lgPixel,
        li_Method_t const         lgInter<commit_msg>Adding points coordinates conversion lg_gtt_generic_point front-end functions<commit_after>/*
 * libgnomonic - Gnomonic projection algorithms library
 *
 * Copyright (c) 2013-2015 FOXEL SA - http://foxel.ch
 * Please read <http://foxel.ch/license> for more information.
 *
 *
 * Author(s):
 *
 *      <NAME> <<EMAIL>>
 *
 *
 * This file is part of the FOXEL project <http://foxel.ch>.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 * Additional Terms:
 *
 *      You are required to preserve legal notices and author attributions in
 *      that material or in the Appropriate Legal Notices displayed by works
 *      containing it.
 *
 *      You are required to attribute the work as explained in the "Usage and
 *      Attribution" section of <http://foxel.ch/license>.
 */


/*
    Source - Includes
 */

    # include "gnomonic-gtt.h"

/*
    Source - Rectilinear to equirectangular tile transform - Centered-specific
 */

    lg_Void_t lg_gtt_center(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgFocal,
        lg_Real_t   const         lgPixel,
        li_Method_t const         lgInter

    ) { lg_gtt_centerp(

        lgeBitmap,
        lgeWidth,
        lgeHeight,
        lgeLayers,
        lgrBitmap,
        lgrWidth,
        lgrHeight,
        lgrLayers,
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgAzim,
        lgElev,
        lgRoll,
        lgFocal,
        lgPixel,
        lgInter,
        lg_Size_s( 1 )

    ); }

    lg_Void_t lg_gtt_centerp(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgFocal,
        lg_Real_t   const         lgPixel,
        li_Method_t const         lgInter,
        lg_Size_t   const         lgThread

    ) { lg_gtt_genericp(

        lgeBitmap,
        lgeWidth,
        lgeHeight,
        lgeLayers,
        lgrBitmap,
        lgrWidth,
        lgrHeight,
        lgrLayers,
        lg_Real_c( lgrWidth  ) / lg_Real_s( 2.0 ),
        lg_Real_c( lgrHeight ) / lg_Real_s( 2.0 ),
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgAzim,
        lgElev,
        lgRoll,
        lgFocal,
        lgPixel,
        lgInter,
        lgThread

    ); }

    lg_Void_t lg_gtt_center_point(

        lg_Real_t       * const lgePointX,
        lg_Real_t       * const lgePointY,
        lg_Real_t const         lgrPointX,
        lg_Real_t const         lgrPointY,
        lg_Size_t const         lgrWidth,
        lg_Size_t const         lgrHeight,
        lg_Size_t const         lgmWidth,
        lg_Size_t const         lgmHeight,
        lg_Size_t const         lgmCornerX,
        lg_Size_t const         lgmCornerY,
        lg_Real_t const         lgAzim,
        lg_Real_t const         lgElev,
        lg_Real_t const         lgRoll,
        lg_Real_t const         lgFocal,
        lg_Real_t const         lgPixel

    ) { lg_gtt_generic_point(

        lgePointX,
        lgePointY,
        lgrPointX,
        lgrPointY,
        lg_Real_c( lgrWidth  ) / lg_Real_s( 2.0 ),
        lg_Real_c( lgrHeight ) / lg_Real_s( 2.0 ),
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgAzim,
        lgElev,
        lgRoll,
        lgFocal,
        lgPixel

    ); }

/*
    Source - Rectilinear to equirectangular tile transform - Elphel-specific
 */

    lg_Void_t lg_gtt_elphel(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Real_t   const         lgrSightX,
        lg_Real_t   const         lgrSightY,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgHead,
        lg_Real_t   const         lgPixel,
        lg_Real_t   const         lgFocal,
        li_Method_t const         lgInter

    ) { lg_gtt_elphelp(

        lgeBitmap,
        lgeWidth,
        lgeHeight,
        lgeLayers,
        lgrBitmap,
        lgrWidth,
        lgrHeight,
        lgrLayers,
        lgrSightX,
        lgrSightY,
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgRoll,
        lgAzim,
        lgElev,
        lgHead,
        lgPixel,
        lgFocal,
        lgInter,
        lg_Size_s( 1 )

    ); }

    lg_Void_t lg_gtt_elphelp(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Real_t   const         lgrSightX,
        lg_Real_t   const         lgrSightY,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgHead,
        lg_Real_t   const         lgPixel,
        lg_Real_t   const         lgFocal,
        li_Method_t const         lgInter,
        lg_Size_t   const         lgThread

    ) { lg_gtt_genericp(

        lgeBitmap,
        lgeWidth,
        lgeHeight,
        lgeLayers,
        lgrBitmap,
        lgrWidth,
        lgrHeight,
        lgrLayers,
        lgrSightX,
        lgrSightY,
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgAzim + lgHead + LG_PI,
        lgElev,
        lgRoll,
        lgFocal,
        lgPixel,
        lgInter,
        lgThread

    ); }

    lg_Void_t lg_gtt_elphel_point(

        lg_Real_t       * const lgePointX,
        lg_Real_t       * const lgePointY,
        lg_Real_t const         lgrPointX,
        lg_Real_t const         lgrPointY,
        lg_Real_t const         lgrSightX,
        lg_Real_t const         lgrSightY,
        lg_Size_t const         lgmWidth,
        lg_Size_t const         lgmHeight,
        lg_Size_t const         lgmCornerX,
        lg_Size_t const         lgmCornerY,
        lg_Real_t const         lgRoll,
        lg_Real_t const         lgAzim,
        lg_Real_t const         lgElev,
        lg_Real_t const         lgHead,
        lg_Real_t const         lgPixel,
        lg_Real_t const         lgFocal

    ) { lg_gtt_generic_point(

        lgePointX,
        lgePointY,
        lgrPointX,
        lgrPointY,
        lgrSightX,
        lgrSightY,
        lgmWidth,
        lgmHeight,
        lgmCornerX,
        lgmCornerY,
        lgAzim + lgHead + LG_PI,
        lgElev,
        lgRoll,
        lgFocal,
        lgPixel

    ); }

/*
    Source - Rectilinear to equirectangular tile transform
 */

    lg_Void_t lg_gtt_generic(

        li_C8_t           * const lgeBitmap,
        lg_Size_t   const         lgeWidth,
        lg_Size_t   const         lgeHeight,
        lg_Size_t   const         lgeLayers,
        li_C8_t     const * const lgrBitmap,
        lg_Size_t   const         lgrWidth,
        lg_Size_t   const         lgrHeight,
        lg_Size_t   const         lgrLayers,
        lg_Real_t   const         lgrSightX,
        lg_Real_t   const         lgrSightY,
        lg_Size_t   const         lgmWidth,
        lg_Size_t   const         lgmHeight,
        lg_Size_t   const         lgmCornerX,
        lg_Size_t   const         lgmCornerY,
        lg_Real_t   const         lgAzim,
        lg_Real_t   const         lgElev,
        lg_Real_t   const         lgRoll,
        lg_Real_t   const         lgFocal,
        lg_Real_t   const         lgPixel,
        li_Method_t const         lgInter
{'fraction_non_alphanumeric': 0.04577037608911437, 'fraction_numerical': 0.0029778316973640673, 'mean_word_length': 1.3484848484848484, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1311640', 'n_tokens_mistral': 6510, 'n_tokens_neox': 5914, 'n_words': 1364}