Results 1 to 10 of 13

Thread: How Do I: Convert a list of Lat/Long|X/Y coordinates into points in an image?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Default

    The community members location map is done exactly like this and I did that in ImageMagick. If you have a world map in a mercatory style such that its stretched to linearize the lat/long coords or a local map small enough such that the lat/long range is approximately linear then all you need is the bounds in lat long coords of the map and the image pixel size and then you just use the ratios to go from one coordinate system to the other. If the map is in some other projection and is large enough such that increasing the lat/longs produce curved point sets then you need to do some math. It can get a bit tricky then but libraries such as GDAL can do that calculation for you.

    If you have the X/Y points and you just need to plot them well, image magick does make that very easy indeed. I would suggest using a scripting language with it to make it faster such as Perl where you can get PerlMagick which is the interface of image magick with it. Then its just a loop and a few calls to get it to plot it out. There are other interfaces too such as Python etc as well. Your kinda spoiled for choice with IM.

  2. #2
    Software Dev/Rep Hai-Etlik's Avatar
    Join Date
    May 2009
    Location
    48° 28′ N 123° 8′ W
    Posts
    1,333
    Blog Entries
    1

    Default

    I'd probably write a little program to generate SVG or WKT, which are both fairly straightforward structured text formats. SVG is more readily converted to graphics, but WKT can be fed into GIS tools.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •