Map production and data analysis with local parameters-The case study of the Algarve region

In this work we perform a geographical analysis of the Algarve region by using local parameters in the three map projections we consider: Transverse Mercator (TMzn), Lambert Azimuthal Equal-Area (LAEA) and Lambert Conformal Conic (LCC). We compare the Algarve maps resulting by each one of these representations when the origin of coordinates is moved from the center of mainland Portugal (that is in force) to the center of the Algarve. For the LCC map projection, the analysis takes also into account the change of the upper parallel from the North of Portugal to a latitude inside the Algarve border. The area and perimeter of the Algarve is computed and the location of its geographic center is determined in every map representation. Borders lengths that separates the Algarve from Alentejo and from Spain, and the extents of its South and West coasts, are also computed. We conclude by presenting the map, the values of area and perimeter and the location of the geographic center that should be considered for the Algarve, at different scales and for the available data.


Introduction
The Algarve is located in the southern part of mainland Portugal and occupies a surface area between 36°57 0 42 00 N (Santa Maria Cape) and 37°31 0 44 00 N (Vascão's River), and 07°23 0 35 00 W (Guadiana's Mouth) and 08°59 0 49 00 W (S. Vicente Cape) [1]. All the known cartographic representations of the Algarve are roughly rectangular strips that, in the longest side, extend from East to West between Guadiana River, that separates Portugal from Spain in this part of the border, and the Atlantic Ocean. The North of the Algarve is limited by Alentejo, the largest region of Portugal, and the South, as the West, is bordered by the Atlantic Ocean (see Fig. 1).
In this work, we consider three different map projections to study the distinct cartographic representations of the Algarve that are obatined by using each one of the map projections with the datum of the European Terrestrial Reference System 1989 (ETRS89) that is in force for mainland Portugal. The map projections to be worked out here, are the Transverse Mercator (TMzn), Lambert Azimuthal Equal-Area (LAEA) and Lambert Conformal Conic (LCC). For the representation of the Algarve made by each one of these map projections, we will compare the changes that take place when we move the origin of rectangular coordinates that are in force for mainland Portugal to a position in the center of the Algarve. Our comparative analysis will not only take into account the different cartographic representations of the Algarve, but will be mainly focused on what happens with important attributes such as area, perimeter and geographic center.
This article is organized as follows. In the current section, we introduce the main goals of this work. Sections 2 and 3 are directed to explain the materials and methods we use in the sequel. In Section 3, we describe the method and explain the procedure we use, from the extraction of the datum corresponding to the Algarve region to obtaining the different cartographic representations, with the computation of the corresponding areas and perimeters, as well as the location of the geographic centers. For these computations, we derive, in Section 2, a formula for the computation of areas of polygons bounded by a discrete quantity of points. There, we also derive formulae for the computation of perimeters and to find the location of centroids in such polygons. The results of the comparative analysis we perform with TMzn, LAEA and LCC map projections are shown in Section 4. We conclude our work with a discussion of the obtained results in Section 5. In Table 1 below, we define the abbreviations used throughout this text.
In Appendix A, we recall the ellipsoid and the datum that we work with, and we also define the accuracy of some geometric parameters that will be used in the considered algorithms of the chosen map projections. The symbols, definitions and algorithms of the direct and inverse TMzn, LAEA and LCC map projections we work with, are presented in Appendices B, C and D, respectively.

Material
In this section, we present some material to be used in our work, in particular the Geodetic Reference System 1980, the considered European Terrestrial Reference System 1989 for mainland Portugal, the three studied map projections, and the derivation of some mathematical formulae that will be of the utmost importance in our analyses.

