spacer1
spacer2 1_1 1_2
2_1
 Subscribe
 The MP2K Update!
 
 
 
 Magazine
Front Cover
What's New
Articles
News
Sample Data
Gallery
Advertise
About
 Features
MapPoint 2013
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 Earlier Content
Past News Items
Past What's New Announcements
 Sponsors
 Order

MapPoint 2013

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
SVG Tutorials
MapPoint

Map Visitors

  MAPPOINT Q & A  

Top | Post New Question | Read All | MP2K Asks Microsoft

669 Jonathan Martin - May 13, 2002

I am wondering if anyone has built a COM add-in application or has written VB code that will query two sets of data in MapPoint 2002 and determine whether the locations of dataset 1 (imported address info from excel) are within a given radius of dataset 2 (also imported address info from excel) Would like to eventually create a form that accepts the following inputs: DATASET 1: user may select a dataset already imported to the current MapPoint file DATASET 2 same operation as dataset 1 RADIUS: the distance in miles from the data points within dataset 1 that will be used to find the data points within dataset 2. OUTPUT FILENAME: allows the user to specify the filename of a new excel file where the results of the query will be stored. I am guessing that the records from dataset 1 would have to be converted to lat/long in order to create the radius and capture the resulting pushpins from dataset 2? Appreciate any response that might help me address and solve this problem Regards, Jonathan Martin

Answer:

I don't know of anyone who has specifically done this, but it certainly can be done. The only question would be performance, which would mostly depend on the size of the datasets. If dataset 1 has x records and dataset 2 has y records, you'd have to do x*y calculations of distance.

While lat/lon would be helpful for importing the data, it is not necessary. The Distance method will work using the Location objects of any 2 Pushpins. Check the programming help documentation. This assumes you want a crow's flight distance. If you want a driving distance, you will need to create a route by adding pushpins as waypoints, then calculating the route and reading the Distance property.

- Walt Cygan

Post New Answer / Follow-up


Google
 
MP2Kmag Internet


 Recent Discussion
 Resources


Want Your Site To Appear Here?

   © 1999-2012 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009/2010/2011/2013 are either trademarks or registered trademarks of Microsoft.