Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedure for locating nearest site on X & Y Axis
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00539725
Message ID:
00541476
Views:
24
Sorry if its scruffy but the method I would use is to add a numeric field z to the table that holds x and y. Index on z and make the index active. Move to the record from which you want to start then :-
SCATTER MEMVAR MEMO
REPLACE ALL z WITH (x-M.x)^2 + (y-M.y)^2
Voila! The table is in distance order according to Pythagoras. Or perhaps I've missed something.
Previous
Reply
Map
View

Click here to load this message in the networking platform