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 87
87
"ol-stac" : " ^1.0.0-rc.10" ,
88
88
"pbf" : " ^4.0.1" ,
89
89
"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" ,
92
92
"react" : " ^18.0.1" ,
93
93
"react-day-picker" : " ^9.7.0" ,
94
94
"shpjs" : " ^6.1.0" ,
102
102
"@types/colormap" : " ^2.3.4" ,
103
103
"@types/d3-color" : " ^3.1.0" ,
104
104
"@types/node" : " ^18.15.11" ,
105
- "@types/proj4" : " ^2.5.6 " ,
105
+ "@types/proj4" : " 2.19.0 " ,
106
106
"@types/shpjs" : " ^3.4.7" ,
107
107
"@types/uuid" : " ^10.0.0" ,
108
108
"rimraf" : " ^3.0.2" ,
Original file line number Diff line number Diff line change @@ -213,6 +213,8 @@ export async function executeSQLProcessing(
213
213
const processedGeoJSONString = new TextDecoder ( ) . decode ( processedBytes ) ;
214
214
Gdal . close ( dataset ) ;
215
215
216
+ const layerName = `${ layerNamePrefix } ${ processingType . charAt ( 0 ) . toUpperCase ( ) + processingType . slice ( 1 ) } ` ;
217
+
216
218
if ( ! embedOutputLayer ) {
217
219
// Save the output as a file
218
220
const jgisFilePath = tracker . currentWidget ?. model . filePath ;
@@ -242,7 +244,7 @@ export async function executeSQLProcessing(
242
244
type : 'VectorLayer' ,
243
245
parameters : { source : newSourceId } ,
244
246
visible : true ,
245
- name : outputFileName ,
247
+ name : layerName ,
246
248
} ;
247
249
248
250
model . sharedModel . addSource ( newSourceId , sourceModel ) ;
@@ -254,15 +256,15 @@ export async function executeSQLProcessing(
254
256
255
257
const sourceModel : IJGISSource = {
256
258
type : 'GeoJSONSource' ,
257
- name : `${ layerNamePrefix } ${ processingType . charAt ( 0 ) . toUpperCase ( ) + processingType . slice ( 1 ) } ` ,
259
+ name : `${ layerName } Source ` ,
258
260
parameters : { data : processedGeoJSON } ,
259
261
} ;
260
262
261
263
const layerModel : IJGISLayer = {
262
264
type : 'VectorLayer' ,
263
265
parameters : { source : newSourceId } ,
264
266
visible : true ,
265
- name : ` ${ layerNamePrefix } ${ processingType . charAt ( 0 ) . toUpperCase ( ) + processingType . slice ( 1 ) } ` ,
267
+ name : layerName ,
266
268
} ;
267
269
268
270
model . sharedModel . addSource ( newSourceId , sourceModel ) ;
Original file line number Diff line number Diff line change @@ -61,29 +61,22 @@ def defineProcessingType():
61
61
file for file in os .listdir (processingSchemaDir ) if file .endswith (".json" )
62
62
]
63
63
64
- params = []
65
64
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 } "
69
66
70
- toAdd = {}
71
- toAdd ["description" ] = e ["description" ]
67
+ processingParams = {}
68
+ with open (schemaFilename , "r" ) as f :
69
+ e = json .loads (f .read ())
72
70
73
- params . append ( toAdd )
71
+ processingParams [ "description" ] = e [ "description" ]
74
72
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 :
83
75
e = json .loads (f .read ())
84
76
for x in e :
85
- params [cnt ][x ] = e [x ]
86
- cnt += 1
77
+ processingParams [x ] = e [x ]
78
+
79
+ params .append (processingParams )
87
80
88
81
os .makedirs (directory , exist_ok = True )
89
82
generateJsonMerge ()
Original file line number Diff line number Diff line change @@ -851,7 +851,7 @@ __metadata:
851
851
" @types/colormap " : ^2.3.4
852
852
" @types/d3-color " : ^3.1.0
853
853
" @types/node " : ^18.15.11
854
- " @types/proj4 " : ^2.5.6
854
+ " @types/proj4 " : 2.19.0
855
855
" @types/shpjs " : ^3.4.7
856
856
" @types/uuid " : ^10.0.0
857
857
ajv : ^8.14.0
@@ -869,8 +869,8 @@ __metadata:
869
869
ol-stac : ^1.0.0-rc.10
870
870
pbf : ^4.0.1
871
871
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
874
874
react : ^18.0.1
875
875
react-day-picker : ^9.7.0
876
876
rimraf : ^3.0.2
@@ -3578,7 +3578,7 @@ __metadata:
3578
3578
languageName : node
3579
3579
linkType : hard
3580
3580
3581
- " @types/proj4@npm:^2.5.6 " :
3581
+ " @types/proj4@npm:2.19.0 " :
3582
3582
version : 2.19.0
3583
3583
resolution : " @types/proj4@npm:2.19.0"
3584
3584
dependencies :
@@ -10064,14 +10064,36 @@ __metadata:
10064
10064
languageName : node
10065
10065
linkType : hard
10066
10066
10067
- " proj4-list@npm:^ 1.0.4 " :
10067
+ " proj4-list@npm:1.0.4 " :
10068
10068
version : 1.0.4
10069
10069
resolution : " proj4-list@npm:1.0.4"
10070
10070
checksum : 3833f61bbbc93684e97555fa11db72009954565ad56313d7dd306ab7c9e4fc480ab64280ae418c0108ee83d0ae0810b334a42dbf8f8f8be4d58371a29a8a35ef
10071
10071
languageName : node
10072
10072
linkType : hard
10073
10073
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 " :
10075
10097
version : 2.19.6
10076
10098
resolution : " proj4@npm:2.19.6"
10077
10099
dependencies :
You can’t perform that action at this time.
0 commit comments