GRS80
For the development of this work, we consider the definition of the ellipsoid adopted by EuroGeographics ( [2], p. 10), which in turn has followed an earlier recommendation of the International Union of Geodesy and Geophysics to use the  Geodetic Reference System of 1980 (GRS80). This system was built based on the theory of the geocentric equipotential ellipsoid and is usually defined by a set of geometrical and physical constants. By a geocentric ellipsoid, it means that its origin is the center of mass of the Earth and therefore the center of the ellipsoid coincides with the geocenter. The orientation of the GRS80 system is specified in such a way that the minor axis of the reference ellipsoid be parallel to the direction (rotation axis) defined by the Conventional International Origin for polar motion [3,4]. The primary meridian in the GRS80 system is defined to be parallel to the zero meridian defined by the Bureau International de I'Heure [3,5]. Fixing the GRS80 ellipsoid, and observing that this ellipsoid is a surface of revolution, we may neglect, for now, the variations in longitude and consider the projection of the ellipsoid onto a plane xz, with the x-axis pointing in the horizontal direction and the z-axis pointing in the vertical one. The x-axis is made increasing from West to East and the z-axis from South to North. The obtained ellipse has the same semi-major axis and the same flattening coefficient. By using only these two coefficients, it is possible to obtain several geometric parameters that are useful in map projecting with the GRS80 ellipsoid. The precise values of the geometrical and physical constants that we consider in our work, are written in Tables A-1 and A-2 of the Appendix A.

PT-TM06/ETRS89
For the datum, we use the cartographic coordinates that, at the year of 2016, were in force and made available by the responsible Portuguese authority, Direção Geral do Território (DGT, Directorate-General of Territory) [6] under the name of Carta Administrativa Oficial de Portugal (Official Administrative Map of Portugal, OAM Portugal). The underlying set of geodetic coordinates are been produced and maintained by Instituto Geográfico Português (IGP, Portuguese Geographic Institute) following the guidelines of EUREF through the ISO 19111 -Spatial Referencing by Coordinates [7,8]. In particular, IGP has followed the recommendation by Eurogeographics ( [2], p. 10) to adopt the European Terrestrial Reference System 1989 (ETRS89) as geodetic datum and to express and store positions, as far as possible, in ellipsoidal coordinates, with the underlying GRS80 ellipsoid. The establishment of the ETRS89 datum in mainland Portugal was carried out based on international campaigns (1989)(1990)(1991)(1992)(1993)(1994)(1995), which aimed to connect the Portuguese network to the European network. In subsequent years (1997)(1998)(1999)(2000)(2001)(2002)(2003)(2004), all the geodetic network of first and second orders of mainland Portugal was observed with GNSS (Global Navigation Satellite System), and its adjustment was done by setting the coordinates of the points stationed in previous international campaigns. The geodetic network of mainland Portugal is now a realization of the ETRS89 with the Transverse Mercator map projection, denoted by PT-TM06/ETRS89 [6,9,10]. The main features of the PT-TM06/ ETRS89 are defined in Table A-3 of the Appendix A. In the rest of this work, we shall only write PT-TM06 whenever we want to refer to PT-TM06/ETRS89.

Map projections
We start our analysis with the Transverse Mercator map projection, because the available data (OAM Portugal) are written with respect to PT-TM06. It is believed that the adoption of the Transverse Mercator map projection was by reasons of choosing a projection which generated similar coordinates to the ones resulting from the application of the Gauss-Krüger map projection with Hayford ellipsoid to either the Datum 73 or to the Datum Lisboa, data that had been used in Portugal before ETRS89 [9,11,12]. For the sake of completeness, we present, in the Appendices B, C and D, the symbols, definitions and algorithms for both direct and inverse TMzn, LAEA and LCC map projections that we use in our analysis.

