Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bsose server logic #346

Open
wants to merge 8 commits into
base: server
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
drop multipolygon and winding from bsose
  • Loading branch information
bkatiemills committed Sep 10, 2024
commit d5650be648b4f22fecaf7029a2ce782157284a0c
25 changes: 0 additions & 25 deletions bsose-spec.json
Original file line number Diff line number Diff line change
@@ -113,12 +113,6 @@
{
"$ref": "#/components/parameters/box"
},
{
"$ref": "#/components/parameters/multipolygon"
},
{
"$ref": "#/components/parameters/winding"
},
{
"$ref": "#/components/parameters/center"
},
@@ -537,15 +531,6 @@
"enum": ["minimal"]
}
},
"winding": {
"in": "query",
"name": "winding",
"description": "Enforce ccw winding for polygon and multipolygon",
"schema": {
"type": "string",
"enum": ["true"]
}
},
"genericID": {
"in": "query",
"name": "id",
@@ -565,16 +550,6 @@
"example": "[[-74.1,40.5],[-73.7,40.5],[-74.0,40.8],[-74.1,40.5]]"
}
},
"multipolygon": {
"in": "query",
"name": "multipolygon",
"description": "array of polygon regions; region of interest is taken as the intersection of all listed polygons.",
"allowReserved": true,
"schema": {
"type": "string",
"example": "[[[0,0],[0,1],[1,1],[1,0],[0,0]],[[0.5,0],[0.5,1],[1.5,1],[1.5,0],[0.5,0]]]"
}
},
"box": {
"in": "query",
"name": "box",
44 changes: 0 additions & 44 deletions nodejs-server/api/openapi.bsose.yaml
Original file line number Diff line number Diff line change
@@ -137,27 +137,6 @@ paths:
schema:
type: string
example: "[[0,0],[1,1]]"
- name: multipolygon
in: query
description: array of polygon regions; region of interest is taken as the
intersection of all listed polygons.
required: false
style: form
explode: true
allowReserved: true
schema:
type: string
example: "[[[0,0],[0,1],[1,1],[1,0],[0,0]],[[0.5,0],[0.5,1],[1.5,1],[1.5,0],[0.5,0]]]"
- name: winding
in: query
description: Enforce ccw winding for polygon and multipolygon
required: false
style: form
explode: true
schema:
type: string
enum:
- "true"
- name: center
in: query
description: center to measure max radius from when defining circular region
@@ -687,17 +666,6 @@ components:
type: string
enum:
- minimal
winding:
name: winding
in: query
description: Enforce ccw winding for polygon and multipolygon
required: false
style: form
explode: true
schema:
type: string
enum:
- "true"
genericID:
name: id
in: query
@@ -720,18 +688,6 @@ components:
schema:
type: string
example: "[[-74.1,40.5],[-73.7,40.5],[-74.0,40.8],[-74.1,40.5]]"
multipolygon:
name: multipolygon
in: query
description: array of polygon regions; region of interest is taken as the intersection
of all listed polygons.
required: false
style: form
explode: true
allowReserved: true
schema:
type: string
example: "[[[0,0],[0,1],[1,1],[1,0],[0,0]],[[0.5,0],[0.5,1],[1.5,1],[1.5,0],[0.5,0]]]"
box:
name: box
in: query
4 changes: 2 additions & 2 deletions nodejs-server/controllers/Timeseries.js
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@
var utils = require('../utils/writer.js');
var Timeseries = require('../service/TimeseriesService');

module.exports.findtimeseries = function findtimeseries (req, res, next, timeseriesName, id, startDate, endDate, polygon, box, multipolygon, winding, center, radius, presRange, compression, mostrecent, data, batchmeta) {
Timeseries.findtimeseries(timeseriesName, id, startDate, endDate, polygon, box, multipolygon, winding, center, radius, presRange, compression, mostrecent, data, batchmeta)
module.exports.findtimeseries = function findtimeseries (req, res, next, timeseriesName, id, startDate, endDate, polygon, box, center, radius, presRange, compression, mostrecent, data, batchmeta) {
Timeseries.findtimeseries(timeseriesName, id, startDate, endDate, polygon, box, center, radius, presRange, compression, mostrecent, data, batchmeta)
.then(function (response) {
utils.writeJson(res, response);
})
4 changes: 1 addition & 3 deletions nodejs-server/service/TimeseriesService.js
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@
* endDate Date ISO 8601 UTC date-time formatted string indicating the end of the time period of interest. (optional)
* polygon String array of [lon, lat] vertices describing a polygon bounding the region of interest; final point must match initial point (optional)
* box String lon, lat pairs of the lower left and upper right corners of a box on a mercator projection, packed like [[lower left lon, lower left lat],[upper right lon, upper right lat]] (optional)
* multipolygon String array of polygon regions; region of interest is taken as the intersection of all listed polygons. (optional)
* winding String Enforce ccw winding for polygon and multipolygon (optional)
* center List center to measure max radius from when defining circular region of interest; must be used in conjunction with query string parameter 'radius'. (optional)
* radius BigDecimal km from centerpoint when defining circular region of interest; must be used in conjunction with query string parameter 'center'. (optional)
* presRange List Pressure range in dbar to filter for; levels outside this range will not be returned. (optional)
@@ -21,7 +19,7 @@
* batchmeta String return the metadata documents corresponding to a temporospatial data search (optional)
* returns List
**/
exports.findtimeseries = function(timeseriesName,id,startDate,endDate,polygon,box,multipolygon,winding,center,radius,presRange,compression,mostrecent,data,batchmeta) {
exports.findtimeseries = function(timeseriesName,id,startDate,endDate,polygon,box,center,radius,presRange,compression,mostrecent,data,batchmeta) {
return new Promise(function(resolve, reject) {
var examples = {};
examples['application/json'] = [ {