[Tutor] To show the result on a map

Dennis Lee Bieber wlfraed at ix.netcom.com
Sun Mar 6 20:48:45 EST 2022


On Sun, 6 Mar 2022 15:10:18 -0800, <subodh.khandelwal at gmail.com> declaimed
the following:

>I would like to show the most_unsafe and most_safe areas in the map of
>Seattle. Can someone please help me with the code for this? In case you need
>any more information, please let me know.
>

	You'll need to define where the map itself is coming from, how
coordinates equate to map points, etc.

	The solution will vary significantly from using, say, Google Maps (sign
up for access to the API)

https://medium.com/future-vision/google-maps-in-python-part-2-393f96196eaf

... to ArcGIS which has its own API for Python.

	Are you simply wanting to identify /points/, or draw /regions/ -- I
don't think Google Maps does regions, only points.

	The Plotly package can apparently draw maps -- but you need to
subscribe to some map provider for the actual maps it works with; otherwise
it may just do polygonal data from coordinates.

	Are you scanning USGS topographic maps into image files -- then you
need image manipulation and some way of encoding lat/long into pixels.

https://towardsdatascience.com/creating-beautiful-maps-with-python-6e1aae54c55c
https://towardsdatascience.com/making-artistic-maps-with-python-9d37f5ea8af0
This obtains the map vector data from a provider, then generates/saves
image files to use PhotoShop/GIMP for adding overlays -- you might be able
to do that part using the Python Imaging Library (but again, knowing how to
map coordinates into the image is going to be a factor).

https://www.earthdatascience.org/courses/scientists-guide-to-plotting-data-in-python/plot-spatial-data/customize-raster-plots/interactive-maps/



-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/



More information about the Tutor mailing list