liamthebof Posted August 25, 2008 Share Posted August 25, 2008 http://pastebin.com/m50b0798d Thats what I have been given. It contains a placename followed by a list of co-ordinates. NAME (Xmin,Ymin,Zmin,Xmax,Ymax,Zmax) {"Arco del Oeste", {-901.10,2221.80,0.00,-592.00,2571.90,200.00}}, This file is from another language, not that that should matter. Anyway, I will be supplied with an x and y value somewhere between -4000 and 4000 on both axis. Example, I receive x = -240 and y = 1540. I need to output 'Bone Country' as it co-ords = {"Bone County", {-480.50,596.30,-242.90,869.40,2993.80,900.00}}, show that the values I recieved fit into its min and max, x and y values. Ok, the co-ords of this file do not change so I can cut all the crap out, {{ ;; ect, as well as the z values. Im thinking atm along the lines of looping a 'is my x value in between minX and maxX, if yes, add to a file matches, else go to next line. When I reach the bottom, take my Y value and loop every line in file matches checking if my Y value is between the files minY and maxY. If so, output the name. I have posted at this early stage with a rather useless data file just to see if what I hope to achieve is possible. Thanks for any replies. Quote Link to comment Share on other sites More sharing options...
Lamez Posted August 25, 2008 Share Posted August 25, 2008 I might be just plan stupid, but what are you wanting to achieve much less talk about? Quote Link to comment Share on other sites More sharing options...
liamthebof Posted August 26, 2008 Author Share Posted August 26, 2008 Any clues as to how I can do what I said. I will be given to co-ords and I need to say which name they correspond to as the x and y value of the co-ords I will be given will be inbetween the minX and maxX and Y of one of those entries. Im just asking for any advice, whats commands to look for ect. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.