Forum: General Topics

Forums / General Topics / Using mapcacher and gMapMaker

 

Subject:Using mapcacher and gMapMaker 

diego

17:37
Tuesday
9-Sep-2008

I've found using Mapcacher to select map download areas along with gMapMaker to actually grab them from the net very very handy for downloading high quality maps for off line use in Mobile Gmaps.

Is there no way to also use them into trackmyjourney?

I bet lots of people have already come here with this before.
 

Stephen

12:33
Wednesday
10-Sep-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Yeah I do get asked this sort of question a fair bit!

The trouble with using these other tiled maps is that they are not in the right projection for use in TMJ. The only way to get them into TMJ is if the downloader programs can stitch the map into a single large PNG image file that can then be imported into the MapOrganiser and reprojected from the Mercator to Rectangular projection. As Chris posted in this thread there is software available that appears to assist with this, though I haven't it myself.
 

ChrisM

13:03
Wednesday
10-Sep-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

That little app (MapCapt) that I mentioned in the above mentioned thread has worked very well for me. Granted, it IS a little bit of a bodge, but the big advantage is that it'll work for pretty much any on-line map.

Question to Stephen: Since gMapMaker seems to be able to produce a nice .JPG or .PNG file. If I run that through your projection converter, and then the .tmj 'maker' then it should produce TMJ compatable(rectangular projection) maps(??)

Chris.
 

Stephen

14:20
Wednesday
10-Sep-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

If it stitches the tiles into one nice big map image then this should work fine. Just load it into the MapOrganiser, use the Tools/Convert from Mercator Projection function and then export it as usual. It can sometimes run quicker if the initial PNG file is converted to 256 colours before loading into the MapOrganiser, using Photoshop or Irfanview, etc.

Does it work?

Cheers,
Stephen
 

ChrisM

8:40
Thursday
11-Sep-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

Yes, it seems to work, however my first attempt seemed to be a bit 'out'. I tried a street level map, and my house appeared a couple of streets away...

gMapMaker asks for a top left and bottom right Lat/Long coordinate and I used these values to type into MapOrganiser, but thinking about it, I guess the actual corners of the map could vary from those entered into gMapMaker by up-to the size of a Google map-tile(roughly the amount it seemed to be 'out' by), so I think I'll have to work out the actual exact Lat/Long of the two corners, and re-run the map through MapOrganiser...
I think then it'll work fine!

Chris.
 

diego

12:13
Monday
15-Sep-2008

From Mercator to Rectangular projections, is this the main problem?

None of the gMapMaker operating modes can help? Neither Shustrik's Map Generator for Mobile Google Maps?

I will contact them both to see if they could make things short before using MapOrganiser. Ideally, not even MapOrganiser should be needed to move maps to mobile phone memory for off line use.
 

Stephen

18:19
Monday
15-Sep-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Diego,

Since TMJ-Mobile currently only uses the Rectangular projection the MapOrganiser is always going to be needed in order to convert the projection and create the TMJ file. So the process needs to be done in a few steps: grab a large mercator image using gMapMaker, calculate the exact top/bottom/left/right bounds, then import the image into the MapOrganiser. I guess its a bit of a fiddle, but it only needs to be done once!

Cheers,
Stephen
 

ChrisM

12:56
Tuesday
16-Sep-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

Just a point that Diego may have missed. I don't think there's any easy way of taking MapOrganiser out of the equation as it seems to do quite a lot of work splitting the map into small tiles(ie individual files) in a way that TMJ can understand/use.
Can't see how a third party application could do this, unless it was specially written with a knowledge of how TMJ works...
Also there is the problem I mentioned earlier that the large maps produced by gMapMaker do not start exactly on the lat/long coordinates that you specify when using the program.
That said, it would be quite neat though to have a single step to produce a TMJ file!!
:-)

Chris.
 

diego

12:02
Wednesday
17-Sep-2008

Chris, I got a reply from Andrejs Krasilnikovs, gMapMaker's author on this:

"gMapMaker is open source, so You can check out its source and add some image processing library that could remake the projection of the map. I have no idea how much these tiles would differ, but it's possible that image quality would somewhat decrease after the deformation."

It sounds more or less what you said.

 

ChrisM

13:34
Wednesday
17-Sep-2008

Location:
Bedfordshire, UK

Phone Model:
Sony Ericsson W770i, Blackberry Playbook(?)

So I guess Stephen (ie the author of TMJ) could, in theory, write an extension or mod to gMapMaker that could produce a .TMJ file direct...

However, from previous discussions along similar lines, I'm not sure he'd want to do that due to all the various copyright issues that may crop up, and having read in the past stories about Google's quite heavy handed (at times) protection of their copyright stuff, I wouldn't blame him for not wanting to write anything that could be construed as infringing in any way on any of Google's rights!

I suppose it could also be possible for a suitably skilled person to reverse-engineer a .TMJ file, and adapt their own version of gMapMaker, but that'd be infringing on TMJs licence, I'd imagine...

