MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Queryshape not returning all records

This is a discussion on Queryshape not returning all records within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have drawn squares over a map and am using them to query the number of datapoints and draw a ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 06-27-2008
Junior Member
White Belt
 
Join Date: Jun 2008
Posts: 7
Queryshape not returning all records

I have drawn squares over a map and am using them to query the number of datapoints and draw a route using those points. I have saved the file and re-use it.
I have noticed that some datapoints near the left hand edge of the square are not selected as being within the square although visually, they clearly are (by 1/4 mile or so) . If I move the shape fractionally and then move it back to where it was and then query the shape again the datapoints ARE found to be within the shape.
Can anyone explain this?
Mappoint 2004 Europe
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 07-07-2008
Junior Member
White Belt
 
Join Date: Jun 2008
Posts: 7
Re: Queryshape not returning all records

Further investigation shows that the problem is more complicated. It is not just near one border. The area that queryshape is looking at does not exactly match the shape. Sometimes it will return pushpins that are apparently outside the shape as well as sometimes missing those that appear to be within the shape.

The shape moving may be a red herring as this does not always change the results that queryshape returns.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 07-08-2008
Junior Member
White Belt
 
Join Date: Jun 2008
Posts: 7
Re: Queryshape not returning all records

I can confirm that moving a shape does cause the number of records returned by QueryShape to change (and become correct). Here are the key code snippets
objShape.Select()
objRecords = objDataSet.QueryShape(objShape)
lngTotalRecs = 0
objRecords.MoveFirst()
Do While Not objRecords.EOF
lngTotalRecs += 1
objRecords.MoveNext()
Loop
MsgBox("Number of records in shape: " & lngTotalRecs) ' Get e.g. 69 here
' Then I execute this code
SavedLoc = objShape.Location
objShape.Location = Mp.GetLocation(90, 0)
objShape.Location = SavedLoc
and re-run the above
objShape.Select()
objRecords = objDataSet.QueryShape(objShape)
lngTotalRecs = 0
objRecords.MoveFirst()
Do While Not objRecords.EOF
lngTotalRecs += 1
objRecords.MoveNext()
Loop
MsgBox("Number of records in shape: " & lngTotalRecs) ' Get e.g now 74
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/queryshape-not-returning-all-records-7960.html

Posted By For Type Date
Formatting Coordinates with DmsFormat - MapPoint Articles - MP2K Magazine This thread Refback 07-05-2008 02:14 AM
Reverse Geocoding, Pt. III - MapPoint Articles - MP2K Magazine This thread Refback 07-02-2008 06:35 AM
The Magazine for MapPoint - MP2K Magazine This thread Refback 06-27-2008 12:29 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

Similar Threads

Thread Thread Starter Forum Replies Last Post
QueryShape or QueryPolygon NOT IN tfmiltz MapPoint 2006/2009 Discussion 1 01-31-2008 08:03 AM
QueryShape recordset returning empty tfmiltz MapPoint 2006/2009 Discussion 7 01-31-2008 06:38 AM
Unmatched Records pop-up: Sort potential records jempie MapPoint 2006/2009 Discussion 0 10-12-2006 06:07 AM
problems with queryshape chas MapPoint 2006/2009 Discussion 1 09-08-2006 01:52 PM
QueryShape problem Please help Anonymous MapPoint 2006/2009 Discussion 2 03-13-2003 08:57 AM


All times are GMT -5. The time now is 07:38 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

Ski USA
USA ski resorts offer some of the best designed ski areas in the world. Choosing to ski in the USA will suit all types of skiers. Book great value ski holidays at Holiday Hypermarket.

Turkey Weather
Check Turkey Weather before you travel. We provide information on Turkey including weather, flights and accommodation.

Holidays to Jamaica
At dealchecker.co.uk, we'll shop around for cheap holidays to Jamaica so you don't have to. We search deals from the UK’s top holiday companies all in one go. Try it for free.

Holidays in Egypt
A holiday in Egypt will stimulate your mind, captivate your heart and spark your senses. Visit this exceptional country, book today!

Cheap Balearics Holidays
Cheap Balearics holidays are available if you know when to book and who to book with. The Balearics have many fascinating places to visit all year round. The partying never stops.

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

Lanzarote Holidays
Visit the easternmost island of the archipelago! Book Lanzarote holidays 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