What is the easiest way to convert latitude and longitude to a point on a jpeg map?

I want to create an image showing the location of something and I know the GPS coordinates. What's the easiest workflow to show the location of those coordinates on a map?

Edit: I don't have a map image chosen yet.

23 points · 15 comments · view on lemmy.world

15 Comments

AbouBenAdhem@lemmy.world · 16 pts · 80d

If you use a plate carrée projection (in which all lines of latitude and longitude are rectangular and equal), it’s a simple linear formula:

x = (longitude + 180) * (map width / 360)
y = (-latitude + 90) * (map height / 180)

(Assuming west and south coordinates are negative, and all degrees are expressed as decimals.)

Shimitar@downonthestreet.eu · 7 pts · 80d (4 replies)

You need to know the map projection and coordinate system...

After you know all that, you can use some math to convert.

sudoMakeUser@sh.itjust.works · 1 pts · 80d (1 reply)

With the Mercator projection this would be pretty easy. As your projections get more wild so will the math.

Shimitar@downonthestreet.eu · 1 pts · 80d

Op didn't specify Mercator projection.... If referring to paper maps scanned or something similar, everything might be. Maybe UTM maybe worse

HobbitFoot@thelemmy.club · 1 pts · 80d (1 reply)

I need a map for that.

Shimitar@downonthestreet.eu · 0 pts · 80d

Ooenstreetmap Google Maps or Scan your own. I don't think there are other choices.

trxxruraxvr@lemmy.world · 6 pts · 80d

Start by choosing a map projection then find a map that matches that projection and use the appropriate conversion.

grandel@lemmy.ml · 4 pts · 80d (5 replies)

Can you enter them into open street maps or google maps and take a screenshot?

HobbitFoot@thelemmy.club · 1 pts · 80d (4 replies)

I want something more zoomed out and cleaner.

GamingChairModel@lemmy.world · 3 pts · 80d

If you're ok zooming out far enough you can serve a static image of the pale blue dot and a red arrow pointing to it.

homesweethomeMrL@lemmy.world · 3 pts · 80d (1 reply)
HobbitFoot@thelemmy.club · 3 pts · 80d

I'm going to have to look at that, that seems to be the closest to what I'm looking for. Thanks.

Rhynoplaz@lemmy.world · 1 pts · 80d

Type the coordinates into Google maps to find the location.

Then just make a dot on any other map in the same place.

Patnou@lemmy.world · 1 pts · 80d (1 reply)

Isn't there like a convertor for this...not being rude but I had to do this a while back. Let me go and see if I can find it against. It would convert anything to any size. How big is your jpeg map btw?

HobbitFoot@thelemmy.club · 1 pts · 80d

I don't have one yet.