Maybe, for the time being, we'll have to be satisfied with OpenStreetMap maps, or putting that little bit of extra effort in to convert our own maps from Google or OS or wherever. To be fair, taking a map file (.JPG) from gMapMaker (or any other source), it takes less than 10 minutes to work out the Lat/Long of the edges and bung it through MapOrganiser.

Regards,

Chris.
 

Stephen

16:14
Wednesday
17-Sep-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Yeah, to be honest it would only take a couple of lines of extra code to allow the MapOrganiser to grab map tiles from Google or Yahoo or whoever, but I just don't want to risk the potential copyright issues! As you say, its not tooo big a job to use these other tools to get the maps and then just convert them with the MapOrganiser...
 

meinalf

17:28
Monday
13-Oct-2008

Phone Model:
SE W810i, Nokia 5800, MDA IV

Hello,
what´s about opening tmj map organizer for OGC-WMS map services (http://www.opengeospatial.org/standards/wms), so that the use can decide itself from a lot of public WMS-services which map to use in tmj? (search for "public WMS services" to find some)
WMS is _the_ standard map exchange protocol used in professional GIS.

How are the open street maps loaded into jtm map organizer?

Or can anybody describe the internal format of the map files of tmj to create them on our own?

What do you think about this idea?

Meinalf
 

Stephen

11:35
Tuesday
14-Oct-2008

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Meinalf,

I've had a brief look at the WMS spec - looks potentially useful though at the moment its probably beyond the scope of the MapOrganiser to be honest. The OpenStreetMap maps are grabbed as individual 256x256 pixel tiles direct from the OSM tileservers in mercator format (http://SERVER/zoomlevel/column/row.png), and are then reprojected into the rectangular projection.

eg, http://c.tile.openstreetmap.org/15/16371/10895.png =



I might think about publishing the TMJ file format - its actually pretty simple. Would anyone else find this useful?

Cheers,
Stephen
 

diego

13:32
Friday
5-Dec-2008

Of course, Stephen!

Being your TMJ the best gps java application, I m sure the format will allow people willing to help to do it in a more efficient way. keep the good work!
 

meinalf

16:52
Wednesday
2-Sep-2009

Phone Model:
SE W810i, Nokia 5800, MDA IV

Hello Stephen,
after having a close look at Glopus (glopus.de), a german GPS and map tool for Windows mobile 6, I would like to encourage you to publish your tmj map file format. Glopus is a real competitor to tmj, but tmj is not available für WM6 and Glopus not for java. For Glopus there are several tool for importing different map file formats like OSM (incl. preloading OSM-IMG format as vector format!), geotif, world files (tfw) and WMS services (!).

I admit the WMS standards look quit comprehensive, but for simple map call its very easy to use.
Just take a base URL from a map server and add your bouindingbox and the desired pixel size of the raster file you want to get.

I would be please to assist you in integrating WMS-requests in you maporganizer, I am quite familiar with the open gis standard WMS. You just need to interpret a xml responce file with the available layers and coordinate systems of a wms service and construct correspondig dynamic urls with suitable scales, pixel sizes and boundixbox values to get lots of raster files you can collect and put them into your tmf map file.

Here an example of an xml capabilities request
and one for an areal photo of another wms service

You can see, this opens an way to use several other map content type for the use in tmj.
Let me know, if you think it is a good idea to integrate wms into tmj (one of the best gps tools I know) via maporganizer or in another way (maybe online from the phone like osm).

Meinalf
 

Stephen

9:01
Thursday
3-Sep-2009

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Meinalf,

The WMS idea does look interesting but I've got a lot on at the moment so can't really spend much time on the Map Organiser. However, I'm certainly happy to publish the TMJ file format, you might then be able to create your own tools to aid with the conversion.

I'll try and put some basic notes together in the next couple of days, and perhaps once I've released the next version of TMJ I'll add some example code for exporting to the format.

Cheers,
Stephen
 

Stephen

21:04
Sunday
6-Sep-2009

Location:
Surrey, UK

Phone Model:
BB 9800 Torch
BlackBerry 8900
SE W910i
Nokia 5800

Hi Meinalf,

Ok, I've uploaded a page with info on the TMJ File Format...

Hope it helps!

Cheers,
Stephen
 
 

meinalf

20:18
Sunday
13-Sep-2009

Phone Model:
SE W810i, Nokia 5800, MDA IV

Hi Stephen,
thanks for the well documented TMJ map file format. I am not a programmer, but I will try to find someone helping me or manage it as a batch to create map files from wms services.
Maybe a link on this page on the TMJ home page (user guide?) can motivate others also to develop more tools to create map files.
Let me know (meinalf at gmx dot de), when you plan to integrate wms services in your TMF map file organizer.

Greetings,
Meinalf
 

(You must be logged in to post a reply to this thread)