Active Topics

 



Notices


Reply
Thread Tools
Posts: 40 | Thanked: 18 times | Joined on May 2008
#41
Originally Posted by janszoon View Post
you mean under my computer>>advanced>> environmental variables>>Path ?
No, bsb2gdal.bat sets impermanent environment at the command prompt, so you check the path there.

It looks like you messed up with GDAL, as now the script complains it cannot find gdal utilities. Which version do you use?

bsb2gdal.bat is scecifically tailored to work with GDAL from http://vbkto.dyndns.org/sdk/release-...server-5-6.zip.
So, if you installed any other version -- remove it.
Then install the version above. Check bsb2gdal.bat for Python and GDAL locations. Then launch it and type
echo %PATH%
Then you should find there GDAL locations listed a number of times. Specifically it should contain pieces like this:
<GDAL location>\bin;<GDAL location>\bin\proj\apps;<GDAL location>\bin\gdal\apps;
etc, etc

Last edited by vadp; 2010-11-05 at 18:47.
 
janszoon's Avatar
Posts: 224 | Thanked: 80 times | Joined on Nov 2009
#42
Hey Vadp.

Well I just ran the whole thing on another pc, no probs. So frustrating when the path thing gets all messed I was not able to resovle on y other computer.

Anyway, I now have a gtiles subfolder ready to now put into Mappero. Can you please reconfirm the final step to do this?

Is it as explained here: http://forums.internettablettalk.com...3&postcount=25

or can I load the subfolder to a local webserver and access directly/dload via mappero ?

CHeers
__________________
My N900 Photo Gallery and Slideshow
 
janszoon's Avatar
Posts: 224 | Thanked: 80 times | Joined on Nov 2009
#43
Ok I got the maps into Mappero. I replaced some maps in the cache (google cycling) and now some Nautical maps appear.

Yay !

I just need to experient a bit more now as I have 4 BSBCharts in total (only loaded one) that I want to stitch together to make one set of gtiles.

Is that with tiles-merge.py? I pointed this at the output folder that contains the individual output folders of bsb2gdal but it still creates multiple gtiles subfolders not one.

Also Mappero, has an Auto download tick box that overwrites the cache...woops....probably need to disable that?

So I'm probably going about this in a backward way, but at least my maps are now usable.

I still would like to figure out how I could:
  • Add my own repository
  • Have the maps be a 'layer' over another map (turn on/off like in output htmls of gdal2tiles.py)
  • prevent automatic override ;-)
__________________
My N900 Photo Gallery and Slideshow
 
Posts: 40 | Thanked: 18 times | Joined on May 2008
#44
Originally Posted by janszoon View Post
Ok I got the maps into Mappero. I replaced some maps in the cache (google cycling) and now some Nautical maps appear.
Congratulations! Well done!

I just need to experient a bit more now as I have 4 BSBCharts in total (only loaded one) that I want to stitch together to make one set of gtiles.
Like this:
Code:
tiles-merge.py <folder 1> <folder 2> <folder 3> <folder 4> <result folder>
You can try to play with the source folder's order to get a better result. BTW you can also play with zoom parameter for gdal2tiles.py. I'd also recommend '-r antialias' there as well.

Only then
Code:
tiles-merge.py --gtiles <result folder>
I've got N810, so I cannot help that much with mappero tuning, but it seems you'd be able to add your own repository there.

As for layering a custom map over another one, it's reportedly possible, but I do that a different way. I have assigned a hardware button (fullscreen in my case) to switch between repositories, so I can easily flip between a number maps.

Good luck!

Last edited by vadp; 2010-11-06 at 13:57.
 

The Following User Says Thank You to vadp For This Useful Post:
janszoon's Avatar
Posts: 224 | Thanked: 80 times | Joined on Nov 2009
#45
VadP. Your scripts and instructions and help are very greatly appreciated. Thanks very much !!

I will experiment further with the above.

Do you reacall any other threads about custom layering? I see that Google traffic, Yandex Traffic ad Yandex Hybrid can be layered over a google map. If I could layer the Nauticals in the same way that would be quite cool.

Also: If you have time to explain the webserver approach to adding a repository that would be appreciated too

thanks again for your time and scripts !

J
__________________
My N900 Photo Gallery and Slideshow

Last edited by janszoon; 2010-11-06 at 19:53.
 
Posts: 40 | Thanked: 18 times | Joined on May 2008
#46
Originally Posted by janszoon View Post
VadP. Your scripts and instructions and help are very greatly appreciated. Thanks very much !!
Glad you managed to pass safely these rocks and shoals Just to remind you the result of the scripts are not the official charts, so take any care.

Do you reacall any other threads about custom layering? I see that Google traffic, Yandex Traffic ad Yandex Hybrid can be layered over a google map. If I could layer the Nauticals in the same way that would be quite cool.
The thing with the layers that they are semi-transparent. The charts are fully opaque, so for me the layers are less useful in this case, but YMMV.

Also: If you have time to explain the webserver approach to adding a repository that would be appreciated too
webserver approach is less effective as you can put a full chart straight into you machine, so I do not use it anymore. Anyway, deploying a web server would be another challenge
 
janszoon's Avatar
Posts: 224 | Thanked: 80 times | Joined on Nov 2009
#47
Hi there, anyone following this thread ? :-) if you are, the update is that I have been trialling ModRana the last few days. A cool application, plenty of features.

