Support for georeferenced raster images

Started by feeblebrox, March 02, 2011, 22:34:33

0 Members and 1 Guest are viewing this topic.

feeblebrox

Adding a small suggestion to the list... How about considering implementing support for some type of georeferenced raster image format? or even better .shp support... Is this even doable?
  •  

Menion

#1
Hi,
  hmm you can use raster images in same way as I use TAR files. When you have any raster image and some identical points (points in some coordinates system and pixel system of map) you can use this method to get them into application viewtopic.php?f=21&t=3

it's not much user friendly, I know. But it was still not a priority.

Shape files, I don't know anything about them. You mean some vector ArcGIS shape files?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

feeblebrox

#2
Ah, nice. i must have missed this converter when i looked for a solution. I will try if out later, thanks :)
About the .shp, yes you are correct, its the arcGIS vector format. I use this in my work for isobaths for depth charts and such.
  •  

Menion

#3
Oki, try converter. It works for my old Ozi Maps. I don't know if anyone use it but I founded useful to upload my work here ..

about arcgis format. May you send me some very little file? I want to look at it how it looks. Thanks ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

feeblebrox

#4
This worked nicely! loaded and displayed with no problems. However im getting a serious loss of color information by this method. Have you see this problem too? Could this be due to source file, .png? Should i convert that first? I did not convert from ozi format, but rather made my own georeferenced raster image directly and ran through the image cutter.
  •  

Menion

#5
Hmm I didn't noticed this. Try to convert source ozi files if you have them. There also can be problem in image cutter :) If so, send me please some small map and I'll try to fix this ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

cseu

#6
Ok one quick workaround about this... but i should warn that it's for rather experienced IT/GIS users...

It requires the latest version of Global Mapper (12.01), a local webserver and MOBAC... (on OS X Apache comes preinstalled and easy to start thru system preferences, on Windows you can install Xampp).

