Browse files

pc_align: support custom csv format on input and output


  • Loading branch information...
1 parent 523b51f commit 1fda160304ee326ba4b3069ce3a7198ec8f0eb08 @oleg-alexandrov oleg-alexandrov committed Mar 1, 2014
Showing with 392 additions and 74 deletions.
  1. +2 −0 NEWS
  2. +18 −7 docs/book/tools.tex
  3. +372 −67 src/asp/Tools/
@@ -25,6 +25,8 @@ GENERAL
- Improved mosacking of Digital Globe images.
- pc_align:
+ * Read and write CSV files in a wide variety of formats, using the
+ --csv-format option.
* Display the translation component of the rigid alignment transform
in the local North-East-Down coordinate system.
* Save to disk the convergence history (iteration information).
@@ -760,15 +760,17 @@ \section{pc\_align}
The input point clouds can be in one of several formats: ASP's point
cloud format, DEMs as GeoTiff files, or plain-text CSV files (with .csv
-or .txt extension). CSV files are expected to have on each line the
-latitude, longitude, and height above the datum (separated by commas or
-spaces, with an optional header line), or to be in the LOLA RDR
-PointPerRow format.
+or .txt extension). By default, CSV files are expected to have on each
+line the latitude and longitude (in degrees), and the height above the datum
+(in meters), separated by commas or spaces, with an optional header
+line. Alternatively, the user can specify the format of the CSV file via
+the \texttt{-\/-csv-format} option. The tool can also auto-detect the
+LOLA RDR PointPerRow format.
If none of the input files are a DEM, from which the datum can be
-inferred, the datum needs to be specified by the user via the
-\texttt{-\/-datum} option, or by setting \texttt{-\/-semi-major-axis} and
+inferred, and the CSV file format is not in Cartesian coordinates, the
+datum needs to be specified via the \texttt{-\/-datum} option, or by
+setting \texttt{-\/-semi-major-axis} and \texttt{-\/-semi-minor-axis}.
The transform obtained by \texttt{pc\_align} is output to a file as a
$4\times 4$ matrix, with the upper-left $3\times 3$ submatrix being the
@@ -851,6 +853,15 @@ \section{pc\_align}
\texttt{-\/-highest-accuracy} & Compute with highest accuracy for point-to-plane (can be much slower). \\ \hline
\texttt{-\/-datum \textit{}} & Use this datum for CSV files. [WGS\_1984, D\_MOON (radius is assumed to be 1737400 meters), D\_MARS (radius is assumed to be 33916190 meters), etc.] \\ \hline
+\texttt{-\/-csv-format \textit{arg}} & Specify the format of input CSV
+files as a list of entries column\_index:column\_type (indices start from
+1). Examples: '1:x 2:y 3:z' (a Cartesian coordinate system with origin
+at planet center is assumed, with the units being in meters), '5:lon
+6:lat 7:radius\_m' (longitude and latitude are in degrees, the radius is
+measured in meters from planet center), '3:lat 2:lon
+1:height\_above\_datum' (the height above datum is in meters). Can also
+use radius\_km for column\_type, when it is again measured from planet center. \\ \hline
\texttt{-\/-semi-major-axis \textit{double}} & Explicitly set the datum semi-major axis in meters.\\ \hline
\texttt{-\/-semi-minor-axis \textit{double}} & Explicitly set the datum semi-minor axis in meters.\\ \hline
Oops, something went wrong.

0 comments on commit 1fda160

Please sign in to comment.