Page 1 of 2 12 LastLast
Results 1 to 10 of 13

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

  1. #1

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

    If I have an Excel list of lat/long coordinates (which I can easily convert into X/Y image coordinates), what is a good way of placing points or drawing lines in an image using those coordinates? Obviously, I can do it manually, but I'm trying to construct a new process, and manual doesn't work for that.

    I am not sure what programs might be best to use, probably something that has a scripting language. I can convert coords into script commands pretty easily. Then I would just run the script and it would draw the stuff onto the image, which I could bring into Photoshop or Fractal Terrains as an overlay.

    Thanks
    My Finished Maps | My Planet Maps | My Challenge Entries | Album: Pre-generated Worlds

    ------
    Assuming I stick with fantasy cartography, I'd like to become a World Builder, laying out not only a realistic topography, but also the geopolitical boundaries and at least rough descriptions of the countries and societies.

  2. #2

  3. #3

    Default

    Those links look very good. Now all I need to do is remember all my basic geometry. Seems having a degree in the stuff doesn't do any good if you never use it.

    Repped. Thx for the assist!
    My Finished Maps | My Planet Maps | My Challenge Entries | Album: Pre-generated Worlds

    ------
    Assuming I stick with fantasy cartography, I'd like to become a World Builder, laying out not only a realistic topography, but also the geopolitical boundaries and at least rough descriptions of the countries and societies.

  4. #4
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,549

    Default

    If your data is already in Excel, have you considered just drawing an XY scatter plot in Excel itself?... It also has a built-in scripting language, that lets you create the chart and save the image.

  5. #5

    Default

    I had thought of that briefly, but didn't know I could export it to an image and still be precise with the coords. I can generally make Excel jump through hoops, so that's a good option if possible. I'll look into that further, thanks.
    My Finished Maps | My Planet Maps | My Challenge Entries | Album: Pre-generated Worlds

    ------
    Assuming I stick with fantasy cartography, I'd like to become a World Builder, laying out not only a realistic topography, but also the geopolitical boundaries and at least rough descriptions of the countries and societies.

  6. #6
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,193
    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.

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

  8. #8

    Default

    Here are the results in an Excel graph plot. I wrote a VBA routine to try and build believable random tectonic plate boundaries. It's very slow to run, a couple of hours, but then this laptop is not necessarily the world's most powerful computer. There are ways I can speed it up, and I still want to add directional and speed arrows for each of the plates, so it's not quite finished yet.

    This would have been a helluva lot easier if I knew spherical trigonometry. I assume I covered it during getting that BS in Math, but I've never used it since and didn't remember any of it. Fortunately I was able to eventually find everything I needed online once I figured out what terms to search for. If anyone else wants to delve into the topic, I suggest looking for an aviation navigation page - all the formulas you could ever want are listed out right there, already put into a form perfect for doing calculations based on a planetary surface. I've actually had the general process in mind for a month or more, but didn't know how to implement it until I started finding the right equations.

    Any critiques or suggestions from the geologically-knowledgeable crowd out there?

    Click image for larger version. 

Name:	Platebuilder_test.jpg 
Views:	815 
Size:	287.5 KB 
ID:	37585
    My Finished Maps | My Planet Maps | My Challenge Entries | Album: Pre-generated Worlds

    ------
    Assuming I stick with fantasy cartography, I'd like to become a World Builder, laying out not only a realistic topography, but also the geopolitical boundaries and at least rough descriptions of the countries and societies.

  9. #9

    Default

    Here's another one, with the centerpoints added, and a slightly faster algorithm for the edges (a bit over 3 hrs), although that apparently comes with the drawback of the edges having a lot more smooth curves to it.

    Click image for larger version. 

Name:	Platebuilder_test2.jpg 
Views:	883 
Size:	179.4 KB 
ID:	37588

    And I should probably mention that I know the centerpoints aren't at the center of the final plates. They're at the center of the source of each plate, and that the plates build out from those spots to fill the available space.
    Last edited by Master TMO; 08-07-2011 at 12:13 AM.
    My Finished Maps | My Planet Maps | My Challenge Entries | Album: Pre-generated Worlds

    ------
    Assuming I stick with fantasy cartography, I'd like to become a World Builder, laying out not only a realistic topography, but also the geopolitical boundaries and at least rough descriptions of the countries and societies.

  10. #10
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,193
    Blog Entries
    8

    Default

    Would you like to explain what it is that your doing to get these diagrams. I dont see the connect between the lat long points to this diagram. I can see that they are supposed to be tectonic plates but I dont understand where the edges are derived from or why its taking 3 hrs to calculate or plot them. What are these calculations referring to ?

Page 1 of 2 12 LastLast

Posting Permissions

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