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 
Another mapping tool....
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Tools
View previous topic :: View next topic  
Author Message
bogi



Joined: 10 Jun 2008
Posts: 148
Location: Slovakia

PostPosted: Thu Dec 03, 2009 9:16 pm    Post subject: Reply with quote

jolly47roger, at first thank you once again for the new version 2.0.0, introduced on Gramin Forums https://forums.garmin.com/showthread.php?t=3659&page=2

Quote from the Garmin forums:

Quote:
When merging, I do not use the 'Projection' in the .map (or other calibration) file. I use the calibration points to calculate a best-fit affine transformation (x'=x0+ax+by; y'=y0+cx+dy - like a 'world file') for each map and use that to map the pixels from one to another. For most areas it seems to be accurate enough but I could, in the future, extend it to polynomial best fit either quadratic or cubic (e.g x'=x0+ax+by+cxx+dxy+eyy+fxxx+gxxy+hxyy+iyyy) but that would need a minimum of 10 calibration points.

Merging maps is specific neither to Trekbuddy nor Garmin but has no natural 'home' of its own. I'm happy to move it to Trekbuddy if you think that would be better.


I made 2 experiments:

1)

Base map is map oriented in S-JTSK grid (used in Czech Republic and Slovakia only, and former Czechoslovakia). It uses LCC projection as approximation of very specific Krovak's projection, which is used with S-JTSK maps, because OziExplorer doesn't support Krovak's projection. I sent you such map already for test on Garmin forums.

As the "map to merge" I used Google Map in Mercator projection. The merged result looks like:

http://www.gpsforum.sk/index.php?action=dlattach;topic=956.0;attach=2398;image

The resulting map remains oriented according to the base map. Maybe the base map is quite untouched. The secondary map on the top is rotated and rescaled to be displayed on top of the base map. Interesting is, that the resulting map has Mercator projection in it's Ozi map calibration file.

2)

The base map is now an area from www.cykloserver.cz/cykloatlas in Mercator projection and the map to merge is the same as the base map from 1), so it is the LCC projection map and is oriented in S-JTSK grid. The merge result now looks like:

http://www.gpsforum.sk/index.php?action=dlattach;topic=956.0;attach=2400;image

Now the resulting map is oriented according to the base map and the secondary S-JTSK map is rotated and rescaled according to the base map. Interesting is, that the result map has now Lat/Lon projection in the Ozi calibration file.

The interesting point is, that 1) has Mercator and 2) has Lat/Lon projection in the resulting calibration file. I am satisfied with the merge results, but I would like to understand, which projection is used for the resulting map in which situation.
Back to top
View user's profile Send private message
jolly47roger



Joined: 29 Jul 2009
Posts: 67
Location: Cardiff UK

PostPosted: Fri Dec 04, 2009 5:54 pm    Post subject: Reply with quote

You have founnd a bug! I am incorrectly copying the projection from the last file loaded to the output .map file.

For the areas I have been working with I have been treating the maps as being described by the linear equation I posted. I think this is an Equirectangular projection (I have a mathematics degree but map projections never featured!).

If this is causing unacceptable errors, I could change it to handle Mercator projections (from either file or both) but the extra mathematics function calls will impact run time, I think
Back to top
View user's profile Send private message Visit poster's website
bogi



Joined: 10 Jun 2008
Posts: 148
Location: Slovakia

PostPosted: Sun Dec 06, 2009 3:58 pm    Post subject: Reply with quote

I think it is more complicated. Base map and the map to merge to can be of different projections, as in my previous example. A clear solution is to reproject (warp) the input images to the same projection and scale and then to merge them. Ignoring projections of input maps can cause different level of inaccuracy in different parts of the resulting map, specielly, if the map covers large geographic area. I think for small areas your tool can bring results, enough good for practical purposes.

I'm not mathematician and I don't know the reprojection algorithms. I know there is a free package fwtools, containing gdal_warp utility. This command line utility is capable of reprojecting georeferenced raster images. I do not have experience with gdal_warp.
Back to top
View user's profile Send private message
jolly47roger



Joined: 29 Jul 2009
Posts: 67
Location: Cardiff UK

PostPosted: Sun Dec 06, 2009 4:49 pm    Post subject: Reply with quote

I did a small experiment. I took a map that was 27km north to south and 9500 pixels. I compared using the calibration points to derive linear best fit and then a Mercator calculation.

The difference is largest in the middle of the map. The same latitude was 6 pixels different or, expressed another way, the same pixel about 20 metres different.

So you are correct that a simplified algorithm is adequate for small areas but the difference will grow faster than linearly for bigger extents.

As Mercator is very common - Google, OSM and others - I will add a correct Mercator reprojection to the next version and add others depending on demand.
Back to top
View user's profile Send private message Visit poster's website
bogi



Joined: 10 Jun 2008
Posts: 148
Location: Slovakia

PostPosted: Sun Dec 06, 2009 6:57 pm    Post subject: Reply with quote

jolly47roger: Thanks, that sounds to be reasonable. Smile

The most frequently used projections in my area of central Europe and Alps are Mercator, UTM, Transverse Mercator and Lambert Conformal Conic.
Back to top
View user's profile Send private message
jolly47roger



