MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Geocoordinates from a waypoint

This is a discussion on Geocoordinates from a waypoint within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi all, how to get the geocoordinates from a given waypoint? TIA Chris Werner...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-31-2006
Junior Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 23
Geocoordinates from a waypoint

Hi all,

how to get the geocoordinates from a given waypoint?

TIA

Chris Werner
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 04-01-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi Chris,

A Waypoint object has a Location property. To get the coordinaes from a Location object you need to do reverse geocoding. There is an exellent article on this site that you can use. Try a search on CalcPos.
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 04-03-2006
Junior Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 23
Thanks

Hi Wilfried,

thanks for this valuable hint. After translating
the code into PowerScript it works like expected.

Kind regards

Chris Werner
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-04-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,105
Hi Chris,

Glad it works for you. Tell me, what is PowerScript ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 04-05-2006
Junior Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 23
PowerScript

Hi Wilfried,

PowerScript is a programming language used in
the development environment PowerBuilder from
Sybase (http://www.sybase.com/products/devel...n/powerbuilder).
Rather than talking much about it let me show
my PowerScipt implementation of CalcPos:

Code:
public function integer uf_get_latlong4wp (oleobject aole_wp, ref decimal adc_lat, ref decimal adc_long);

// ======================================================================================
//
// adoptet from:
// 
// http://www.mp2kmag.com/mappoint/discussion/viewtopic.asp?t=3291&highlight=calcpos
//
// ======================================================================================


integer    li_ret
dec{10}  ldc_dist, ldc_len
string      ls_err

oleObject	lole_loc

li_ret = c_map_ok

if li_ret = c_map_ok then

	if isNull(this.idc_halfEarth) then
		
		this.iole_northPole = this.iole_objt.getLocation( 90,   0, 1)
		this.iole_southPole = this.iole_objt.getLocation(-90,   0, 1)
		this.iole_santaCruz = this.iole_objt.getLocation(  0, -90, 1)
		
		this.idc_halfEarth    = this.iole_objt.distance(this.iole_northPole, this.iole_southPole);
		this.idc_quarterEarth = this.idc_halfEarth / 2
		
	end if

end if

if li_ret = c_map_ok then
	
	lole_loc = aole_wp.location
	
	adc_lat = 90.0 - 180.0 * this.iole_objt.distance(this.iole_northPole, lole_loc) / this.idc_halfEarth
	
	ldc_dist = this.iole_objt.distance(this.iole_objt.getLocation(adc_lat, 0, 1), lole_loc)
	ldc_len  = (adc_lat / 180) * pi(1)
	
	adc_long = 180.0 * acos((cos((ldc_dist * 2 * pi(1)) / (2 * this.idc_halfearth)) - sin(ldc_len) * sin(ldc_len)) / (cos(ldc_len) * cos(ldc_len))) / pi(1)
	
end if

return li_ret
Of course there are some declarations and initializations not shown here.

Kind regards

Chris Werner
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 04-05-2006
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,384
Blog Entries: 1
Wow, thanks Chris. Is that Pascal? After Commodore Basic I think I only studied Pascal briefly in high school at one point. Pity Borland is selling their flagship product, it is like ToysRUS selling their Toys stores (kept the BabiesRUS stores). A bit off topic sorry
Eric
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 04-05-2006
Junior Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 23
Sounds well known

Hi Eric,

learning Pascal after a home computer Basic dialect sounds
well known to me, I went the same way. Once upon a time ...
It was Turbo Pascal and I also wonder what this boys from
Borland want to do today or tomorrow. Printing money? Later
when I went to my first job in the industrie I thought "Oh yes,
now they want me to code in C" - but what an astonishment -
it was a BASIC job! It cost me some effort to hide my surprise.
As said: Once upon a time.
No, PowerScript is'nt Pascal but a similar language and the
tool PowerBuilder is similar to Delphi: object oriented language,
GUI builder and the "DataWindow" - a very powerfull approach
to access relational databases. Actually Sybase adds web
development capabilities and .NET compatibility. Unfortunately
PowerBuilder is'nt very common in Europe but this is rather
because of lack of marketing than lack of features. A bit more
off topic


Nice day!

Chris
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

Tags
geocoordinates, waypoint


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
Zoom to Waypoint BobIDEAS MapPoint 2006/2009 Discussion 3 09-08-2004 01:41 PM
Specifying stop time of new waypoint stephenmillington MapPoint 2006/2009 Discussion 0 06-09-2004 09:08 AM
address from waypoint starbuck MapPoint 2006/2009 Discussion 7 11-18-2003 08:04 AM
Put a waypoint! Anonymous MapPoint 2006/2009 Discussion 1 11-14-2003 09:44 AM
Route Waypoint Name Vic MapPoint 2006/2009 Discussion 1 10-03-2002 03:00 PM


All times are GMT -5. The time now is 06:30 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 Weekend
Slip in a sneaky ski weekend to add a bit of variety compared to normal weekends. A ski weekend can be great value when you book online at Holiday Hypermarket.

Flights to Turkey
Find cheap flights to Turkey on Travel Counsellors. A personal Travel Counsellor can help you plan flights and find accommodation in Turkey.

Cape Town Flight
Book a Cape Town Flight for great value when you book through dealchecker.co.uk. It doesn't take long to find the latest great deals for you.

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!

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.

Comparison Holidays
Travel.co.uk is a travel comparison service which makes it easy for you to find and plan the best holidays.

Portugal Holidays
We specialise in Portugal holidays. Visit our On The Beach website for more information.


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 52