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
https://forums.phpfreaks.com/topic/121323-i-dont-know-where-to-start/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.