Joined: 29 Jul 2009
Posts: 67
Location: Cardiff UK

PostPosted: Tue Dec 15, 2009 12:00 pm    Post subject: Reply with quote

Version 2.0.1 of MAPC2MAPC has been uploaded. There are a number of changes :
- Handle more .cal formats;
- handle files with line feeds only;
- adjust tile position and size for Mercator projection for Garmin;
- handle Mercator projections when merging;
- configure DrawOrder and JPG quality;
- don't compress JPG in KMZ;
- remind to save preferences on Exit

All feedback welcome!
Back to top
View user's profile Send private message Visit poster's website
cragganmore



Joined: 23 Nov 2008
Posts: 46

PostPosted: Sun Dec 20, 2009 1:00 pm    Post subject: Reply with quote

Hi,

just tried the recent version 2.0.4, it does not write QV cal files correctly:

mapc2mapc writes:

proj_mode = 10 = Mercator
projparams = 10 = proj=LatLong

Has to be:

proj_mode = 10 = proj
projparams = 10 = proj=merc lon_0=3

lon_0 does not really matter with Mercator projection, I suggest to fill in the center meridian of the map area.

_________________
best regards
cragganmore
Back to top
View user's profile Send private message
jolly47roger



Joined: 29 Jul 2009
Posts: 67
Location: Cardiff UK

PostPosted: Sun Dec 20, 2009 2:08 pm    Post subject: Reply with quote

OK - I'll fix that for the next version
Back to top
View user's profile Send private message Visit poster's website
jolly47roger



Joined: 29 Jul 2009
Posts: 67
Location: Cardiff UK

PostPosted: Mon Dec 21, 2009 11:56 am    Post subject: Reply with quote

New version now uploaded (2.0.5)
Back to top
View user's profile Send private message Visit poster's website
Russell23



Joined: 15 Dec 2009
Posts: 22

PostPosted: Mon Jan 11, 2010 4:04 pm    Post subject: Reply with quote

John

Trying to install the latest version 2.0.6 and I get a CRC check error from Winzip.

Russell
Back to top
View user's profile Send private message
jolly47roger



Joined: 29 Jul 2009
Posts: 67
Location: Cardiff UK

PostPosted: Mon Jan 11, 2010 4:11 pm    Post subject: Reply with quote

It still works for me - but try a non-zipped version : http://www.the-thorns.org.uk/mapping/setup.exe
Back to top
View user's profile Send private message Visit poster's website
jolly47roger



Joined: 29 Jul 2009
Posts: 67
Location: Cardiff UK

PostPosted: Thu Jan 14, 2010 12:24 pm    Post subject: Reply with quote

There's a new version (2.0.8 ) of MAPC2MAPC that allows tracks (MXF,RXT,TXF,PLT) to be overlaid on a map before creating tiles for Trekbuddy - or the whole map can be saved with the overlay.
Back to top
View user's profile Send private message Visit poster's website
bogi



Joined: 10 Jun 2008
Posts: 148
Location: Slovakia

PostPosted: Thu Jan 14, 2010 6:40 pm    Post subject: Reply with quote

jolly47roger, very nice! Smile

Thank you for supporting PLT format too.

I succcessfully overlayed 330000 points, see attachments.
The first picture is the resulting map in OziExplorer.



untitled.jpg
 Description:
Picture from MAPC2MAPC
 Filesize:  120.3 KB
 Viewed:  16047 Time(s)

untitled.jpg



untitled1.jpg
 Description:
Picture from OziExplorer
 Filesize:  184.9 KB
 Viewed:  16047 Time(s)

untitled1.jpg


Back to top
View user's profile Send private message
jolly47roger



Joined: 29 Jul 2009
Posts: 67
Location: Cardiff UK

PostPosted: Sun Jan 31, 2010 5:18 pm    Post subject: OSGB format .MAP file Reply with quote

Further to the posts in the Mobile Atlas thread, I have changed the way MAPC2MAPC creates OS format .map files (the new version is not live yet).
Will someone test this for me, please?



ST350650_6_50_tiles.zip
 Description:

Download
 Filename:  ST350650_6_50_tiles.zip
 Filesize:  172.94 KB
 Downloaded:  3 Time(s)

Back to top
View user's profile Send private message Visit poster's website
Poot



Joined: 27 Jan 2010
Posts: 19

PostPosted: Sun Jan 31, 2010 11:27 pm    Post subject: Re: OSGB format .MAP file Reply with quote

jolly47roger wrote:
Further to the posts in the Mobile Atlas thread, I have changed the way MAPC2MAPC creates OS format .map files (the new version is not live yet).
Will someone test this for me, please?


Tested on my C905, looks damn near perfect to me. If I was being picky, I would say that the cross-hairs of the TrekBuddy cursor are one pixel to the right of where they should be, but that is being VERY picky indeed. I would NEVER notice it out walking.

If I'd been visiting my Mum in W-s-M, I'd have popped to Kewstoke to check the map with the GPS....

Great stuff, thanks for your work.

_________________
Pootle
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
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 3 of 6

 
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