Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10492
  • Last Modified:

Converting longitude and latitude

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
0
russ4ell
Asked:
russ4ell
  • 3
  • 2
  • 2
  • +3
3 Solutions
 
CWiseCommented:
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?  
0
 
tommy_kurniawanCommented:
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.

0
 
CairotesCommented:
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.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
russ4ellAuthor Commented:
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
0
 
CairotesCommented:
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...
0
 
maphewCommented:
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/
0
 
gj62Commented:
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 -
0
 
russ4ellAuthor Commented:
what's a rubber-sheeting alogorithm and where can I get one please?
0
 
russ4ellAuthor Commented:
The map can be seen at www.doublerltd.com
0
 
gj62Commented:
Well, it depends how much you want to immerse yourself in this topic.  A basic algorithm can be found here, in section 3.3:

http://www.hammerhead.com/thad/morph.html

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now