Coverage Report

Created: 2025-08-28 06:57

/src/proj/src/area.cpp
Line
Count
Source (jump to first uncovered line)
1
/******************************************************************************
2
 * Project:  PROJ
3
 * Purpose:  PJ_AREA related code
4
 *
5
 * Author:   Thomas Knudsen,  thokn@sdfe.dk,  2016-06-09/2016-11-06
6
 *
7
 ******************************************************************************
8
 * Copyright (c) 2016, 2017 Thomas Knudsen/SDFE
9
 *
10
 * Permission is hereby granted, free of charge, to any person obtaining a
11
 * copy of this software and associated documentation files (the "Software"),
12
 * to deal in the Software without restriction, including without limitation
13
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14
 * and/or sell copies of the Software, and to permit persons to whom the
15
 * Software is furnished to do so, subject to the following conditions:
16
 *
17
 * The above copyright notice and this permission notice shall be included
18
 * in all copies or substantial portions of the Software.
19
 *
20
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26
 * DEALINGS IN THE SOFTWARE.
27
 *****************************************************************************/
28
29
#define FROM_PROJ_CPP
30
31
#include "proj.h"
32
#include "proj_internal.h"
33
34
/** Create an area of use */
35
0
PJ_AREA *proj_area_create(void) { return new PJ_AREA(); }
36
37
/** Assign a bounding box to an area of use. */
38
void proj_area_set_bbox(PJ_AREA *area, double west_lon_degree,
39
                        double south_lat_degree, double east_lon_degree,
40
0
                        double north_lat_degree) {
41
0
    area->bbox_set = TRUE;
42
0
    area->west_lon_degree = west_lon_degree;
43
0
    area->south_lat_degree = south_lat_degree;
44
0
    area->east_lon_degree = east_lon_degree;
45
0
    area->north_lat_degree = north_lat_degree;
46
0
}
47
48
/** Assign the name of an area of use. */
49
0
void proj_area_set_name(PJ_AREA *area, const char *name) { area->name = name; }
50
51
/** Free an area of use */
52
0
void proj_area_destroy(PJ_AREA *area) { delete area; }