File tree Expand file tree Collapse file tree 4 files changed +46
-29
lines changed Expand file tree Collapse file tree 4 files changed +46
-29
lines changed Original file line number Diff line number Diff line change 8787 "ol-stac" : " ^1.0.0-rc.10" ,
8888 "pbf" : " ^4.0.1" ,
8989 "pmtiles" : " ^3.0.7" ,
90- "proj4" : " ^ 2.19.3" ,
91- "proj4-list" : " ^ 1.0.4" ,
90+ "proj4" : " 2.19.3" ,
91+ "proj4-list" : " 1.0.4" ,
9292 "react" : " ^18.0.1" ,
9393 "react-day-picker" : " ^9.7.0" ,
9494 "shpjs" : " ^6.1.0" ,
102102 "@types/colormap" : " ^2.3.4" ,
103103 "@types/d3-color" : " ^3.1.0" ,
104104 "@types/node" : " ^18.15.11" ,
105- "@types/proj4" : " ^2.5.6 " ,
105+ "@types/proj4" : " 2.19.0 " ,
106106 "@types/shpjs" : " ^3.4.7" ,
107107 "@types/uuid" : " ^10.0.0" ,
108108 "rimraf" : " ^3.0.2" ,
Original file line number Diff line number Diff line change @@ -213,6 +213,8 @@ export async function executeSQLProcessing(
213213 const processedGeoJSONString = new TextDecoder ( ) . decode ( processedBytes ) ;
214214 Gdal . close ( dataset ) ;
215215
216+ const layerName = `${ layerNamePrefix } ${ processingType . charAt ( 0 ) . toUpperCase ( ) + processingType . slice ( 1 ) } ` ;
217+
216218 if ( ! embedOutputLayer ) {
217219 // Save the output as a file
218220 const jgisFilePath = tracker . currentWidget ?. model . filePath ;
@@ -242,7 +244,7 @@ export async function executeSQLProcessing(
242244 type : 'VectorLayer' ,
243245 parameters : { source : newSourceId } ,
244246 visible : true ,
245- name : outputFileName ,
247+ name : layerName ,
246248 } ;
247249
248250 model . sharedModel . addSource ( newSourceId , sourceModel ) ;
@@ -254,15 +256,15 @@ export async function executeSQLProcessing(
254256
255257 const sourceModel : IJGISSource = {
256258 type : 'GeoJSONSource' ,
257- name : `${ layerNamePrefix } ${ processingType . charAt ( 0 ) . toUpperCase ( ) + processingType . slice ( 1 ) } ` ,
259+ name : `${ layerName } Source ` ,
258260 parameters : { data : processedGeoJSON } ,
259261 } ;
260262
261263 const layerModel : IJGISLayer = {
262264 type : 'VectorLayer' ,
263265 parameters : { source : newSourceId } ,
264266 visible : true ,
265- name : ` ${ layerNamePrefix } ${ processingType . charAt ( 0 ) . toUpperCase ( ) + processingType . slice ( 1 ) } ` ,
267+ name : layerName ,
266268 } ;
267269
268270 model . sharedModel . addSource ( newSourceId , sourceModel ) ;
Original file line number Diff line number Diff line change @@ -61,29 +61,22 @@ def defineProcessingType():
6161 file for file in os .listdir (processingSchemaDir ) if file .endswith (".json" )
6262 ]
6363
64- params = []
6564 for filename in filenamesSchema :
66- filename = f"{ processingSchemaDir } /{ filename } "
67- with open (filename , "r" ) as f :
68- e = json .loads (f .read ())
65+ schemaFilename = f"{ processingSchemaDir } /{ filename } "
6966
70- toAdd = {}
71- toAdd ["description" ] = e ["description" ]
67+ processingParams = {}
68+ with open (schemaFilename , "r" ) as f :
69+ e = json .loads (f .read ())
7270
73- params . append ( toAdd )
71+ processingParams [ "description" ] = e [ "description" ]
7472
75- filenamesProcessConfig = [
76- file for file in os .listdir (processingConfigDir ) if file .endswith (".json" )
77- ]
78-
79- cnt = 0
80- for filename in filenamesProcessConfig :
81- filename = f"{ processingConfigDir } /{ filename } "
82- with open (filename , "r" ) as f :
73+ configName = f"{ processingConfigDir } /{ filename } "
74+ with open (configName , "r" ) as f :
8375 e = json .loads (f .read ())
8476 for x in e :
85- params [cnt ][x ] = e [x ]
86- cnt += 1
77+ processingParams [x ] = e [x ]
78+
79+ params .append (processingParams )
8780
8881 os .makedirs (directory , exist_ok = True )
8982 generateJsonMerge ()
Original file line number Diff line number Diff line change @@ -851,7 +851,7 @@ __metadata:
851851 " @types/colormap " : ^2.3.4
852852 " @types/d3-color " : ^3.1.0
853853 " @types/node " : ^18.15.11
854- " @types/proj4 " : ^2.5.6
854+ " @types/proj4 " : 2.19.0
855855 " @types/shpjs " : ^3.4.7
856856 " @types/uuid " : ^10.0.0
857857 ajv : ^8.14.0
@@ -869,8 +869,8 @@ __metadata:
869869 ol-stac : ^1.0.0-rc.10
870870 pbf : ^4.0.1
871871 pmtiles : ^3.0.7
872- proj4 : ^ 2.19.3
873- proj4-list : ^ 1.0.4
872+ proj4 : 2.19.3
873+ proj4-list : 1.0.4
874874 react : ^18.0.1
875875 react-day-picker : ^9.7.0
876876 rimraf : ^3.0.2
@@ -3578,7 +3578,7 @@ __metadata:
35783578 languageName : node
35793579 linkType : hard
35803580
3581- " @types/proj4@npm:^2.5.6 " :
3581+ " @types/proj4@npm:2.19.0 " :
35823582 version : 2.19.0
35833583 resolution : " @types/proj4@npm:2.19.0"
35843584 dependencies :
@@ -10064,14 +10064,36 @@ __metadata:
1006410064 languageName : node
1006510065 linkType : hard
1006610066
10067- " proj4-list@npm:^ 1.0.4 " :
10067+ " proj4-list@npm:1.0.4 " :
1006810068 version : 1.0.4
1006910069 resolution : " proj4-list@npm:1.0.4"
1007010070 checksum : 3833f61bbbc93684e97555fa11db72009954565ad56313d7dd306ab7c9e4fc480ab64280ae418c0108ee83d0ae0810b334a42dbf8f8f8be4d58371a29a8a35ef
1007110071 languageName : node
1007210072 linkType : hard
1007310073
10074- " proj4@npm:*, proj4@npm:^2.1.4, proj4@npm:^2.19.3 " :
10074+ " proj4@npm:* " :
10075+ version : 2.19.7
10076+ resolution : " proj4@npm:2.19.7"
10077+ dependencies :
10078+ mgrs : 1.0.0
10079+ wkt-parser : ^1.5.1
10080+ checksum : fb8a9b0fbc2666fc21fbb6daa39e3a532d39766dd84997091c6bec020d2d97576236c287e8d46ec8d579ff4882ea6b3cf011a0073422d28c092883851c87fe0f
10081+ languageName : node
10082+ linkType : hard
10083+
10084+ " proj4@npm:2.19.3 " :
10085+ version : 2.19.3
10086+ resolution : " proj4@npm:2.19.3"
10087+ dependencies :
10088+ mgrs : 1.0.0
10089+ wkt-parser : ^1.5.1
10090+ peerDependencies :
10091+ geotiff : " *"
10092+ checksum : 59c9c18fd0dfc48f2b4b5e14e350cf3f366e70f39407bb3a7f27b4da922c4ae75222837f9d61227b0ed2722a8cbb6891027470748eec993e36d2f1d642f1bdf7
10093+ languageName : node
10094+ linkType : hard
10095+
10096+ " proj4@npm:^2.1.4 " :
1007510097 version : 2.19.6
1007610098 resolution : " proj4@npm:2.19.6"
1007710099 dependencies :
You can’t perform that action at this time.
0 commit comments