Transverse mercator
Mercator map's projection is classified as a cylindrical conformal map projection and its main characteristics are that meridians are straight lines equally spaced and parallels are unequally spaced straight lines, closer together near the equator, with the meridians cutting perpendicularly. Transverse Mercator is similar to the Mercator projection, except that the axis of the projection cylinder is rotated 90°from the polar axis. The contact line is then a chosen meridian instead of the Equator, and this central meridian runs from pole to pole. It loses the properties of straight meridians and straight parallels of the standard Mercator projection, except for the central meridian, the two meridians 90°away, and the Equator. The scale is true along the central meridian or along two straight lines equidistant from, and parallel to, the central meridian. Moreover, it cannot be edge-joined in a east-west direction if each sheet has its own central meridian. The abbreviation TM, considered in the Transverse Mercator map above, is used to distinguish the Thematic Mapper (TM) from the Universal Transverse Mercator (UTM). On the other hand, "zn" in the identifier TMzn stands for the zone number. Each zone runs from the equator northwards to latitude 84°North and is 6°wide in longitude reckoned from the Greenwich prime meridian. Portugal, and therefore the Algarve, belongs to Zone 29 which is centred on 9°West and is used between 6°and 12°West [13].

Lambert Azimuthal Equal-Area
Lambert Azimuthal Equal-Area map projection is mathematically based on a tangent plane to the Earth. It is the only projection that can accurately represent both area and true direction from the center of the projection which can be located anywhere. Concentric circles are closer together toward the edge of the map, and the scale distorts accordingly. This map projection is well-suited to square or round land masses and it generally represents only one hemisphere [13,14].

Lambert Conformal Conic
Lambert Conformal Conic map projection is mathematically based on a cone that is tangent at one parallel or, more often, that is conceptually secant on two parallels. The distortion of area is minimal, but increases away from the standard parallels, and great circle lines are approximately straight. North or South Pole is represented by a point, but the other pole cannot be shown. This map projection retains its properties at various scales, and sheets can be joined along their edges [13,14].

Geometry of a map
The system of cartographic coordinates defines a set of vertices of a polygon that approximates the shape of the Algarve obtained by the application of the chosen map projection to the geodetic network of the Algarve. In this section, we present the formulae that allow us to compute the area, perimeter and to find the location of the geographic center of the Algarve by using each one of the map projections considered in Section 2.3.

Area and perimeter
The problem of figuring out the area of the Algarve consists of evaluating the area of each one of these polygons, and to do that we have to use a practical formula to compute the area of a polygon. Let us denote the mapped region of the Algarve by A, its curved boundary by C, which is assumed to be positively oriented, and the system of cartographic coordinates by {(X i , Y i ): i = 1,. . ., N}, where N is the total number of mapped points. By using the Gauss-Green theorem, the line integral with respect to the coordinates x and y, and the telescopic sum's property, we obtain, where C i denotes the segment joining the point (X i , Y i ) to (X i+1 , Y i+1 ). Since C is a closed curve, it is assumed that (X 1 , Y 1 ) = (X N , Y N ). Formula (1) is known in some literature, specially of Geographic Information Systems, by the names of shoelace or surveyor. But yet this formula should be more properly denoted as the Gauss area's formula. It should be noted that underlying to the formula (1) it is implied the positive orientation in which the curve C is travelled, i.e. counterclockwise. However, many systems of coordinates that are made available by the national official bodies are organized clockwise, which makes that the curve C is negatively oriented. In such cases, formula (1) needs to be multiplied by À1 to revert the orientation of the curve C. To avoid these situations, we use the absolute value of (1), As for the perimeter, we have, by using the line integral with respect to the arc length, Geometric center One of the main goals of this work is to determine the geographic center of the Algarve region. By geographic center of a region of the Earth's surface, it is meant, in this work, the inversion, by the chosen map projection, of the geometric center of the figure corresponding to the planispheric representation of that region. We are thus concerned with the definition of the geometric center of a flat figure. For flat figures, like any regular polygon or the circle, the geometric center is the point of intersection of all the straight lines that divide the figure into two others equal. In this regard, the notion of geometric center corresponds to the physical concept of centroid, i.e. the point of the figure where can be considered the application of the force of gravity of the whole body. This analogy makes sense only if we assume the figure is a thin plate whose material that is made of, is homogeneously distributed. However, for figures bounded by curves, distinct of circles and ellipses, or for the most of irregular polygons, we can not divide them into geometrically equal figures. We are thus interested in defining, in the most comprehensive way, the concept of geometric center. To do it so, we start by considering a system of N particles with masses m 1 , m 2 ,. . ., m n distributed in a plane by the points of coordinates (X 1 , Y 1 ), (X 2 , Y 2 ),. . ., (X n , Y n ), respectively. By definition, the center of mass of this system is given by the point of coordinates ðx; yÞ, where, and M = m 1 + m 2 + . . . + m n is the total mass of the system. If instead of a finite system of particles, we are working with a mass q = q(x, y) continuously distributed over a flat region, the center of mass is defined by a usual limit process. Let us assume that the figure A corresponds to the projection of a thin plate with density q. In this case, the center of mass is given by the point of coordinates ðx; yÞ, where, and dxdy, or dydx, represents an element of area. When the plate is homogeneous, and thus the density q is constant, the center of mass is called centroid, and therefore (4) is written in the following form, where |A| denotes here the area of A which in turn is given by (2). Proceeding as we did for (1), we obtain from (5), and, Observe that the formulae (6) and (7) are valid regardless of the orientation of the curve C. In fact, if C was negatively oriented, this effect in the formulae (6) and (7) would be cancelled when dividing by A.

