Jump to content

I dont know where to start.


liamthebof

Recommended Posts

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.

 

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.