int usage(int retval, bool brief) { if (brief) ( retval ? std::cerr : std::cout ) << "Usage:\n" " ConicProj ( -c | -a ) lat1 lat2 [ -l lon0 ] [ -k k1 ] [ -r ] [ -e a f ]\n" " [ -w ] [ -p prec ] [ --comment-delimiter commentdelim ] [ --version |\n" " -h | --help ] [ --input-file infile | --input-string instring ] [\n" " --line-separator linesep ] [ --output-file outfile ]\n" "\n" "For full documentation type:\n" " ConicProj --help\n" "or visit:\n" " https://geographiclib.sourceforge.io/1.50.1/ConicProj.1.html\n"; else ( retval ? std::cerr : std::cout ) << "Man page:\n" "NAME\n" " ConicProj -- perform conic projections\n" "\n" "SYNOPSIS\n" " ConicProj ( -c | -a ) lat1 lat2 [ -l lon0 ] [ -k k1 ] [ -r ] [ -e a f ]\n" " [ -w ] [ -p prec ] [ --comment-delimiter commentdelim ] [ --version |\n" " -h | --help ] [ --input-file infile | --input-string instring ] [\n" " --line-separator linesep ] [ --output-file outfile ]\n" "\n" "DESCRIPTION\n" " Perform one of two conic projections geodesics. Convert geodetic\n" " coordinates to either Lambert conformal conic or Albers equal area\n" " coordinates. The standard latitudes lat1 and lat2 are specified by\n" " that the -c option (for Lambert conformal conic) or the -a option (for\n" " Albers equal area). At least one of these options must be given (the\n" " last one given is used). Specify lat1 = lat2, to obtain the case with\n" " a single standard parallel. The central meridian is given by lon0.\n" " The longitude of origin is given by the latitude of minimum (azimuthal)\n" " scale for Lambert conformal conic (Albers equal area). The (azimuthal)\n" " scale on the standard parallels is k1.\n" "\n" " Geodetic coordinates are provided on standard input as a set of lines\n" " containing (blank separated) latitude and longitude (decimal degrees or\n" " degrees, minutes, seconds); for details on the allowed formats for\n" " latitude and longitude, see the \"GEOGRAPHIC COORDINATES\" section of\n" " GeoConvert(1). For each set of geodetic coordinates, the corresponding\n" " projected easting, x, and northing, y, (meters) are printed on standard\n" " output together with the meridian convergence gamma (degrees) and\n" " (azimuthal) scale k. For Albers equal area, the radial scale is 1/k.\n" " The meridian convergence is the bearing of the y axis measured\n" " clockwise from true north.\n" "\n" " Special cases of the Lambert conformal projection are the Mercator\n" " projection (the standard latitudes equal and opposite) and the polar\n" " stereographic projection (both standard latitudes correspond to the\n" " same pole). Special cases of the Albers equal area projection are the\n" " cylindrical equal area projection (the standard latitudes equal and\n" " opposite), the Lambert azimuthal equal area projection (both standard\n" " latitude corresponds to the same pole), and the Lambert equal area\n" " conic projection (one standard parallel is at a pole).\n" "\n" "OPTIONS\n" " -c lat1 lat2\n" " use the Lambert conformal conic projection with standard parallels\n" " lat1 and lat2.\n" "\n" " -a lat1 lat2\n" " use the Albers equal area projection with standard parallels lat1\n" " and lat2.\n" "\n" " -l lon0\n" " specify the longitude of origin lon0 (degrees, default 0).\n" "\n" " -k k1\n" " specify the (azimuthal) scale k1 on the standard parallels (default\n" " 1).\n" "\n" " -r perform the reverse projection. x and y are given on standard\n" " input and each line of standard output gives latitude, longitude,\n" " gamma, and k.\n" "\n" " -e a f\n" " specify the ellipsoid via the equatorial radius, a and the\n" " flattening, f. Setting f = 0 results in a sphere. Specify f < 0\n" " for a prolate ellipsoid. A simple fraction, e.g., 1/297, is\n" " allowed for f. By default, the WGS84 ellipsoid is used, a =\n" " 6378137 m, f = 1/298.257223563.\n" "\n" " -w toggle the longitude first flag (it starts off); if the flag is on,\n" " then on input and output, longitude precedes latitude (except that,\n" " on input, this can be overridden by a hemisphere designator, N, S,\n" " E, W).\n" "\n" " -p prec\n" " set the output precision to prec (default 6). prec is the number\n" " of digits after the decimal point for lengths (in meters). For\n" " latitudes and longitudes (in degrees), the number of digits after\n" " the decimal point is prec + 5. For the convergence (in degrees)\n" " and scale, the number of digits after the decimal point is prec +\n" " 6.\n" "\n" " --comment-delimiter commentdelim\n" " set the comment delimiter to commentdelim (e.g., \"#\" or \"//\"). If\n" " set, the input lines will be scanned for this delimiter and, if\n" " found, the delimiter and the rest of the line will be removed prior\n" " to processing and subsequently appended to the output line\n" " (separated by a space).\n" "\n" " --version\n" " print version and exit.\n" "\n" " -h print usage and exit.\n" "\n" " --help\n" " print full documentation and exit.\n" "\n" " --input-file infile\n" " read input from the file infile instead of from standard input; a\n" " file name of \"-\" stands for standard input.\n" "\n" " --input-string instring\n" " read input from the string instring instead of from standard input.\n" " All occurrences of the line separator character (default is a\n" " semicolon) in instring are converted to newlines before the reading\n" " begins.\n" "\n" " --line-separator linesep\n" " set the line separator character to linesep. By default this is a\n" " semicolon.\n" "\n" " --output-file outfile\n" " write output to the file outfile instead of to standard output; a\n" " file name of \"-\" stands for standard output.\n" "\n" "EXAMPLES\n" " echo 39.95N 75.17W | ConicProj -c 40d58 39d56 -l 77d45W\n" " => 220445 -52372 1.67 1.0\n" " echo 220445 -52372 | ConicProj -c 40d58 39d56 -l 77d45W -r\n" " => 39.95 -75.17 1.67 1.0\n" "\n" "ERRORS\n" " An illegal line of input will print an error message to standard output\n" " beginning with \"ERROR:\" and causes ConicProj to return an exit code of\n" " 1. However, an error does not cause ConicProj to terminate; following\n" " lines will be converted.\n" "\n" "AUTHOR\n" " ConicProj was written by Charles Karney.\n" "\n" "HISTORY\n" " ConicProj was added to GeographicLib,\n" " , in version 1.9.\n" ; return retval; }