pyguymer3.geo.create_map_of_points¶
- pyguymer3.geo.create_map_of_points(pntLons, pntLats, pngOut, /, *, angConv=0.1, background='NE', chunksize=1048576, conv=1000.0, debug=True, eps=1e-12, exiftoolPath=None, extent=None, fillColor=(1.0, 0.0, 0.0), fov=None, gifsiclePath=None, jpegtranPath=None, method='GeodesicBox', name='natural-earth-1', nAng=9, nIter=100, nRefine=1, onlyValid=False, optipngPath=None, padDist=22224.0, prefix='.', ramLimit=1073741824, repair=False, resolution='10m', route=None, routeFillColor=(0.0, 0.5019607843137255, 0.0), satellite_height=False, scale=1, skipFillColor=(1.0, 0.6470588235294118, 0.0), skips=None, timeout=60.0, title=None, tol=1e-10, useSciPy=False)[source]¶
Save a PNG map of a sequence of points
This function accepts a sequence of longitudes and latitudes then saves a PNG map containing all of them drawn together in a big line.
- Parameters:
pntLons (numpy.ndarray) – the sequence of longitudes
pntLats (numpy.ndarray) – the sequence of latitudes
pngOut (str) – the name of the output PNG
angConv (float, optional) – the angle change which classifies as converged (in degrees)
background (str, optional) – the type of background to add (recognised values are: “GSHHG”; “image”; “NE”; “none”; and “OSM”)
chunksize (int, optional) – the size of the chunks of any files which are read in (in bytes)
conv (float, optional) – the Geodesic distance that defines the middle as being converged (in metres)
debug (bool, optional) – print debug messages and draw the circle on the axis
eps (float, optional) – the tolerance of the Vincenty formula iterations
exiftoolPath (str, optional) – the path to the “exiftool” binary (if not provided then Python will attempt to find the binary itself)
extent (list of floats) – for high-resolution images, save time by specifying the extent that is to be added
fillColor (tuple of int, optional) – the fill colour of the points
fov (None or shapely.geometry.polygon.Polygon, optional) – clip the plotted shapes to the provided field-of-view to work around occaisional MatPlotLib or Cartopy plotting errors when shapes much larger than the field-of-view are plotted
gifsiclePath (str, optional) – the path to the “gifsicle” binary (if not provided then Python will attempt to find the binary itself)
jpegtranPath (str, optional) – the path to the “jpegtran” binary (if not provided then Python will attempt to find the binary itself)
method (str, optional) – the method for finding the middle of the points
name (str, optional) – the name of the image in the database
nAng (int, optional) – the number of angles around the middle location to search over
nIter (int, optional) – the maximum number of iterations (particularly the Vincenty formula)
nRefine (int, optional) – the number of refinements to make (each refinement halves the “conv” distance)
onlyValid (bool, optional) – only return valid Polygons (checks for validity can take a while, if being called often)
optipngPath (str, optional) – the path to the “optipng” binary (if not provided then Python will attempt to find the binary itself)
padDist (float, optional) – the padding to draw around the points (in metres)
prefix (str, optional) – change the name of the output debugging CSVs
ramLimit (int, optional) – the maximum RAM usage of each “large” array (in bytes)
repair (bool, optional) – attempt to repair invalid Polygons
resolution (str, optional) – the resolution of the image or NE dataset or GSHHG dataset
route (shapely.geometry.linestring.LineString, optional) – an extra line to draw on the map
routeFillColor (tuple of int, optional) – the fill colour of the extra route
satellite_height (float, optional) – if a distance is provided then use a “NearsidePerspective” projection at an altitude which has the same field-of-view as the distance
scale (int, optional) – the scale of the tiles
skipFillColor (tuple of int, optional) – the fill colour of the skipped points
skips (numpy.ndarray, optional) – an array of booleans as to whether to include/exclude each individual point from calculating the image’s field-of-view (this allows the great circles from flights to be drawn but for them to not expand the image to fit in the departing airport); if not provided then all points are used
timeout (float, optional) – the timeout for any requests/subprocess calls (in seconds)
title (str, optional) – the title
tol (float, optional) – the Euclidean distance that defines two points as being the same (in degrees)
useSciPy (bool, optional) – use “scipy.optimize.minimize” or my own minimizer
Notes
Copyright 2017 Thomas Guymer [1]
References