How to overlay a map on a radar style display

I have built a radar simulator and display. The range and azimuth are fed to the Processing program via USB serial. I have a timebase rotating around the screen, following the azimuth being sent to the USB serial. I have used pushMatrix() and popMatrix() to create the animation. Up to here everything is working fine.

Now I want to overlay a map in a way that the location of my Latitude/Longitude on the map, is at the centre of the radar screen, so that the target blip I display, can be seen over a location on the map. Also, the map should be capable of variable transparency.

I don’t know how to do this. Or how and where to get a map tile and center it on my Lat/Long.

Please help with source of map tiles and how to get say, a map tile of 10km x 10km and centred on my Lat/Long.

TIA

Your question is not as simple at it seems. Real distances along map tiles depend on projection used.

Supposing you are limited to a small area, take a look at the openstreetmap Api.

If you just need a fixed map tile, you could use qgis to save a map as jpeg.

(You can adjust map transparency using the alpha channel of PImage).

Hi @rajiv.tctech ,

Maybe take a look at the Unfolding map library. It may have what you need

300 km is not too large a distance to worry about accuracy in a Mercator or Lambert’s projection. Moreover, for a radar looking at flying objects, exact position on the ground is an ephemeral coordinate. i isn’t the precision of the coordinates I was seeking, but the sources of such data and how to do it offline…

You can find how to download openstreetmap tiles here:
https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
Once you have the tiles, you can use them offline.

Or, if you are going to use a fixed small area, you can use GIS software (such as the expensive ArcGIS or the free QGIS) to get the map for your area.

Thank you! Thank you very much… :slightly_smiling_face:

My requirement is like this - I need a 350 km x 350 km area on a map, to be accommodated within a square of 700 x 700 pixels, with my chosen Lat/Long at the center of the square. Is there an app or a method to do this?