Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Simple transformations library (dll)

 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools
View previous topic :: View next topic  
Author Message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5660

PostPosted: Sat Jan 24, 2009 11:04 am    Post subject: Simple transformations library (dll) Reply with quote

Here's a simple transformations library that may be useful for some PC apps. It supports the same set of projections, and uses the same algorithms as TrekBuddy.

It can transform

* lat,lon coordinates to/from x,y pixel coordinates on map
* WGS84 lat/lon to/from map datum lat/lon

The zip includes .dll .lib .h and example testapp.cpp

2009-05-11: updated version with LATLON projection handling; also includes PocketPC dll



tbgeo.zip
 Description:

Download
 Filename:  tbgeo.zip
 Filesize:  24.83 KB
 Downloaded:  65 Time(s)


tbgeo_v02.zip
 Description:

Download
 Filename:  tbgeo_v02.zip
 Filesize:  53.68 KB
 Downloaded:  51 Time(s)



Last edited by kruch on Mon May 11, 2009 10:42 am; edited 1 time in total
Back to top
View user's profile Send private message
lukas_ki



Joined: 05 Apr 2008
Posts: 14

PostPosted: Wed Apr 29, 2009 4:36 pm    Post subject: Reply with quote

I have problem with it. When I'm using PROJ_LATLON with DATUM_WGS_84 then there is registration error with message: Undefined datum or projection reference.

BTW. superb library:)
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5660

PostPosted: Tue May 05, 2009 6:06 am    Post subject: Reply with quote

I will check the problem...
Back to top
View user's profile Send private message
kruch
Site Admin


Joined: 02 Jul 2006
Posts: 5660

PostPosted: Mon May 11, 2009 10:40 am    Post subject: Reply with quote

I've attached fixed version (see the initial post). Make sure projection reference in calibration is correct, eg.

tbgeo_define_projection("my map 2", PROJ_LATLON, 0, 0, 0, 0, 0, 0, 0);

map_calibration* map2 = new map_calibration;
map2->datum_id = DATUM_WGS_84;
map2->projection_setup_id = "my map 2";
...
Back to top
View user's profile Send private message
hit



Joined: 14 Aug 2008
Posts: 154

PostPosted: Mon May 11, 2009 1:15 pm    Post subject: Reply with quote

i'm for sure not able to create something usefull from it, but would it be possible to provide a linux based .so or .a ? Smile
Back to top
View user's profile Send private message
drivetrdr



Joined: 29 Sep 2018
Posts: 8

PostPosted: Mon Oct 01, 2018 5:07 am    Post subject: Reply with quote

If somebody can share formula for calculating xy from degrees, please. I am not C programmer, and dont know how to use this lib but I want to do this calculations manually

found answer here https://wiki.openstreetmap.org/wiki/Mercator#PHP_implementation
But it will be necessary to carry out an additional calculation to compare the global coordinates XY to XY coordinates of the raster map.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group