You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove route module and refactor signatures of handlers; consumers can no longer use FeatureServer.route. If using this directly with Express, you need to define each route and bind to the correct FeatureServer handler.
Copy file name to clipboardexpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -57,12 +57,12 @@ The Koop dependency graph is shown below.
57
57

58
58
59
59
### Test Coverage
60
-
Test coverages for each package are shown below. Coverage for some packages includes integration tests as opposed to true unit tests. Difference in coverage is shown below. Our goal is to have complete unit test coverage, and breakout integration/e2e tests separately.
60
+
Test coverages for each package are shown below. Coverage for winnow package includes integration tests as opposed to true unit tests. Our goal is to have complete unit test coverage, and breakout integration/e2e tests separately.
Pass in an `incoming request object`, an `outgoing response object`, a `geojson` object, and `options` and this function will route and return a geoservices compliant response
- _Note_: only `query`, `info`, and `generateRenderer` are supported methods at this time.
51
-
52
-
```js
53
-
FeatureServer.route(req, res, data, options)
54
-
```
55
-
56
-
-**data** is either a geojson object extended with some additional properties or an object with a layers property which an array of extended geojson objects. These properties are optional and can be used to provide more specific metadata or to shortcut the built in filtering mechanism.
57
-
58
-
e.g.
59
-
60
-
```js
61
-
{
62
-
type:'FeatureCollection'// Static
63
-
features:Array, // GeoJSON features
64
-
statistics:Object, // pass statistics to an outStatistics request to or else they will be calculated from geojson features passed in
65
-
metadata: {
66
-
id: number, // The unique layer id. If supplied for one layer, you should supply for all layers to avoid multiple layers having the same id.
67
-
name:String, // The name of the layer
68
-
description:String, // The description of the layer
69
-
copyrightText:String, // The copyright text (layer attribution text)
70
-
extent:Array, // valid extent array e.g. [[180,90],[-180,-90]]
71
-
displayField:String, // The display field to be used by a client
72
-
geometryType:String// REQUIRED if no features are returned with this object Point || MultiPoint || LineString || MultiLineString || Polygon || MultiPolygon
73
-
idField:String, // unique identifier field,
74
-
maxRecordCount:Number, // the maximum number of features a provider can return at once
75
-
limitExceeded:Boolean, // whether or not the server has limited the features returned
76
-
timeInfo:Object, // describes the time extent and capabilities of the layer,
77
-
transform:Object, // describes a quantization transformation
78
-
renderer:Object, // provider can over-ride default symbology of FeatureServer output with a renderer object. See https://developers.arcgis.com/web-map-specification/objects/simpleRenderer, for object specification.
79
-
defaultVisibility: boolean, // The default visibility of this layer
80
-
minScale: number, // The minScale value for this layer
81
-
maxScale: number, // The maxScale value for this layer
quantization:Boolean// True if the provider supports quantization
93
-
},
94
-
filtersApplied: {
95
-
all:Boolean// true if all post processing should be skipped
96
-
geometry:Boolean, // true if a geometric filter has already been applied to the data
97
-
where:Boolean, // true if a sql-like where filter has already been applied to the data
98
-
offset:Boolean// true if the result offset has already been applied to the data,
99
-
limit:Boolean// true if the result count has already been limited,
100
-
projection:Boolean// true if the result data has already been projected
101
-
}
102
-
count:Number// pass count if the number of features in a query has been pre-calculated
103
-
}
104
-
```
105
-
106
-
or
107
-
108
-
```js
109
-
{
110
-
layers: [
111
-
{
112
-
type:'FeatureCollection'
113
-
...
114
-
},
115
-
{
116
-
type:'FeatureCollection'
117
-
...
118
-
}
119
-
]
120
-
```
121
-
- **options** is an object that dictates method actions. See `FeatureServer.query` and `FeatureServer.generateRenderer` for more details.
122
-
123
40
### FeatureServer.query
124
41
Pass in `geojson` and `options` (a valid [geoservices query object](https://geoservices.github.io/query.html)), and the function will perform the query and return a valid geoservices query object. The in addition to input `statistics: {}`, following is an example of _all_ query `options` that can be passed into the query route: '/FeatureServer/:layer/query'
0 commit comments