MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Can anyone think of a better way of doing this?

This is a discussion on Can anyone think of a better way of doing this? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi All, I have a map with shed-loads of shapes (polygons) - could be up to 1000. I have one ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  5 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-10-2007
Junior Member
Yellow Belt
 
Join Date: Apr 2006
Posts: 18
Can anyone think of a better way of doing this?

Hi All,

I have a map with shed-loads of shapes (polygons) - could be up to 1000.

I have one location.

I need to find which of the shapes (if any) my location is 'in'.

Currently, what I do is to add a pushpin (at my location) to the ActiveMap, then, using the DataSet, iterate through the shapes and see if the location is in each shape - using DataSet.QueryShape(Shape).

This can be quite time-consuming so can anyone think of a quicker way?

Many thanks...
__________________
John Lewis
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 11-12-2007
Senior Member
Green Belt
 
Join Date: Sep 2005
Location: Marshall, Michigan
Posts: 122
Re: Can anyone think of a better way of doing this?

As you're loading the shapes, keep track of the bounding-rectangle corners (ULC,LRC) for each shape. Then you can easily determine if a location falls within the bounding rectangle and limit your results to test for point-in-polygon only on those shapes.

Of note - If your shapes are coming from an ESRI .SHP file, the bounding corners are already computed for you.

-Paul
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


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/can-anyone-think-better-way-doing-6730.html

Posted By For Type Date
MapPoint Articles - MP2K Magazine This thread Refback 11-12-2007 01:55 PM
MapPoint Download - MP2K Magazine This thread Refback 11-11-2007 03:30 PM
The Magazine for MapPoint - MP2K Magazine This thread Refback 11-11-2007 02:17 PM
ThemePassion - Best stuff about design! » Can anyone think of a better way of doing this? This thread Pingback 11-10-2007 01:14 PM
Apple Blog » Blog Archive » Can anyone think of a better way of doing this? This thread Pingback 11-10-2007 12:40 PM

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


All times are GMT -5. The time now is 10:21 PM.


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

Cheap Skiing
When it comes to cheap skiing, Holiday Hypermarket will speed you on your way. Searching the leading travel brands, Holiday Hypermarket offers you great value skiing.

Travel Agent
Travel Counsellors was voted 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 in Dubai
Holidays in Dubai are an eclectic mix of the ancient and the modern. Discover an oasis of luxury amid the Arabian desert. Book here now!

Cyprus
Before visiting Cyprus, make sure you are well informed to make the most of your holiday. Online at ulookubook.com you check out our useful travel guides. Find out all about the Cyprus nightlife, shopping, eating and customs.

Holidays
At Travel.co.uk the options for holidays are endless. Do some online comparison shopping!

Holidays in Gran Canaria
Have some fun in the sun on the Canary Islands! See On The Beach for information on holidays in Gran Canaria.


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