@@ -2839,7 +2839,7 @@ private void executeProcesses(String processID, String processNodeKey) {
28392839 collectionIDs .add (col );
28402840 Collection collection = collectionMap .get (collectionID );
28412841
2842- int srs = getSRSFromCollection (collection );
2842+ String srs = getSRSFromCollection (collection );
28432843
28442844 JSONArray processDataCubeTempExt = new JSONArray ();
28452845 JSONObject spatialExtentNode = new JSONObject ();
@@ -2926,8 +2926,8 @@ else if (processID.equals("filter_bbox")) {
29262926 JSONObject processFilterArguments = processFilter .getJSONObject ("arguments" );
29272927 Collection collection = collectionMap .get (collectionID );
29282928
2929- int srs = getSRSFromCollection (collection );
2930- if (srs > 0 ) {
2929+ String srs = getSRSFromCollection (collection );
2930+ if (! srs . equals ( "" ) ) {
29312931 createBoundingBoxFilterFromArgs (processFilterArguments , srs , collectionID , false );
29322932 }
29332933 }
@@ -3168,7 +3168,7 @@ private String readAll(Reader rd) throws IOException {
31683168// }
31693169// }
31703170
3171- private void createBoundingBoxFilterFromArgs (JSONObject argsObject , int srs , String collectionID , Boolean spatNull ) {
3171+ private void createBoundingBoxFilterFromArgs (JSONObject argsObject , String srs , String collectionID , Boolean spatNull ) {
31723172 String left = null ;
31733173 String right = null ;
31743174 String top = null ;
@@ -3244,14 +3244,14 @@ private void createBoundingBoxFilterFromArgs(JSONObject argsObject, int srs, Str
32443244 SpatialReference src = new SpatialReference ();
32453245 src .ImportFromEPSG (4326 );
32463246 SpatialReference dst = new SpatialReference ();
3247- dst .ImportFromEPSG (srs );
3247+ dst .ImportFromEPSG (new Integer ( srs ) );
32483248 log .debug ("SRS is :" + srs );
32493249 CoordinateTransformation tx = new CoordinateTransformation (src , dst );
32503250 double [] c1 = null ;
32513251 double [] c2 = null ;
32523252 c1 = tx .TransformPoint (Double .parseDouble (bottom ), Double .parseDouble (left ));
32533253 c2 = tx .TransformPoint (Double .parseDouble (top ), Double .parseDouble (right ));
3254- if (srs == 3035 || srs == 4326 ) {
3254+ if (srs . equals ( " 3035" ) || srs . equals ( " 4326" ) ) {
32553255 left = Double .toString (c1 [1 ]);
32563256 bottom = Double .toString (c1 [0 ]);
32573257 right = Double .toString (c2 [1 ]);
@@ -3412,15 +3412,15 @@ else if (spatAxisUpperCase.contentEquals("N") || spatAxisUpperCase.contentEquals
34123412 SpatialReference src = new SpatialReference ();
34133413 src .ImportFromEPSG (4326 );
34143414 SpatialReference dst = new SpatialReference ();
3415- dst .ImportFromEPSG (srs );
3415+ dst .ImportFromEPSG (new Integer ( srs ) );
34163416 log .debug ("SRS is : " + srs );
34173417 CoordinateTransformation tx = new CoordinateTransformation (src , dst );
34183418 double [] c1 = null ;
34193419 double [] c2 = null ;
34203420 c1 = tx .TransformPoint (Double .parseDouble (bottom ), Double .parseDouble (left ));
34213421 c2 = tx .TransformPoint (Double .parseDouble (top ), Double .parseDouble (right ));
34223422 //TODO include other CRS exceptions of different axis order
3423- if (srs == 3035 || srs == 4326 ) {
3423+ if (srs . equals ( " 3035" ) || srs . equals ( " 4326" ) ) {
34243424 left = Double .toString (c1 [1 ]);
34253425 bottom = Double .toString (c1 [0 ]);
34263426 right = Double .toString (c2 [1 ]);
@@ -3654,8 +3654,8 @@ else if (bandCommonName.equals("nir")) {
36543654 }
36553655 }
36563656
3657- private int getSRSFromCollection (Collection collection ) {
3658- int srs = 0 ;
3657+ private String getSRSFromCollection (Collection collection ) {
3658+ String srs = "" ;
36593659 for (Dimension dimension : collection .getCubeColonDimensions ().values ()) {
36603660 if (dimension .getType () == Dimension .TypeEnum .SPATIAL ) {
36613661 srs = ((DimensionSpatial ) dimension ).getReferenceSystem ();
0 commit comments