# How to overlay a map on a radar style display

**URL:** https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498
**Category:** Electronics (Arduino, etc.)
**Created:** [January 7, 2022, 7:55am UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498 "2022-01-07T07:55:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rajiv.tctech](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rajiv.tctech](https://discourse.processing.org/u/rajiv.tctech)
#### Post date: [January 7, 2022, 7:55am UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498/1 "2022-01-07T07:55:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)
#### Post date: [January 7, 2022, 11:03am UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498/2 "2022-01-07T11:03:57Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![MiguelSanches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/miguelsanches/32/11172_2.png) [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)
#### Post date: [January 7, 2022, 11:44am UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498/3 "2022-01-07T11:44:58Z")

</div>

Hi @rajiv.tctech ,

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

> **[Unfolding Maps: Getting Started in Processing](http://unfoldingmaps.org/tutorials/getting-started-in-processing.html)**
>
> This introduction covers the setup of the Unfolding library in Processing and the first simple map.

---

<div class="post-metadata">

### Author: ![rajiv.tctech](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rajiv.tctech](https://discourse.processing.org/u/rajiv.tctech)
#### Post date: [January 13, 2022, 7:44am UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498/4 "2022-01-13T07:44:11Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)
#### Post date: [January 13, 2022, 10:29pm UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498/5 "2022-01-13T22:29:47Z")

</div>

You can find how to download openstreetmap tiles here:  
[https://wiki.openstreetmap.org/wiki/Slippy\_map\_tilenames](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.

---

<div class="post-metadata">

### Author: ![rajiv.tctech](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rajiv.tctech](https://discourse.processing.org/u/rajiv.tctech)
#### Post date: [January 14, 2022, 2:51am UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498/6 "2022-01-14T02:51:07Z")

</div>

Thank you! Thank you very much… 🙂

---

<div class="post-metadata">

### Author: ![rajiv.tctech](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rajiv.tctech](https://discourse.processing.org/u/rajiv.tctech)
#### Post date: [January 14, 2022, 7:24am UTC](https://discourse.processing.org/t/how-to-overlay-a-map-on-a-radar-style-display/34498/7 "2022-01-14T07:24:15Z")

</div>

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?