Methodology The chosen map projections
The Earth is roughly a sphere, and if we try to wrap a piece of plain paper around it to make a map, we will have a lot of wrinkles and folds. In fact, due to the Gauss Egregium theorem [15,16], representing a portion of the curved surface of the Earth on a flat piece of paper, without introducing any distortion, is mathematically impossible. Since all the map projections are somehow distorted, the choice of the projection must be done accordingly to the aims of each particular purpose. The main characteristics normally considered in choosing a map projection are the area and the shape. Most common and most important projections are conformal, i.e. they are angle preserving. Because local angles are correct, meridians intersect parallels at right angles on a conformal map projection. However, in conformal maps, the areas are generally enlarged or reduced throughout the map. Equal-area map projections are designed in a way such that on one part of the map they cover exactly the same area of the represented portion of the Earth's surface. But to do it so, shapes, angles, and scale must be distorted on most parts of such a map [13,14]. The consideration of TMzn, LAEA and LCC map projections in our work follows a recommendation by EuroGeographics ([2], p. 10) that suggests to adopt: Transverse Mercator map projection (TMzn) for conformal pan-European mapping at scales larger than 1:500 000; Lambert Azimuthal Equal-Area map projection (LAEA) for the statistical analysis and display; Lambert Conformal Conic map projection (LCC) for conformal pan-European mapping at scales smaller or equal to 1:500 000.
For the LCC map projection, we also follow the recommendation by EuroGeographics ( [2], p. 40) to consider this projection with two parallels of conserved scale. Therefore, our study with LCC map projection will also take into account the change of the upper parallel from the extreme north of Portugal to a much more southerly position in the northern extreme of the Algarve.

Official administrative maps of the Algarve
The procedure we use to obtain the distinct official maps of the Algarve we work out in this study, is described in what follows (see also Diagram 1 below). Departing from the OAM Portugal, 86,868 pairs of coordinate points, that represent the mainland of the Algarve region, were selected with the software ArcGIS (Release 10.2.1) and then exported to an Excel spreadsheet. This new set of geographic coordinates is denoted in the sequel by Official Administrative Map of the Algarve (OAM Algarve). To obtain the OAM Algarve, we should mention that we did not took into account none of the islets in the Algarve shore, which in most cases have areas less than 2 ha. Then, applying the algorithm of the inverse TMzn map projection (see Appendix B) to the OAM Algarve, we obtain the geodetic network of the Algarve (Geodetic Algarve). Next, applying the algorithms of the direct LAEA and LCC map projections (see Appendices C and D), we project the Geodetic Algarve giving rise to another two sets of geographic coordinates of the Algarve that we also denote by OAM Algarve. Whenever there is danger of ambiguity, we will always mention what projection gave rise to the considered OAM Algarve, as shown in Diagram 1.
The geodetic coordinates at the origin of rectangular coordinates and the false easting and false northing, we adopt here to obtain the distinct OAM Algarve, are the ones suggested by PT-TM06 (see Table A-3 in the Appendix A). In the particular case of the OAM Algarve obtained by the application of the LCC map projection, the upper and lower parallels, that we here consider, correspond to the latitude components of the geodetic coordinates of the northern and southern geodetic vertex we took from the national geodetic network of Portugal that is in force [17] (see Table 2 below).
All the computations we do to produce the Geodetic Algarve and the two OAM Algarve obtained by using LAEA and LCC map projections, are performed with the software Maple (Release 18). As for the figures, they are produced with the software ArcGIS, which, for designing the map of each OAM Algarve, has revealed better graphics than Maple. For the computations, we choose to use Maple instead of ArcGIS, because in the latter we cannot access the expressions of the mathematical formulae that are being used.

