How to import ecw maps ?

Started by courdi95, March 14, 2011, 07:32:08

0 Members and 2 Guests are viewing this topic.

courdi95

Hello,

I wolud like to import .ecw maps that i have on my pc into locus ....

How to do that ?
  •  

berkley

#1
Hi,

have you tried GPS Babel? http://www.gpsbabel.org/
It's a translation tool for map files...

Or simply have a look right here: viewtopic.php?f=21&t=4  :P

Greetz
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
  •  

courdi95

#2
"GPSBabel converts waypoints, tracks, and routes" ..... :-(

.ecw file are raster maps compressed using wavelet technology (as JPEG2000) and with headers comprising calibration and projection data (see http://www.gdal.org/ or http://www.erdas.com/Homepage.aspx)

so what I need is a tool to convert my .ecw files into "rmap SQLite" or "trekbuddy tared" as indicated in the LOCUS tutorial ....

where can I find clear description of  "rmap SQLite" or "trekbuddy tared" file description ?
  •  

Menion

#3
Hi,
  i don't know :) I also don't know this map format. You have to find any way ho to get raster images into png files or database. Structure of database and tar files is simple. Just create some map in locus and examine.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

courdi95

#4
Reverse engineering of LOCUS database and folders may be a good solution .... however, as little document describing the structure would be better for me  ....

Please, do you do have any written description of your file formats and database format ? I have made some googling about this, but did not find so much clear information ....
  •  

Menion

#5
There is no need for some complex reverse engineering. Just create small SQLite map in locus, download SQLite Database Browser software and look how this database looklike. With TAR format it's even simplier. It's just compressed tar file that containt images 256x256px big and one xml file with parametres.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

courdi95

#6
okay .... I will try that ... but however it would be fine to have that description... I will post one if you are OK .
  •  

Menion

#7
every description that should be useful to any other user, is more then welcome!
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

courdi95

#8
OK ....

Structure of sqlite locus file :

- the database comprises 3 files : tiles, android_metadata, info
- "tiles" file structure :
ROWID
x INTEGER PRIMARY KEY
y INTEGER PRIMARY KEY
z INTEGER PRIMARY KEY
s INTEGER PRIMARY KEY
image BYTE (PNG IMAGE)
SQL : CREATE TABLE tiles (x INTEGER, Y INTEGER, z INTEGER, s INTEGER, image BYTE, PRIMARY KEY (x,y,z,s))
- "info" file structure :
ROWID
minzoom INTEGER
maxzoom INTEGER
SQL : CREATE TABLE info (minzoom INTEGER, maxzoom INTEGER)
- "android_metadata" file structure
ROWID
locale TEXT
SQL : CREATE TABLE "android_metadata" (locale TEXT)

so .... the structure of the database is OK now, but I have QUESTIONS :
- are x/y/z corresponding to MERCARTOR Google-like projection ?????? (as depicted here: http://www.maptiler.org/google-maps-coo ... rojection/)
- what is the meaning of "s" in "tiles" ?
- in "android_metada" : locale = "fr_FR"  (only one record)
- "info" is empty ????
- I have not found tared files on my sdcard ... is the description similar ?
  •  

Menion

#9
so,
 - are x/y/z corresponding to MERCARTOR Google-like projection ?????? (as depicted here: http://www.maptiler.org/google-maps-coo ... rojection/)
yes. Only z in database is a little weird. I think it's "17 - z", so zoom 0 on Gmaps == 17 in database

- what is the meaning of "s" in "tiles" ?
I don't know too, so I'm using it for storing day since 1.1.2011 (for some future map updates)

- in "android_metada" : locale = "fr_FR" (only one record)
It's created automatically by system

- "info" is empty ????
was, since today version isn't. Contain provider index (from which map is created) and zooms in String separated with ";"

- I have not found tared files on my sdcard ... is the description similar ?
similar? hmm create TAR map and look. How to? On screen where are you selecting zooms to download, change type by middle bottom button

SQLite format I'm using is taken from RMaps and Backcountry nav application or any of them. I did this to remain "compatible". Anyway I actually updated info table, but i'm sure it will not have any impact on other software using map from Locus
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

courdi95

#10
Quote from: "menion"I think it's "17 - z", so zoom 0 on Gmaps == 17 in database

I confirm z in Locus is equal to  z-17  from Gmaps

Quote from: "menion"hmm create TAR map and look. How to? On screen where are you selecting zooms to download, change type by middle bottom button

I will try ........ but not today.
  •  

cseu

#11
Hi courdi95... have a look at this post : viewtopic.php?f=13&t=280#p1107
Let me know if you need any help.
Cheers.
  •  

courdi95

#12
I forgot to tell you that I found the solution ....

Using MapTiler (www.maptiler.org) you can create tiles corresponding to Google projection (x/y/z) from an .ECW file !

As output, you get a structured folder  :  <zoom>/<x>/<y>.jpg (with y numbering that you have to shift to get the Google Maps ...the Maptiler is compliant TMS "y" numbering,  but it not so difficult to convert using 2^zoom-y)

Then the second step is to build the SQLite database for Locus by integrating all these images taking into account the "z" translation  (17-z), using a small PC SW.
  •  

cseu

#13
Courdi95 can you explain the "second step" more in details please... thanks.
  •  

courdi95

#14
To do the second step, you have to build a sqlite database that will contain the 3 files presented before and integrate the data and the map tiles. This operation should be done with a little pcsw containing a sqlite driver for the database creation and edition.
For me, i will use windev framework to do that.
  •