MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Sum of Items within a Radius?

This is a discussion on Sum of Items within a Radius? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Relatively new to mappoint - question is this: IS there a way to count up the number of items within ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-08-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Sum of Items within a Radius?

Relatively new to mappoint - question is this:
IS there a way to count up the number of items within a selected radius? I am asking this to find a way to count sales within a radius or any item.

I know mappoint can sum the imported data through metro areas, but I didn't know if there was a way within mappoint, or a plugin or tool, that would allow me to do this.

thanks!

mc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 05-09-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
Hi,

Yes very easy to do. I just made this testcode to see if it works:

Code:
        private void selectedareaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MapPoint.SelectedArea sa = MP.ActiveMap.SelectedArea;
            Location[] loc = new Location[5];

            loc[0] = MP.ActiveMap.XYToLocation(sa.Left, sa.Top);
            loc[1] = MP.ActiveMap.XYToLocation(sa.Left + sa.Width, sa.Top);
            loc[2] = MP.ActiveMap.XYToLocation(sa.Left + sa.Width, sa.Top + sa.Height);
            loc[3] = MP.ActiveMap.XYToLocation(sa.Left, sa.Top + sa.Height);
            loc[4] = loc[0];

            MP.ActiveMap.Shapes.AddPolyline(loc);

            int PPCount = 0;
            foreach (MapPoint.DataSet ds in MP.ActiveMap.DataSets) {
                MapPoint.Recordset rs = ds.QueryPolygon(loc);
                rs.MoveFirst();
                while (!rs.EOF) {
                    PPCount++;
                    rs.MoveNext();
                }
            }
            Console.WriteLine("Record count " + Convert.ToString(PPCount));
        }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
MapPoint Wish List Items Harv Wish List 1 07-08-2003 01:28 PM
Remove items from the menu Zanzibar MapPoint 2006/2009 Discussion 0 12-23-2002 04:39 AM
Non Mapped Items Anonymous Wish List 0 12-17-2002 02:33 AM
Not mapped items Anonymous Wish List 0 11-15-2002 12:18 PM
After you geocode a list of items from an excel fi.... Anonymous MapPoint 2006/2009 Discussion 1 06-29-2000 07:00 PM


All times are GMT -5. The time now is 12:29 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Flights Malaga
Costa Del Sol is known as a destination for the rich and famous. Don't be put off, with Holiday Hypermarket you can book cheap flights and accommodation.

Best Travel Agent
Travel Counsellors has been named the UK's Best Travel Agent at the Guardian Unlimited Travel awards.

Cheap Holidays to Turkey
If you’re looking for cheap holidays to Turkey then dealchecker.co.uk is the place for you! Our search helps you see real prices from the UK’s top holiday companies all in one go.

Holidays to St Lucia
Holidays to St Lucia will leave you smiling. The spectacular scenery and the warmth of the locals make holidays to St Lucia unforgettable.

Balearics
Before booking to the Balearics Islands make sure you check out our travel guide online. The Balearics are renowned for their vibrant nightlife but there are also some stunning Gothic cathedrals, Stone Age ruins and fishing villages.

Inclusive Holidays
At Travel.co.uk travel comparison will help you plan the perfect inclusive holidays.

Holidays in Florida
Take a break! Enjoy stunning coastline! Info on holidays in Florida available at On The Beach!


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51