New administrative maps of the Algarve
In the next stage, we use the formulae (2), (3), (6) and (7) to compute the area, different notions of perimeter and the centroid of each polygon representing the OAM Algarve and that results by the application of TMzn, LAEA and LCC map projections. Using now the geodetic coordinates of the centroid (geographic center) of each OAM Algarve as the origin of rectangular coordinates, we project again the Geodetic Algarve with all the considered map projections. With this procedure, we obtain three distinct maps that we denote each as New Administrative Map of the Algarve (NAM Algarve), and for which we will also mention the underlying map projection whenever there is danger of ambiguity. It should be mentioned here that, besides the origin of rectangular coordinates, the only change in the parameters values of Table A-3 in the  Appendix A and of Table 2 above, is that the upper parallel, used in the algorithms of both direct and inverse LCC map Diagram 1. General procedure and used softwares.
projection, moves to a latitude inside the Algarve region. With this respect, we consider the northernmost geodetic vertex of the Algarve region in the national geodetic network of Portugal that is in force [17] (see Table 3 below).
For each NAM Algarve, that results by the application of TMzn, LAEA and LCC map projections, we again use the formulae (2), (3), (6) and (7) to compute the area, perimeters and the centroid of each polygon that represents the NAM Algarve. For each used map projection, we perform a comparison analysis of the maps and of the attributes of area, perimeter and centroid that result by changing from the OAM Algarve to the NAM Algarve. In Diagram 2 we present, in a schematic form, this procedure as well as the analysis that we do in the sequel.
The notations TMzn À1 , LAEA À1 and LCC À1 , considered in Diagram 2, stand for the inverse TMzn, LAEA and LCC map projections, respectively. Moreover, by the notation OC Portugal and OC Algarve, we mean the geodetic coordinates at the origin of rectangular coordinates given by PT-TM06 (see Table A-3 in the Appendix A) for mainland Portugal and given by the geographic center of the Algarve, respectively. In this part, we again perform all the computations with the software Maple and the figures are produced with the software ArcGIS.

Root mean square error
Besides the maps and the attributes of area, perimeter and centroid, for the discussion of our results we also use the average magnitude of the error that results from passing from the OAM Algarve to the NAM Algarve with each considered map projection. To evaluate this average magnitude of the error, we use the root mean squared error (RMSE), i.e. the square root of the average of squared differences between the data of the OAM Algarve and of the NAM Algarve. We consider reference [18] for the formula of the horizontal RMSE, where RMSE x and RMSE y are the root mean squared errors in each component of the dataset coordinate values, Here, (x i , y i ) are the coordinates of the i-th check point in the data sets of the representations of the Algarve with the origin of rectangular coordinates given by PT-TM06 (see Table A-3 in the Appendix A). The coordinates of the i-th check point in the data sets with the origin of rectangular coordinates given by each centroid, is denoted here by ðx i ;ŷ i Þ. We also compute the ratio between RMSE x and RMSE y for each dataset of the OAM Algarve and of the NAM Algarve.