Open all your Ozi maps in GM (you don't even have to convert the rasters since GM reads both Ozf2 and Ozfx3 formats), GeoTIFFs, ECW and everything you need... You can also import your shapefiles over it and apply the styles you want. Go to projections settings and chose Mercator, WGS84 datum. (you don't really have to do that because OSM export will automatically convert it to Mercator projection, but it's better to preview what the actual map will look like).

Now go to export web formats and choose the OSM Tiles format... if you have one or more shapefile overlays make sure to tick the export vector data checkbox. Choose the maximum scale and the number of smaller scale levels you want to export (if you choose 15 as maximum and 3 levels, it will generate tiles for the following levels of zoom : 13, 14 and 15). Choose a folder and export... the process can be rather long depending on the size of the map...

Now copy those folders in the root of your webserver. Configure a custom OSM map in MOBAC (use the read me file it explains how to edit the settings.xml) for the address give it you local webserver (typically http://localhost/ if you've copied the exported folders directly to the root of your webserver, on OS X Snow Leopard /Library/WebServer/Documents/ ) now open MOBAC, navigate to the aera covered by your map using google or OSM... once you're around it switch to your custom map (of course using the corresponding level of zoom you've exported !) you should see you map... proceed as usual to create the sqlitedb map in MOBAC, make sure to tick all the desired zoom levels (like 13, 14 and 15 in my example)... and You're done.

Of course you can use this method to make really complete and complex maps, like using a 25k for 2 zoom levels 14 or 15, export those 2. Next load a 50k map of the same area and export only the level 13. Load another 100k scale map and export level 12... gather all the 12, 13, 14 and 15 folders and make a single map in MOBAC... you should now see different scale maps in each different zoom levels. Possibilities are huge, but the process is rather complex i agree... anyway i found this a good method of making maps that suits my specific needs.

Cheers.
  •  

feeblebrox

#7
Well, this is spot-on. I have been trying to come up with ways to make this type of map import/export to work but never got quite this far in the thinking :) I tried a quickie one-level map with this method and it seems to work nicely, but as you say, its not really userfriendly or streamlined... GIS-ok. webserver and that stuff-not so much, but i got it working. I will look into this method more for the advanced maps i want, and use the image cutter for the ones i need fast and easy.

Thank you very much for this!
  •  

cseu

#8
Glad to help ! Let me know if you need anything... That's the best way i've found so far but i'm still working on it...

Another tip for you feeblebrox, you can also load from GM all the .map files from a folder, gather them into a "group", edit the group to crop all white collars from the maps at once (either autocrop, which sometimes doesn't work well, or pixel based crops) then apply a nice shading of ASTER DEM on the maps (using multiply with an atlas shader and fiddling a bit with the different settings), then run the export of the tiles... once you got it, it's really just computer process time, the manual part is actually quite short... i combine also 25k maps up to level 15 or 16 with orthophotos at level 17 or more... once again huge possibilities.

Of course it was easier for me before with OziCE, i've gathered quite a useful collection of topographic maps over the years, from different countries i often go to, i used to copy the 1000 .map files along with their rasters on the SD card, and nothing else to worry about, the indexing was maybe a little bit long on first run but then it was super fast... life was easy by then, lol.
Now the Ozi guy... nobody knows what is he up to, he served an experimental alpha version a couple of months ago, barely usable, he doesn't communicate much and it's not a good sign... ah yeah the only thing he has done was completely changing the structure of the Ozfx3 format in order to screw other developers that was trying to make a decent alternative to Ozi (i'm thinking about Androzic)... good lesson of fair play !
Of course i miss the good old OziCE, and it bothers me having to spend a lot of time on converting my once ready to use map collection on other programs, i've read all the discussions here about supporting Ozf format, the first thing i've noticed is that it would require the use of an external library and Menion was not really willing to do so, which i totally understand, that's the reason why i haven't insisted on that particular function in the forums...
I was also thinking... what if he does ? Well, reading the Ozf format is one thing, interpreting all the different grids and datum is another... right now i'm really using a lot all the following projections and datums : UTM with ETRS89 and ED50 for Spain, all kind of Lambert II and Lambert 93 with corresponding NTF and RGF93 for France, Swiss grid with CH1903 for Switzerland, OS Grid with OSGB36 for UK... i use also a little bit less maps from other countries like Italy, Germany... and i don't even know exactly the projection they're in... So to sum up, supporting Ozf would be cool, but supporting in only with mercator and WGS84 would be completely useless (since we still would have to reproject all the maps), and i don't even wanna think about the huge amount of work it would represent of adapting all those transformations of projections and grids in a program like Locus and even with time i think it would lead the development of the app in a way that is the exact opposite of where it goes now.

Ok i post the message in this thread which is not really the place, it should belong more to the thread "which map format to support" but one thing leading to another i just wanted to share my thoughts about this and since we were talking first about georef raster images, it is not that much out of context ;-) I would be glad to know what you guys think about this.

Cheers,

Cseu.
  •  

Menion

#9
Hi guys,
  just quick explanation from me.

1. for using original OZF files, exist tool named Androzic I think, that should handle ozfx3 files directly.

2. I'm still working on Locus as you see, and support of different coordinate systems and projections isn't something, that "normal" user use. I want mainly do tool for normal users, not experts. On second side, If you create TAR map with locus and look into XML configuration file of every map, there is place to extension into another projections and datums. It's not my priority but if you want to slowly experience and increase usability of locus in this way, we should. Anyway always will be here need for converting maps into png or jpeg tiles packed in tar file. Support of OZFX files is currently out of my time possibilities.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

cseu

#10
I share the same views... and that's what i'm saying, since we would definitely have to convert the maps anyway, we'd better off reprojecting them as well, taking benefits of the nice sqlitedb format.
Thanks.
  •  

Gregorx

#11
Hi,
Thanks a lot for this great idea !! Even if I don't manage to do all the job... :'(
In fact, I can't see my tiles in MOBAC...

I resume my steps (apologizes for my poor english...):

1 - ECW in Global Mapper.
2 - Export Web Format => Google Map tiles
3 - Copy of the folders in the root of xampp (htdocs)
4 - settings.xml modified => Scan25_BIBI (french humor ! ^^) appears in MOBAC sources
5 - I'm still looking for my tiles... :'(

I had note something wrong with my tiles, after export from Global mapper :
test lot of tiles concern Vaison-la-Romaine (Vaucluse - France) ; opening the hmtl genrate by GlobalM, tiles appears between...Mali and niger !
Should be a mystake in my cooking...
Even if I look for them in Africa in MOBAC, I still can't find my tiles.....!!!
My first ECW is in french coordinate system lambert3 carto - WGS84; can it provide from a projection problem ?
Although, Global mapper well overlay the ECW and the tiles...
Zoom problem ?
I've tried too (with soom 3) : I still can't fin my tiles...

So, please...HEELLPPP !!! :D

Seriously : any idea ?

Has someone any idea ? I'll really be angry if I can't manage to use Locus :/
  •  

sinda

#12
Try OSM Tiles format instead of Google Map tiles.
  •  

Gregorx

#13
Thanks a lot ! I finally can find my tiles now !  :mrgreen:

Thus, I still note the same (second) problem : they appear between Mali & Niger....  :evil:
It can't be a projection problem, because this raster has been made by IGN (National Institute of Geography).
I think I should forget something during or before the export...
So, I've tried to reproject my raster (both session and registered), but nothing seems to work.

Has anybody encountered the same difficulties ?

Thank you again ;)
  •  

thivi

#14
Quote from: "cseu"Ok one quick workaround about this... but i should warn that it's for rather experienced IT/GIS users...
It requires the latest version of Global Mapper (12.01), a local webserver and MOBAC... (on OS X Apache comes preinstalled and easy to start thru system preferences, on Windows you can install Xampp).
[...]

Many thanks for this cseu ! Thanks to you I managed to transfer my huge amount of scanned maps in OziExplorer to Locus  :D
Good news there is no need of a local webserver anymore. After you have export your OSM tiles from Global Mapper (really a great piece of software!) you just have to create a local mapsource in MOBAC. Two steps:
1. Download //https://mobac.svn.sourceforge.net/svnroot/mobac/trunk/MOBAC/mapsources/Example%20custom%20tile%20files%20source.xml in mapsources directory of MOBAC. Edit the <name> and the <sourceFolder> tags to suit your needs.
2. in setings.xml, add your new mapsource in the <mapSourcesEnabled> section.
Now you can open MOBAC and follow the end of your method.

Don't know from which version of MOBAC it's working, mine is 1.9b6 and it's fine.
Found this in "Custom atlas as map source / locally generated tiles" section of the README.HTM file that comes with MOBAC.
  •