| 4869 | } |
| 4870 | |
| 4871 | GMT_LOCAL double gmtplot_get_local_scale (struct GMT_CTRL *GMT, double lon0, double lat0, double length, double azimuth) { |
| 4872 | /* Determine the local scale at lon0,lat in the direction azimuth using a test distance length in degrees. |
| 4873 | * The scale returned can be used to convert a map distance in inch to great circle degrees. |
| 4874 | * This is approximate only. */ |
| 4875 | |
| 4876 | double tlon, tlat, x0, y0, x1, y1; |
| 4877 | gmtlib_get_point_from_r_az (GMT, lon0, lat0, length, azimuth, &tlon, &tlat); /* Arbitrary 2nd point near (lon0,lat0) in the azimuth direction */ |
| 4878 | gmt_geo_to_xy (GMT, lon0, lat0, &x0, &y0); /* Get map position in inches for (lon0,lat0) */ |
| 4879 | gmt_geo_to_xy (GMT, tlon, tlat, &x1, &y1); /* Get map position in inches for close point */ |
| 4880 | return (length / hypot (x1 - x0, y1 - y0)); /* This scales a length in inches to degrees, approximately */ |
| 4881 | } |
| 4882 | |
| 4883 | GMT_LOCAL void gmtplot_circle_pen_poly (struct GMT_CTRL *GMT, double *A, double *B, bool longway, double rot, struct GMT_PEN *pen, struct GMT_SYMBOL *S, struct GMT_CIRCLE *C, double scale) { |
| 4884 | /* Given vectors A and B, return a small circle polygon path sampled every step that approximates a pen of given width |
no test coverage detected