Results
In this section, we analyze the problem with the map projections recommended to be used by EuroGeographics ([2], p. 10) (see Sects. 2.3 and 3.1). We start this analysis with the Transverse Mercator map projection, then we consider the Lambert Azimuthal Equal-Area map projection and finally we conclude the analysis with the Lambert Conformal Conic map projection.
In Tables 4-6, we compare the area, perimeter and geographic center of the Algarve when it is represented by the maps obtained from the OAM Algarve and the NAM Algarve and that result by the application of the TMzn, LAEA and LCC map projections in each case.
In Table 6 below, besides a comparison analysis similar to the one made in Tables 4 and 5, we also present the information of the chosen upper and lower parallels in the application of the LCC map projection.
Sometimes there is a practical interest to know the extent of some particular sections of the border of a given region, whether they are on land or at the coast. In Tables 7-9 we compare lengths of different sections within the Algarve border, specifically the extension of land and coastal boundary lines and, within these, the extent of the border that separates the Algarve from Alentejo, the border with Spain along Guadiana River and the extension of the South and West coasts of the Algarve.
As we did for Table 6 above, we also mention here, that in Table 9 below, we additionally present the information of the chosen upper and lower parallels in the application of the LCC map projection.
In Figures 2-4 we overlay the maps obtained from the OAM Algarve and the NAM Algarve, that result by the application of the TMzn, LAEA and LCC map projections, respectively. For each map projection, the maps resulting from the OAM Algarve and the NAM Algarve are overlapped so that the centroids coincide at the same point. For all the maps represented in Figures 2-4, we choose the same reference point, with the geodetic coordinates 37°18 0 16 00 N and 08°52 0 31 00 W. Near this point, we do enough zoom in so that the differences between the maps resulting from the OAM Algarve and the NAM Algarve can be noticed in each case.
In Table 10 we compute the root mean squared error (RMSE) that results by passing from the OAM Algarve to the NAM Algarve with each considered map projection. In this case, RMSE values give the square root of the average of the set of squared differences between dataset coordinate values of the representations of the Algarve, by using TMzn,

