Author Topic: How to import ecw maps ?  (Read 13091 times)

Offline courdi95

  • More than Newbie
  • *
  • Posts: 12
    • View Profile
How to import ecw maps ?
« on: March 14, 2011, 07:32:08 »
Hello,

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

How to do that ?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline berkley

  • Expert
  • Master of Locus
  • ****
  • Posts: 900
  • Thanked: 1 times
    • View Profile
  • Device: 1+1, N7
Re: How to import ecw maps ?
« Reply #1 on: March 14, 2011, 08:47:21 »
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
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
 

Offline courdi95

  • More than Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to import ecw maps ?
« Reply #2 on: March 14, 2011, 09:08:08 »
"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 ?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12140
  • Thanked: 616 times
    • View Profile
    • http://www.asamm.com
  • Device: Pixel 2
Re: How to import ecw maps ?
« Reply #3 on: March 14, 2011, 11:09:59 »
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.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Top links
- Official help desk (ideas, questions, problems): help.locusmap.eu
- Advanced topics, public discussions, sharing of knowledges, beta versions: you're here!
- Beta versions download: link
 

Offline courdi95

  • More than Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to import ecw maps ?
« Reply #4 on: March 14, 2011, 11:42:27 »
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 ....
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12140
  • Thanked: 616 times
    • View Profile
    • http://www.asamm.com
  • Device: Pixel 2
Re: How to import ecw maps ?
« Reply #5 on: March 14, 2011, 12:04:43 »
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.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Top links
- Official help desk (ideas, questions, problems): help.locusmap.eu
- Advanced topics, public discussions, sharing of knowledges, beta versions: you're here!
- Beta versions download: link
 

Offline courdi95

  • More than Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to import ecw maps ?
« Reply #6 on: March 14, 2011, 12:08:01 »
okay .... I will try that ... but however it would be fine to have that description... I will post one if you are OK .
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12140
  • Thanked: 616 times
    • View Profile
    • http://www.asamm.com
  • Device: Pixel 2
Re: How to import ecw maps ?
« Reply #7 on: March 14, 2011, 12:09:28 »
every description that should be useful to any other user, is more then welcome!
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Top links
- Official help desk (ideas, questions, problems): help.locusmap.eu
- Advanced topics, public discussions, sharing of knowledges, beta versions: you're here!
- Beta versions download: link
 

Offline courdi95

  • More than Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to import ecw maps ?
« Reply #8 on: March 14, 2011, 12:46:54 »
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 ?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline Menion

  • Locus team
  • Professor of Locus
  • *****
  • Posts: 12140
  • Thanked: 616 times
    • View Profile
    • http://www.asamm.com
  • Device: Pixel 2
Re: How to import ecw maps ?
« Reply #9 on: March 14, 2011, 12:57:12 »
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
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Top links
- Official help desk (ideas, questions, problems): help.locusmap.eu
- Advanced topics, public discussions, sharing of knowledges, beta versions: you're here!
- Beta versions download: link
 

Offline courdi95

  • More than Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to import ecw maps ?
« Reply #10 on: March 14, 2011, 13:45:04 »
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.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline cseu

  • More than Newbie
  • *
  • Posts: 33
    • View Profile
Re: How to import ecw maps ?
« Reply #11 on: March 14, 2011, 15:12:05 »
Hi courdi95... have a look at this post : viewtopic.php?f=13&t=280#p1107
Let me know if you need any help.
Cheers.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline courdi95

  • More than Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to import ecw maps ?
« Reply #12 on: March 14, 2011, 15:50:11 »
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.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline cseu

  • More than Newbie
  • *
  • Posts: 33
    • View Profile
Re: How to import ecw maps ?
« Reply #13 on: March 14, 2011, 18:23:18 »
Courdi95 can you explain the “second step” more in details please... thanks.
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline courdi95

  • More than Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to import ecw maps ?
« Reply #14 on: March 14, 2011, 22:45:50 »
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.
« Last Edit: January 01, 1970, 01:00:00 by Guest »