waleed.makarem 0 Light Poster

Dear all ,

I am trying to develop code that will check for each location (latitude and longitude) for a nmea file ( contains over 200,000 point) to check if this file contains some points that was close to a certain location or not . How can we do this in such a way that will make the code fast . we have a nmean file with over 200,000 waypoints and have a list of locations with 140 location name and position (latitude and longitude and permitted distance) . I need to develop a code that will pass through all of the 200000 way points to list which waypoints where close to the listed locations by this distance (eg 10 meter).

I have the code but it seems to be very slow , taking 1.75 second for 2000 waypoints only and testing only 15 location .

it loops through all way points and for each , it calculates the distance to the set value adn if it is less than the set value , it records that the place is ok .

I hope that there should be a smarter approach than the way I used. But I do not know how to get it .

my code is into this link :

http://www.4shared.com/file/Ksl1j9Lm...lication9.html

The base concept is to parse the NMEA files to get the location data (longitude , latitude, time) and store them into a data table (eg RawDataTable).
Then , the "processtrip" function passes the location that we need to check (as LocationDataTable) , then this function will compare the generated RawDateTable line by line to check if this location is the same in each of the LocationDataTable .

Thanks for your valuable feedbacks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.