@@ -20,7 +20,7 @@ async function download(filePaths: URL[], outputPath: string, logger: LogType):
2020 } else {
2121 const fileName = basename ( file . pathname ) ;
2222 if ( fileName == null ) throw new Error ( `Unsupported source pathname ${ file . pathname } ` ) ;
23- const localFile = fsa . toUrl ( `${ outputPath } /${ fileName } ` ) ;
23+ const localFile = fsa . toUrl ( `${ outputPath } /downloads/ ${ fileName } ` ) ;
2424 if ( await fsa . exists ( localFile ) ) {
2525 logger . info ( { file : file , localFile, fileName } , 'Download:FileExists' ) ;
2626 } else {
@@ -52,7 +52,7 @@ async function upload(file: URL, bucketPath: URL, logger: LogType): Promise<URL>
5252 }
5353
5454 // Upload to s3 or copy to local
55- let path = new URL ( `topographic/${ CliId } /` , bucketPath ) ;
55+ let path = new URL ( `topographic/${ CliId } /${ filename } ` , bucketPath ) ;
5656 logger . info ( { file : file , path : path } , 'Load:Path' ) ;
5757 if ( path . protocol === 'file:' ) mkdirSync ( path , { recursive : true } ) ;
5858 if ( filename . endsWith ( 'catalog.json' ) ) path = new URL ( filename , bucketPath ) ; // Upload catalog to root directory
@@ -89,6 +89,13 @@ export const JoinArgs = {
8989 defaultValue : ( ) => 'Topographic' ,
9090 defaultValueIsSerializable : true ,
9191 } ) ,
92+ output : option ( {
93+ type : string ,
94+ long : 'output' ,
95+ description : 'Output path for the processing files, default is /tmp/join/' ,
96+ defaultValue : ( ) => '/tmp/join/' ,
97+ defaultValueIsSerializable : true ,
98+ } ) ,
9299 target : option ( {
93100 type : Url ,
94101 long : 'target' ,
@@ -103,7 +110,7 @@ export const JoinCommand = command({
103110 args : JoinArgs ,
104111 async handler ( args ) {
105112 const logger = getLogger ( this , args , 'cli-vector' ) ;
106- const outputPath = `/tmp/join/` ;
113+ const outputPath = args . output ;
107114 const tileMatrix = TileMatrixSets . find ( args . tileMatrix ) ;
108115 if ( tileMatrix == null ) throw new Error ( `Tile matrix ${ args . tileMatrix } is not supported` ) ;
109116 const bucketPath = new URL ( `vector/${ tileMatrix . projection . code } /` , args . target ) ;
0 commit comments