Thread: Read geographic item location data from file and calculate neighbors

  1. #16
    Banned
    Join Date
    Aug 2017
    Posts
    861
    I'd start at the property line, the farthest corner on either side, left or right, because you have to have a starting point to get a basis for ones comparison. Then grab the nearest tree then look at all of the surrounding trees. if ones meet the criteria them mark them accordingly, if starting on the left side, move right go to next tree not in the set and repeat, making sweeping movements both left and right while moving forward repeating the sequence finding matches to the criteria. until you've covered the entire area. you'd also have to add that circumference of the tree that is being used to find the surrounding trees to put them into sets. that should also give you are moving forward part of the code. as in how far to move forward on your next sweep left or right, depending on which side one stared on.
    Last edited by userxbw; 12-08-2017 at 06:35 AM.

  2. #17
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    The place to start is a sample of the data to be given to the program. And, size estimate of the real data the program will be using.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 05-02-2016, 08:47 PM
  2. Replies: 1
    Last Post: 11-04-2010, 10:23 AM
  3. Replies: 21
    Last Post: 11-03-2007, 02:56 PM
  4. FILE I/O. data written at wrong location.
    By epidemic in forum C++ Programming
    Replies: 5
    Last Post: 04-06-2007, 12:45 AM
  5. Tracking item location in inventory
    By Mario F. in forum Game Programming
    Replies: 6
    Last Post: 08-02-2006, 03:50 PM

Tags for this Thread