Jump to content

Plotting on a MAP image.


lynxus

Recommended Posts

Hi guys,

 

Im having a terrible problem finding any help on google, So wondered if anyone here can help.

 

I have a map of the UK as an image.

 

I then have a big txt file full of Lat and long values with the time. ( Im trying to plot lightning strikes )

 

Anyway, How do i go about this? Please bear in mind im fairly new to php.

Just the basic plotting of the lat longs should get me started. I just dont know where to start :(

 

 

Any ideas?

 

-G

 

 

 

 

Link to comment
Share on other sites

Well, the first thing you'd need are the latitudes and longitudes of the four corners of your map. Without that, you cant really do anything -- you need a reference point to be able to plot the others. I suppose you could go for a rough estimate of the latitude and longitude of, say, central London and then estimate it's position on the map and go from there.

 

You'll then need to convert your latitudes and longitudes to positions (e.g. pixels) on the map by using a scale.

 

Then you'd need the gd library functions (http://www.php.net/gd) to be able to put something on top of the image.

 

In short, its not that easy :P

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.