Discussion
In this work, we have performed an analysis of the cartographic representations of the Algarve with TMzn, LAEA and LCC map projections. This analysis took into account the change of the geodetic coordinates of the origin of rectangular coordinates to the geographic center of the Algarve. For the LCC map projection, the considered upper parallel had also to be moved to a latitude inside the Algarve. With these modifications we introduced, the resulting maps, as well as the studied attributes, underwent some changes. Depending on the map projection under consideration, or on the studied attribute, these changes can be more or less noticed. With respect to the area attribute, as we can see in Table 11, this study shows, as it was expected, that the conformal map projections TMzn and LCC are the most affected by the change of the origin of rectangular coordinates. For the LCC map projection, the area is not only affected by this change, but rather more by the confinement of the upper parallel within the Algarve region. In this case, the change in area, and in lesser dimension in perimeter, is substantially affected, which shows that when using the LCC map projection the upper and lower parallels   need always to be confined within the region under study. We this study, we can confirm that, for the LCC map projection, the distortion of area increases away from the standard parallels [13,14]. In general, the geographic center of the Algarve is not so affected by these changes, in particular for the conformal map projections. With respect to the perimeter, this depends on the shape of the mapped region and therefore conformal maps give more accurate values. The area, as it was expected, was not so affected by moving the origin of rectangular coordinates in the application of the LAEA map projection. This confirms what is know, that LAEA map projection is the only one that can accurately represent both area and true direction from the center of the projection and which can be located anywhere [13,14].
In what regards to the maps produced with each map projection, we observe that there are no significant differences, which is largely due to the small size of the Algarve. However, if, for each map projection, we zoom in sufficiently, we can see that distances, measured from the geographic center to the same geodetic point of coordinates on the Algarve border, change when passing from the map produced with the OAM Algarve to the map produced with the NAM Algarve. In Figure 2, obtained with the Mzn map projection, we realize that the differences are only observed for a resolution of up to 1 m, whereas in Figure 3, obtained with the LAEA map projection, the differences are already noticed for a resolution of up    to 10 m. With this respect, the major difference is observed in Figure 4, obtained with the LCC map projection, where the differences are well observed for a resolution of up to 20 m. The maps resulting from the TMzn map projection (see Fig. 2) were expected since, in our study, the origin of coordinates was moved from the center of mainland Portugal to a southernmost location, but the longitudinal change was not nearly noticed. If, on the contrary, the longitudinal change had been much more noticeable than the latitudinal one, then the differences would be much more significant. This problem would be even worse if the central meridian of the projection was moved [13,14], a situation which may well occur when crossborder studies are carried out, for instance between the Algarve and Andalusia (Spain). About the maps obtained with the LAEA map projection (see Fig. 3), although, as we saw above, there are some shape differences, the corresponding areas are practically equal. As for the maps produced with the LCC map projection (see Fig. 4), we observed that distances measured from the center of the projection are altered from up 20 m. In many parts of the western coast of the Algarve, this difference can mean being on a cliff top or already in the sea, inside water. These differences are mainly due to a change of the upper parallel of more than 4 (4°37 0 19.0948 00 ) to a southern location. However, if the lower and upper parallels remain within the study region, this projection is potentially very useful for cross-border studies, as for instance between the Algarve and Andalusia, since their maps can be edge-joined in a east-west direction. Table 10 shows that the value of the horizontal RMSE (root mean squared error) is increasing by the application of the TMzn, LAEA or LCC map projection, being the first one very small as it was expected from the previous results. The Ratio shows that, only for the LAEA map projection, the value of the RMSE in both coordinates is very similar. For the other map projections, the RMSE x and RMSE y values show differences with some meaning, particularly for the LCC map projection. The main interpretation we can withdraw from Table 12, is that the dataset of the OAM Algarve has much lesser deviation, both horizontal and vertical, from the dataset of the NAM Algarve for the TMzn map projection than for the LAEA and LCC map projections. With respect to only the horizontal component, the LAEA and LCC map projections show almost the same deviation when passing from the dataset of the OAM Algarve to the dataset of the NAM Algarve. For the vertical component, this no longer happens, and we observe that the LCC map projection stands out with the higher deviation.
In Table 12, we present the values of area and perimeter, as well as the location of the geographic center, that this study suggests to be considered for the Algarve, with respect to the NAM Portugal, and at different scales.
We found that the area of the Algarve differs a little bit from 4996.80 km 2 , the value that is considered by the national bodies that display statistical analysis for the region ([1], p. 17). But the value that differs most is the perimeter of the Algarve, 582 km displayed at ([1], p. 17), being the extent of the coast line responsible for this discrepancy. With this regard, compare the values of the length of the coast line we obtained in Tables 8 and 9 (around 297.8 km) and the value 318 km that is displayed at ([1], p. 17). 1 This difference might be due to the elimination of all islets from the Algarve coast that we did in our work. Our opinion is based in the fact that when we run the ArcGIS software to find the perimeter of the OAM Portugal for Algarve, without removing those islets, we found a similar value to the one displayed by ([1], p. 17). We think our approach is appropriated, because in a certain sense these islets artificially increase Algarve's perimeter. We note that already in Figure 1 we have shown the site (Benafim) where the geographic center of the Algarve is located. Although the  geographic center of the Algarve is more accurately given by TMzn and LCC map projections, as informed in Table 12, we can also say this site also holds for the centroid found with the LAEA map projection.
The main features of PT-TM06/ETRS89 we consider in this work are defined in Table A-3 and follow the orientations of the national authority [6].

Appendix B TMzn algorithms
The symbols, definitions and algorithms for both direct and inverse Transverse Mercator map projection written here are from ( [14], pp. 80-84) with the corrections made in ( [2], pp. 116-118). In Table B-1 we present the definitions and symbols used in the conversion formulae for the Transverse Mercator projection we use in our study.