Just in relation to above, it allows you to overlay maps (repositories) and change the opacity settings. I am now viewing my Nautical maps, overlayed to Google satellite images which fills in all the 'Land Gaps' to my ocean charts. Very nice !

Uses same Map/tiles repositories as Mappero.

MartinK is a very engaged developer and answered my query around this quickly. Just sharing with you here in case helpful.

ModRana uses the same folder and file structure as Mappero and also supports custom layer definitions, the only difference is, that there is no GUI for managing the layer definitions in modRana (yet).

Map tiles are stored in MyDOcs/.maps, each layer has its own folder there (its the same in Mappero).

If you want to make a custom layer, just go to /opt/modrana/map_config.conf, copy one of the layer definitions, and modify it like this:
Code:
Code:
[osma]
  label=My custom layer
  url=http://my.custom.tiles.url
  type=png
  max_zoom=17
  min_zoom=0
  folder_prefix=my_custom_layer_folder
  coordinates=osm
label is the name for the layer displayed in modRana
url if your custom tiles are not accessible from somewhere online, just paste some nonexistent url there, so that automatic downloads for tiles outside of you coverage will fail
folder_prefix a folder in MyDocs/.maps/ where you have the tiles for your custom layer

Or, you can just dump the tiles to a tile folder for an existing layer, modRana will happily use the new tiles, even if they don't actually belong to the layer.

Also make sure that options->map->storage is set to files (eq. modRana the tiles files and not the sqlite database to load/store tiles).
BTW, a files -> db batch-loader is planed, as the database is much more space efficient than so many folders and small files, on the FAT32 filesystem.
All the best. happy Fishing/Sailing
__________________
My N900 Photo Gallery and Slideshow
 
Posts: 5 | Thanked: 0 times | Joined on Nov 2010
#48
Thanks for the awesome work vadp! I'm almost there, but have an error on Win7 x64 using the following command:

bsb2gdal.py -d -c -tout 18448_1.KAP

DEBUG:root'', '')
DEBUG:root:gdalwarp -tps -dstalpha -wo INIT_DEST=NO_DATA -wo CUTLINE=POLYGON(())
-of VRT out\18446_1.aux_vrt out\18446_1.vrt
DEBUG:root'', 'ERROR 1: Failed to parse CUTLINE geometry wkt.\n')
Traceback (most recent call last):
File "bsb2gdal.py", line 286, in <module>
kap2vrt(f)
File "bsb2gdal.py", line 238, in kap2vrt
command(warp_cmd)
File "bsb2gdal.py", line 80, in command
raise Exception("*** External program failed: %s\n%s" % (' '.join(params),st
derr))
Exception: *** External program failed: gdalwarp -tps -dstalpha -wo INIT_DEST=NO
_DATA -wo CUTLINE=POLYGON(()) -of VRT out\18446_1.aux_vrt out\18446_1.vrt
ERROR 1: Failed to parse CUTLINE geometry wkt.

If I remove the "-c" then it works fine, but somehow the cutline is making it complain. Should the "POLYGON" field should have some real content? Also, I'm not quite certain which of the many versions of gdal2tiles.py which are floating around I should use. I'm currently using "$Id: gdal2tiles.py 18194 2009-12-06 20:07:45Z rouault $". All of the other tools I'm using are referenced on the Russian website mentioned on page 4 of this thread.

Here's a copy of the local variables just before the call to gdalwarp.

http://www.flickr.com/photos/41484197@N00/5180700599/

Note that "poly_tr" is also null.

My apologies for not getting very far with this, but this is my first day trying to debug python code.

Last edited by jaybonomad; 2010-11-16 at 07:46.
 
Posts: 40 | Thanked: 18 times | Joined on May 2008
#49
I'm currently using "$Id: gdal2tiles.py 18194 2009-12-06 20:07:45Z rouault $"
This wasn't a good one to pick up! In general the version attached to the 1st post is a working one, the others are for testing.

Originally Posted by jaybonomad View Post
-wo CUTLINE=POLYGON(()) -of VRT out\18446_1.aux_vrt out\18446_1.vrt
ERROR 1: Failed to parse CUTLINE geometry wkt.
That's correct the POLYGON thing must have a list of pixel coordinates to crop the raster. Can you post a full dump of the command?

BTW I've just noticed -t or --dest-dir option is buggy, so don't use it at the moment. Perhaps it'd be better to drop it altogether.

The Russian post just describes how to install the tool kit on Windows, the rest is essentially the same to the Linux workflow.

Here I'm attaching a version of gdal2tiles.py without --dest-dir option.

So see if it make any difference, otherwise check if your KAP file has "PLY/" parameters.

PS: I'll be out for a couple of weeks, so don't become frustrated

Last edited by vadp; 2010-11-16 at 14:12.
 

The Following User Says Thank You to vadp For This Useful Post:
Posts: 5 | Thanked: 0 times | Joined on Nov 2010
#50
Originally Posted by vadp View Post
That's correct the POLYGON thing must have a list of pixel coordinates to crop the raster. Can you post a full dump of the command?
The file has 4 /PLY elements. Using your latest bsb2gdal.py does not change the core problem:

Here's a link to the BSB and KAP: http://cid-c65543daf04f23c4.office.l...Dal1/18448.zip

Here's a link to the error:
http://cid-c65543daf04f23c4.office.l...18448error.txt
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:44.