diff --git a/docs/html/NormalsRegularizationBorders.html b/docs/html/NormalsRegularizationBorders.html
index 79e800f2..634eaf32 100644
--- a/docs/html/NormalsRegularizationBorders.html
+++ b/docs/html/NormalsRegularizationBorders.html
@@ -92,6 +92,8 @@
NormalsRegularizationBorders
| filename | |
| grid | nodal point distribution of parameters, e.g harmonics splines |
| border | regularization areas, e.g land and ocean |
+ | double | reference radius for ellipsoidal coordinates for border |
+ | double | reference flattening for ellipsoidal coordinates for border, 0: spherical coordinates |
diff --git a/docs/latex/programs.auto.tex b/docs/latex/programs.auto.tex
index c6fe95fc..47799d80 100644
--- a/docs/latex/programs.auto.tex
+++ b/docs/latex/programs.auto.tex
@@ -5450,6 +5450,8 @@ \subsection{NormalsRegularizationBorders}\label{NormalsRegularizationBorders}
\hfuzz=500pt\includegraphics[width=1em]{element-mustset.pdf}~outputfileOutside & \hfuzz=500pt filename & \hfuzz=500pt \\
\hfuzz=500pt\includegraphics[width=1em]{element-mustset-unbounded.pdf}~grid & \hfuzz=500pt \hyperref[gridType]{grid} & \hfuzz=500pt nodal point distribution of parameters, e.g harmonics splines\\
\hfuzz=500pt\includegraphics[width=1em]{element-mustset-unbounded.pdf}~border & \hfuzz=500pt \hyperref[borderType]{border} & \hfuzz=500pt regularization areas, e.g land and ocean\\
+\hfuzz=500pt\includegraphics[width=1em]{element.pdf}~R & \hfuzz=500pt double & \hfuzz=500pt reference radius for ellipsoidal coordinates for border\\
+\hfuzz=500pt\includegraphics[width=1em]{element.pdf}~inverseFlattening & \hfuzz=500pt double & \hfuzz=500pt reference flattening for ellipsoidal coordinates for border, 0: spherical coordinates\\
\hline
\end{tabularx}
diff --git a/groops.xsd b/groops.xsd
index da8d3b7d..bf42ca93 100644
--- a/groops.xsd
+++ b/groops.xsd
@@ -16924,6 +16924,16 @@
regularization areas, e.g land and ocean
+
+
+ reference radius for ellipsoidal coordinates for border
+
+
+
+
+ reference flattening for ellipsoidal coordinates for border, 0: spherical coordinates
+
+
diff --git a/source/programs/normals/normalsRegularizationBorders.cpp b/source/programs/normals/normalsRegularizationBorders.cpp
index e67b6bb9..14399b0b 100644
--- a/source/programs/normals/normalsRegularizationBorders.cpp
+++ b/source/programs/normals/normalsRegularizationBorders.cpp
@@ -61,14 +61,18 @@ void NormalsRegularizationBorders::run(Config &config, Parallel::CommunicatorPtr
FileName insideName, outsideName;
GridPtr grid;
BorderPtr border;
+ Double a, f;
readConfig(config, "outputfileInside", insideName, Config::MUSTSET, "", "");
readConfig(config, "outputfileOutside", outsideName, Config::MUSTSET, "", "");
readConfig(config, "grid", grid, Config::MUSTSET, "", "nodal point distribution of parameters, e.g harmonics splines");
readConfig(config, "border", border, Config::MUSTSET, "", "regularization areas, e.g land and ocean");
+ readConfig(config, "R", a, Config::DEFAULT, STRING_DEFAULT_GRS80_a, "reference radius for ellipsoidal coordinates for border");
+ readConfig(config, "inverseFlattening", f, Config::DEFAULT, STRING_DEFAULT_GRS80_f, "reference flattening for ellipsoidal coordinates for border, 0: spherical coordinates");
if(isCreateSchema(config)) return;
+ Ellipsoid ellipsoid(a, f);
std::vector points = grid->points();
logInfo<<" nodal points: "<isInnerPoint(points.at(k)))
+ if(border->isInnerPoint(points.at(k), ellipsoid))
diag1(k)=1;
else
diag2(k)=1;