Appendix C LAEA algorithms
The symbols, definitions and algorithms of the Lambert Azimuthal Equal-Area map projection we consider in our analysis are from ( [13], pp. 187-190) with the simplifications made in ( [2], pp. 123-125). In Table C-1 we present the definitions and symbols used in this work for the Lambert Azimuthal Equal-Area map projection.
Next, we start by writing the formulae for the computation of the direct conversion, but first, and due to the presence of an ellipsoid, the geodetic latitude / is converted to authalic latitude b. The general formulae to convert geodetic latitude and longitude (/, k) to northing Y and easting X start with, and correspondingly formulae for q 0 and q p obtained from (C.1) by replacing / with / 0 and 90°, respectively. The authalic latitude is determined by, with the formula for b 0 obtained from (C.2) by replacing there q with q 0 . The mapping radius at latitude 90°is given by, In order to achieve correct scale in all directions at the center of projection, a slight adjustment is made by using, Thus, inputting the geodetic coordinates (/, k), the northing and easting coordinates (X, Y) are determined by, where, The reverse formulae to derive the geodetic latitude and longitude of a point from its northing and easting values are, q ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi and R q is defined at (C.3).

Appendix D LCC algorithms
The symbols, definitions and algorithms we consider throughout this work for the Lambert Conformal Conical Projection follow the approach of ([2], pp. 119-122). However, in order to fix some typos we have detected, we needed the original reference ( [14], pp. 136-139). In Table D-1 we present the definitions and symbols used for the Lambert Conformal Conical Projection that had to be considered.
The formula we consider for the isometric latitude of the lower parallel is, Q l :¼ 1 2 ln 1 þ sinð/ l Þ 1 À sinð/ l Þ À e ln 1 þ e sinð/ l Þ 1 À e sinð/ l Þ ! : ðD:1Þ The formulae are mutatis mutandis the same for the isometric latitudes of the upper parallel, of the projection origin and of the grid origin, Q u , Q 0 and Q b , respectively. The used ellipsoid constants are: W l :¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1 À e 2 sinð/ l Þ 2 q ; and mutatis mutandis for W u and W 0 . Observe that the constants and expressions within Lambert's conical mapping equations are ellipsoid and zone specific. The formula for the sine of the central parallel is given by The mapping radius at the equator and at the central parallel are computed by using, respectively, the following formulae, K ¼ a cosð/ l Þ expðQ l sinð/ 0 ÞÞ W l sinð/ 0 Þ ¼ a cosð/ u Þ expðQ u sinð/ 0 ÞÞ W u sinð/ 0 Þ R 0 ¼ K expðQ b sinð/ 0 ÞÞ ;

ðD:2Þ
where exp(x) denotes the exponential function of natural basis, the Neper number, approximated here by exp (1) = 2.7182818284590452353602875. The formulae for computation of the direct conversion are given as follows. Inputting the geodetic coordinates (/, k) of a point P, its grid coordinates (E, N) are given by where the convergence angle c is determined by and the mapping radius R at latitude / is computed by formula (D.2) with Q b there replaced by Q, which in turn is computed by formula (D.1) with / l in this formula replaced by /. With respect to the formulae for computation of the inverse conversion they are given next. Inputting now the grid coordinates (E, N) of a point P, its geodetic coordinates (/, k) are given as follows. The geodetic longitude k is determined by where, in this case, the convergence angle is computed through, The geodetic latitude / is determined through an iterative scheme defined by, sinð/ nþ1 Þ ¼ sinð/ n Þ À g n h n ; n ! 1; where, sinð/ 1 Þ ¼ expð2QÞ À 1 expð2QÞ þ 1 ; g n ¼ 1 2 ln 1 þ sinð/ n Þ 1 À sinð/ n Þ À e ln 1 þ e sinð/ n Þ 1 À e sinð/ n Þ ! ; h n ¼ 1 1 À sin 2 ð/ n Þ À e 2 1 À e 2 sin 2 ð/ n Þ : This procedure must be iterated as needed to obtain / with sufficient accuracy. The expressions for the isometric latitude and for the mapping radius at sought latitude / are given, respectively, by, Cite this article as: de Oliveira HB, Granja-Martins F & Fernandez HM 2019. Map production and data analysis with local parameters. 4open, 2, 27.