The Following User Says Thank You to vadp For This Useful Post: | ||
|
2010-11-03
, 08:52
|
|
Posts: 224 |
Thanked: 80 times |
Joined on Nov 2009
|
#32
|
cd C:\<location>\bsb2tiles C:\<location>\bsb2tiles>python bsb2gdal.py c:\<source directory> -c -t C:\<destination directory>
|
2010-11-03
, 09:24
|
Posts: 40 |
Thanked: 18 times |
Joined on May 2008
|
#33
|
At the CMD I access the script with the following:
Code:cd C:\<files location>\bsb2tiles C:\<location of files>\bsb2tiles>python bsb2gdal.py c:\<source directory> -c -t C:\<destination directory>
cd /d <drive>:\<source directory> bsb2gdal.py
bsb2gdal.py --cut
gdal2tiles.py <vrt file>
tiles-merge.py --gtiles <pyramid folder>
The Following User Says Thank You to vadp For This Useful Post: | ||
|
2010-11-03
, 20:35
|
|
Posts: 224 |
Thanked: 80 times |
Joined on Nov 2009
|
#34
|
|
2010-11-04
, 11:31
|
Posts: 40 |
Thanked: 18 times |
Joined on May 2008
|
#35
|
|
2010-11-05
, 03:19
|
|
Posts: 224 |
Thanked: 80 times |
Joined on Nov 2009
|
#36
|
If so, you can check if it works
Code:cd /d <drive>:\<source directory> bsb2gdal.py
Then you just type (do not hit Enter):
Then drag a .KAP file here from the Explorer's file list window, then hit Enter. You should get .vrt file.Code:bsb2gdal.py --cut
C:\Maps\NewZealand>bsb2gdal.py -d --cut C:\Maps\NewZealand\NZ21.kap DEBUG:root:{'broken_raster': None, 'cut': True, 'get_cutline': None, 'dtm': None , 'use_dtm': None, 'bsb_proj': None, 'debug': True, 'datum': None, 'quiet': None , 'blend_dist': None, 'last_column_bug': None, 'long_names': None, 'dest_dir': ' ', 'bsb_datum': None, 'srs': None, 'proj': None} DEBUG:root:['! Created by mc2bsbh beta09 - Use at your own risk!', '! MD5SUM 4a4 515550f69362eb58e8b080c10acdf', '! GETMAP http://charts.linz.govt.nz/tifs/nz21.t if', '! WARNING! Not to be used for navigation.', '! MAPCPR Sourced from Land In formation New Zealand data. Crown Copyright Reserved.', '! CALCPR Calibration by Marco Certelli. Free for PERSONAL (non-commercial) use only.', 'VER/2.0', 'BSB/ NA=Norfolk Island to Cape Egmont,NU=NZ21(INT641),RA=8504,12992,DU=309', 'KNP/SC= 1500000,GD=WGS84,PR=MERCATOR,PP=-23,PI=UNKNOWN,SP=UNKNOWN,SK=0.0,TA=90.0,UN=METE RS,SD=LOWEST ASTRONOMICAL TIDE,DX=123.46,DY=123.46', 'CED/SE=2005,RE=199,ED=10/3 0/2009', 'OST/1', 'REF/1,8032,1213,-28,177', 'REF/2,8033,10816,-38,177', 'REF/3, 768,10816,-38,168', 'REF/4,767,12293,-39.4333333,168', 'REF/5,768,8802,-36,168', 'REF/6,767,6840,-34,168', 'REF/7,768,4924,-32,168', 'REF/8,767,3050,-30,168', ' REF/9,472,2127,-29,167.633333', 'REF/10,471,1214,-28,167.633333', 'REF/11,471,70 0,-27.4333333,167.633333', 'REF/12,8033,699,-27.4333333,177', 'REF/13,8032,2127, -29,177', 'REF/14,8033,3049,-30,177', 'REF/15,8033,3982,-31,177', 'REF/16,8033,4 924,-32,177', 'REF/17,8033,5877,-33,177', 'REF/18,8034,6841,-34,177', 'REF/19,80 33,7815,-35,177', 'REF/20,8033,8802,-36,177', 'REF/21,8033,9802,-37,177', 'REF/2 2,8033,11844,-39,177', 'REF/23,8033,12292,-39.4333333,177', 'REF/24,471,11843,-3 9,167.633333', 'REF/25,471,9802,-37,167.633333', 'REF/26,472,7815,-35,167.633333 ', 'REF/27,472,5877,-33,167.633333', 'REF/28,471,3983,-31,167.633333', 'REF/29,3 997,699,-27.4333333,172', 'REF/30,3996,1213,-28,172', 'REF/31,3996,3050,-30,172' , 'REF/32,3996,4924,-32,172', 'REF/33,3996,6840,-34,172', 'REF/34,3996,8803,-36, 172', 'REF/35,3996,10816,-38,172', 'REF/36,3996,12293,-39.4333333,172', 'CPH/0.0 ', 'PLY/1,-27.4329697,168.508336', 'PLY/2,-28.562655,168.508384', 'PLY/3,-28.558 2023,167.633597', 'PLY/4,-39.4339571,167.633333', 'PLY/5,-39.4333334,174.566667' , 'PLY/6,-39.0000001,174.566667', 'PLY/7,-39,174.966667', 'PLY/8,-38.1833335,174 .966667', 'PLY/9,-38.1833333,177', 'PLY/10,-27.4333333,177', 'DTM/0,0', 'IFM/4', 'RGB/1,255,255,255', 'RGB/2,10,10,10', 'RGB/3,200,0,255', 'RGB/4,241,185,255', 'RGB/5,60,190,217', 'RGB/6,197,235,244', 'RGB/7,98,171,116', 'RGB/8,246,200,110' ] INFO:root: C:\Maps\NewZealand\NZ21.kap - Norfolk Island to Cape Egmont DEBUG:root:gdaltransform -tps -i -t_srs +proj=longlat C:\Maps\NewZealand\NZ21.ka p DEBUG:root:('1177.48132351963 698.165854778137 0\n1177.7057324942 1727.257272287 99 0\n471.831471934524 1722.51303476368 0\n470.751540657892 12290.2286919792 0\n 6068.08746619724 12285.7027812577 0\n6068.08511972069 11841.0032599708 0\n6391.0 7235584312 11840.9187311518 0\n6391.06362576488 11003.6105320604 0\n8033.0002443 801 11003.6205704853 0\n8033.00000052232 698.999726849576 0\n', 'ERROR 6: Unable to load PROJ.4 library (proj.dll), creation of\nOGRCoordinateTransformation fai led.\n') DEBUG:root:[(1, 8032, 1213, -28, 177), (2, 8033, 10816, -38, 177), (3, 768, 1081 6, -38, 168), (4, 767, 12293, -39.433333300000001, 168), (5, 768, 8802, -36, 168 ), (6, 767, 6840, -34, 168), (7, 768, 4924, -32, 168), (8, 767, 3050, -30, 168), (9, 472, 2127, -29, 167.63333299999999), (10, 471, 1214, -28, 167.6333329999999 9), (11, 471, 700, -27.433333300000001, 167.63333299999999), (12, 8033, 699, -27 .433333300000001, 177), (13, 8032, 2127, -29, 177), (14, 8033, 3049, -30, 177), (15, 8033, 3982, -31, 177), (16, 8033, 4924, -32, 177), (17, 8033, 5877, -33, 17 7), (18, 8034, 6841, -34, 177), (19, 8033, 7815, -35, 177), (20, 8033, 8802, -36 , 177), (21, 8033, 9802, -37, 177), (22, 8033, 11844, -39, 177), (23, 8033, 1229 2, -39.433333300000001, 177), (24, 471, 11843, -39, 167.63333299999999), (25, 47 1, 9802, -37, 167.63333299999999), (26, 472, 7815, -35, 167.63333299999999), (27 , 472, 5877, -33, 167.63333299999999), (28, 471, 3983, -31, 167.63333299999999), (29, 3997, 699, -27.433333300000001, 172), (30, 3996, 1213, -28, 172), (31, 399 6, 3050, -30, 172), (32, 3996, 4924, -32, 172), (33, 3996, 6840, -34, 172), (34, 3996, 8803, -36, 172), (35, 3996, 10816, -38, 172), (36, 3996, 12293, -39.43333 3300000001, 172)] DEBUG:root:{'PR': 'MERCATOR', 'PP': '-23', 'SP': 'UNKNOWN', 'SD': 'LOWEST ASTRON OMICAL TIDE', 'SK': '0.0', 'GD': 'WGS84', 'DY': '123.46', 'DX': '123.46', 'UN': 'METERS', 'SC': '1500000', 'PI': 'UNKNOWN', 'TA': '90.0'} INFO:root: WGS84, MERCATOR DEBUG:root:(0, 0) DEBUG:root:+proj=merc +lat_ts=-23 +datum=WGS84 +nodefs DEBUG:root:proj +proj=merc +lat_ts=-23 +datum=WGS84 +nodefs Traceback (most recent call last): File "C:\Maps\bsb2tiles\bsb2gdal.py", line 321, in <module> kap2vrt(f) File "C:\Maps\bsb2tiles\bsb2gdal.py", line 239, in kap2vrt command(['proj'] + out_srs.split(), latlong).splitlines()] File "C:\Maps\bsb2tiles\bsb2gdal.py", line 88, in command process=Popen(params,stdin=PIPE, stdout=PIPE, stderr=PIPE, universal_newline s=True) File "C:\Python26\lib\subprocess.py", line 623, in __init__ errread, errwrite) File "C:\Python26\lib\subprocess.py", line 833, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified
|
2010-11-05
, 07:11
|
|
Posts: 224 |
Thanked: 80 times |
Joined on Nov 2009
|
#37
|
|
2010-11-05
, 10:06
|
Posts: 40 |
Thanked: 18 times |
Joined on May 2008
|
#38
|
Code:'ERROR 6: Unable to load PROJ.4 library (proj.dll), creation of\nOGRCoordinateTransformation fai led.\n') ... DEBUG:root:proj +proj=merc +lat_ts=-23 +datum=WGS84 +nodefs ... WindowsError: [Error 2] The system cannot find the file specified
|
2010-11-05
, 10:24
|
|
Posts: 224 |
Thanked: 80 times |
Joined on Nov 2009
|
#39
|
|
2010-11-05
, 10:53
|
|
Posts: 224 |
Thanked: 80 times |
Joined on Nov 2009
|
#40
|
Setting environment for using the GDAL and MapServer tools. Hiding the OCI plugin library. C:\Maps\bsb2tiles>cd /d c:\Maps\NewZealand C:\Maps\NewZealand>bsb2gdal.py --cut -d C:\Maps\NewZealand\NZ2325_2.kap INFO:root:C:\Maps\NewZealand\NZ2325_2.kap DEBUG:root:['! Created by mc2bsbh beta09 - Use at your own risk!', '! GETMAP htt p://charts.linz.govt.nz/tifs/nz2325.tif', '! MD5SUM 1f0bcf293b76f65fcbbe322fe472 f586', '! IMGMOD nz2325.tif 0 3900 4201 1432 1914', '! MAPCPR Sourced from Land Information New Zealand data. Crown Copyright Reserved.', '! CALCPR Calibration by Marco Certelli. Free for PERSONAL (non-commercial) use only.', '! WARNING! No t to be used for navigation.', 'VER/2.0', 'BSB/NA=Lake Taupo (Taupomoana) - Boat Harbour Kawakawa Point,NU=NZ2325_2,RA=1432,1914,DU=302', 'KNP/SC=5000,GD=WGS84, PR=TRANSVERSE MERCATOR,PP=175.821,PI=UNKNOWN,SP=UNKNOWN,SK=0.0,TA=90.0,UN=METERS ,SD=Minimum Lake Operating Level (355.85m amls),DX=0.42,DY=0.42', 'CED/SE=2006,R E=70,ED=3/30/2007', 'OST/1', 'REF/1,82,1833,-38.6833333,175.816667', 'REF/2,1349 ,1832,-38.6833333,175.822833', 'REF/3,1349,84,-38.6766667,175.822833', 'REF/4,82 ,84,-38.6766667,175.816667', 'CPH/0.0', 'PLY/1,-38.6766667,175.816667', 'PLY/2,- 38.6830333,175.816667', 'PLY/3,-38.6830333,175.822833', 'PLY/4,-38.6766667,175.8 22833', 'DTM/0,0', 'IFM/4', 'RGB/1,255,255,255', 'RGB/2,10,10,10', 'RGB/3,200,0, 255', 'RGB/4,241,185,255', 'RGB/5,60,190,217', 'RGB/6,197,235,244', 'RGB/7,98,17 1,116', 'RGB/8,246,200,110'] DEBUG:root:['gdaltransform', '-tps', '-i', '-t_srs', '+proj=longlat', 'C:\\Maps\ \NewZealand\\NZ2325_2.kap'] ERROR:root: Traceback (most recent call last): File "C:\Maps\bsb2tiles\bsb2gdal.py", line 247, in <module> kap2vrt(f) File "C:\Maps\bsb2tiles\bsb2gdal.py", line 181, in kap2vrt poly_tr=command(['gdaltransform','-tps','-i','-t_srs','+proj=longlat', kap], latlong).splitlines() File "C:\Maps\bsb2tiles\bsb2gdal.py", line 74, in command raise Exception("*** External program failed: %s" % params[0]) Exception: *** External program failed: gdaltransform
A guy at a Russian forum asked me for giving him instruction in Russian, so I've posted them here http://n8xx.com/post54305.html#p54305. Unfortunately I'm quite busy at the moment to prepare an English version of these. As soon as I have a bit more time I'll come back to this.
Meanwhile, perhaps Google Translate might help (although the translation is pretty much terrible):
http://translate.google.com/translat...post54305.html