diff --git a/app/node-backend/README.md b/app/node-backend/README.md new file mode 100644 index 0000000..15f6bf2 --- /dev/null +++ b/app/node-backend/README.md @@ -0,0 +1,39 @@ +# node-backend + +## Usage + +### With Docker + +1. Make sure Docker is installed on your system. +2. Navigate to the ``/WebMLOpenEO/app/node-backend`` in your terminal. +3. Run the following command to build the Docker image: + ```bash + docker build -t node-backend . +4. Run the following command to run the application: + ```bash + docker run -p 3000:3000 --name node-backend node-backend +### Without Docker + +1. Make sure node.js is installed on your system. +2. Navigate to ``/WebMLOpenEO/app/node-backend`` in your terminal. +3. Run the following command to install all dependencies: + ```bash + npm install +3. Run the following command to run the application: + + ```bash + npm start + +## Testing + +1. Make sure node.js is installed on your system. +2. Navigate to ``/WebMLOpenEO/app/node-backend`` in your terminal. +3. Run the following command to install all dependencies: + ```bash + npm install +3. Run the following command to test the application: + + ```bash + npm test + +> Attention! As this app is heavily dependent on the R-backend, 6 out of 14 tests will fail if the R-backend is not accessible. To start it, please refer to its README. \ No newline at end of file diff --git a/app/node-backend/validation_schemes/classify_further_details.js b/app/node-backend/validation_schemes/classify_further_details.js index 60cd9e7..b7cfc76 100644 --- a/app/node-backend/validation_schemes/classify_further_details.js +++ b/app/node-backend/validation_schemes/classify_further_details.js @@ -108,10 +108,12 @@ function validate_CRS(feature_collection) // Proj4-Definition for Web Mercator (EPSG:3857) const webMercatorDef = proj4.defs('EPSG:3857'); - // add more CRS and alias then proj4-default: + // add more CRS and alias then proj4-default: + // TODO: Any CRS or alias could simply be added here. proj4.defs('urn:ogc:def:crs:EPSG:3857', proj4.defs('EPSG:3857')); proj4.defs('urn:ogc:def:crs:EPSG:4326', proj4.defs('EPSG:4326')); proj4.defs('urn:ogc:def:crs:OGC:1.3:CRS84', proj4.defs('EPSG:4326')); + proj4.defs('urn:ogc:def:crs:OGC::CRS84', proj4.defs('EPSG:4326')); // lookup sourceCRS const sourceCRS = proj4.defs(feature_collection.crs.properties.name); diff --git a/app/node-backend/validation_schemes/classify_schemas.js b/app/node-backend/validation_schemes/classify_schemas.js index ec58db1..9d7d780 100644 --- a/app/node-backend/validation_schemes/classify_schemas.js +++ b/app/node-backend/validation_schemes/classify_schemas.js @@ -100,7 +100,8 @@ const validCRS = [ 'EPSG:102113', 'urn:ogc:def:crs:EPSG:3857', 'urn:ogc:def:crs:EPSG:4326', - 'urn:ogc:def:crs:OGC:1.3:CRS84' + 'urn:ogc:def:crs:OGC:1.3:CRS84', + 'urn:ogc:def:crs:OGC::CRS84' ]; const CRS_SCHEMA = JOI.object(