Converting longitude and latitude

Posted on 2003-02-24
Medium Priority
Last Modified: 2012-06-27
I have a flat image map and a load of decimal longitude and latitude co-ordinates.  What I would like is some routine that I can run using Unix (or some formula) to convert the latitude and longitude values to pixel co-ordinates so I can place little red dots on my map
Question by:russ4ell
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3

Expert Comment

ID: 8044188
the image needs to be in the same coordinate system as your point values (LL).  What software are you suing to view the "image map"?  and is this software capable of geocoding/plotting the LL points you have?  

Expert Comment

ID: 8052680
To do that you should make some conversion routine from those extent of lat-long, into pixel extent on image map area.

Ussualy the process done by add-on program runs on gis application such mapinfo,arcview or arcgis.

And the result is javascript contains selectable/ clickble polygon which the nodes generated by programs.

There are two programs works on arcview.
1. WebView
2. Alta4, HTML Image Mapper.

If you want to do that manually or traditional way without using GIS, then you can use adobe photoshop and write on the pixel coordinates, to be then used as nodes on image map parameters.


Assisted Solution

Cairotes earned 90 total points
ID: 8053309
You need to find the projection of the map. Is it UTM, Mercator, Lambert?

When you know, you convert the lat/long coordinates in E and N coordinates, use the scale factor of the map and you are thru.

e.g. If you know the map is UTM, find E/N coordiantes at tow angle and then you have your cartesian coordiantes for the rest of the map.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 8053534
I've just been given a flat image map.  From your comments I need to know how the flat image was created.  I'll try to get this and let you all know how I get on

Expert Comment

ID: 8059437
Ok wait & see. For Unix I wont be able to help but for the formula I probably would.
In the worst case, tell us how the map look like. The lat & long grid is made with parallel lines or is it curved?
Is there a vertical line? Waht are the lat & long of the corners? etc...and what is the scale...

Assisted Solution

maphew earned 90 total points
ID: 8134214
As the others have said, you need to know the projection of the image in order to know what coordinate system to use. If it is a tiff image, there is a good chance this info is encoded in the image itself. Get gdal[0] and run the 'gdalinfo' program against it. If there is any projection info gdal will find it.

If this doesn't work you'll need to either contact whoever made the image or do some grunt work comparing known points (not desired)  -- tip of this island is exactly xxx,yyy; while that road intersection is xxx,yyy; etc.

I found a couple of source code references online but I'm not a progammer so don't know how useful they might be.[1,2] If you ask on the FreeGIS[3] mailing list you are more likely to get a direct answer to your question.

[0] http://www.remotesensing.org/gdal/
[1] http://www.ncsa.uiuc.edu/Divisions/DMV/ALG/activities/projects/i2k/documentation/ncsa/d2k/modules/projects/i2k/libGeo/GeoFeature.html
[2] "Converting Pixel Coordinates to Latitude and Longitude" http://www.merrymeet.com/minow/SunSphereImage/SunSphereImage.html
[3] http://freegis.org/

Expert Comment

ID: 8482900
Depending upon the extent of the map (a local area, or a much larger area), all you *really* need to have is several ground-truth points (points on the map where you know the lat/lon - 3 is a minimum) - then use a basic rubber-sheeting algorithm which will get you as close as you likely need to be to simply put dots on maps -

Author Comment

ID: 9034695
what's a rubber-sheeting alogorithm and where can I get one please?

Author Comment

ID: 9034701
The map can be seen at www.doublerltd.com

Accepted Solution

gj62 earned 120 total points
ID: 9036160
Well, it depends how much you want to immerse yourself in this topic.  A basic algorithm can be found here, in section 3.3:


but implementation is anything but trivial.

Your best bet is to find a GIS package that includes rubber sheeting and use that, or find a GIS services company that can do it for you.  Let me know generally where you are and I might know of a company that could help.  Obviously, this would cost some money, but would save LOTS of time...

If you are familiar with image processing, check out morphing software that will essentially accomplish the same thing...

Sorry, don't have a free/easy solution for you...

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I feel like more and more people want to know how to programmatically convert addresses into geospatial locations. So in this article, I will show you how you can do it with Bing Maps. I'm going to use PowerShell, which is a nice scripting language,…
Introduction This article is designed to assist GIS (Geographic Information System) and GPS (Global Positioning System) developers using ESRI ArcGIS and other spatial information management systems.   For the uninitiated the concept of projectio…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question