-
Notifications
You must be signed in to change notification settings - Fork 4
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
Owc fixes #98
Owc fixes #98
Conversation
…et-Request to some WFS typeName.
… from example-context; reading description also for WFS'es
@boeckMt : should we create another |
There are further Issues in creating layers from Offerings.
Then
For WFS we maybe also should check if the minimum required parameters are in the |
Update Types to fit the OWS Context GeoJSON Standard #97 e.g. values was changed to use period in display and not providing it like Geoserver
and now it can also be {
"name": "time",
"values": "2003-01-01T00:00:00.000Z/2018-01-01T00:00:00.000Z",
"units": "ISO8601",
"display": {
"default": "2003-01-01T00:00:00Z",
"period": "P1Y"
}
} |
Fix createLayerFromOffering(offering: IOwsOffering, resource: IOwsResource, context: IOwsContext, targetProjection: string): Observable<Layer> {
const layerType = this.getLayertypeFromOfferingCode(offering);
if (isRasterLayertype(layerType)) {
return this.createRasterLayerFromOffering(offering, resource, context, targetProjection);
} else if (isVectorLayertype(layerType)) {
return this.createVectorLayerFromOffering(offering, resource, context);
} else if (layerType === TmsLayertype) {
return this.createTmsLayerFromOffering(offering, resource, context, targetProjection);
} else {
// console.error(`This type of service (${layerType}) has not been implemented yet.`);
console.warn(`This type of service (${layerType}) has not been implemented yet.`);
return of(<Layer>{});
}
} Try to prevent using |
… offering.content or offering.operation instead of blindly choosing the first in list
Just to clarify: Here, do you mean that we should replace the type |
No what I wanted to say is that we have to check if there is a
We have such a function but it is not used in in the owc service https://github.com/dlr-eoc/ukis-frontend-libraries/blob/v7.3.2-next.3/projects/services-ogc/src/lib/owc/owc-json.service.ts#L199 But your proposal is a good Idea. We could type it e.g. type isoInterval = `${string}/${string}`;
type intervalPeriod = `${isoInterval}/P${string}`;
export interface IEocOwsResourceDimension {
name: 'time' | 'elevation';
/**
* For time:
* - '1984-01-01T00:00:00.000Z,1990-01-01T00:00:00.000Z,1995-01-01T00:00:00.000Z'
* - '2000-09-01T00:00:00.000Z/2017-08-31T00:00:00.000Z/P1D'
*/
values: `${string},` | isoInterval | intervalPeriod;
...
} It is not catching all cases but a bit more typesave. |
@@ -461,6 +469,7 @@ export class OwcJsonService { | |||
return this.createTmsLayerFromOffering(offering, resource, context, targetProjection); | |||
} else { | |||
console.error(`This type of service (${layerType}) has not been implemented yet.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here it would be good if you also log the resource or offering so that the use knows what is causing this problem
Not quite sure if I'm getting this right, but doesn't getTimeDimensions already check for the presence of a period in a I'm not certain if convertOwcTimeToIsoTimeAndPeriodicity is being used anywhere at all. It might be obsolete by now and replaced by |
Ah we used it in an earlier version of But it looks like it is replaced by other functions, so you can remove it (but list it in the Breaking Changes please). The only thing which is missing is, if And parsing of the const getMapOperation = offering.operations.find(o => o.code === 'GetMap');
- const urlParams = getMapOperation.href;
+ const urlParams = this.getJsonFromUri(getMapOperation.href); And can you pleas change https://github.com/dlr-eoc/ukis-frontend-libraries/blob/owcFixes/projects/services-ogc/src/lib/owc/owc-json.service.ts#L740 const params: IWmsParams = {
LAYERS: urlParams['LAYERS'],
FORMAT: urlParams['FORMAT'],
TIME: urlParams['TIME'],
VERSION: urlParams['VERSION'],
TILED: urlParams['TILED'],
TRANSPARENT: true,
STYLES: defaultStyle
}; to const params: IWmsParams = {
LAYERS: urlParams['LAYERS'],
TRANSPARENT: true,
STYLES: defaultStyle
};
if (urlParams['FORMAT']) {
params.FORMAT = urlParams['FORMAT'];
}
if (urlParams['TIME']) {
params.TIME = params.urlParams['TIME'];
}
if (urlParams['VERSION']) {
params.VERSION = urlParams['VERSION'];
}
if (urlParams['TILED']) {
params.TILED = urlParams['TILED'];
} |
Has been replaced by getTimeDimensions
…r via offering.styles or via GetMap operation. All WMS-paras only set when actually present.
All right, all comments are handled and all tests & build are working. Thanks a lot for the help, @boeckMt ! If nothing else is missing, I could now push new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like everything is good now, great work.
Yes you can make the pre version.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
This PR fixes a few errors in the current implementation of
OwcJsonService
createVectorLayerFromOffering
didn't work properly with WFS'esdescription
based on an OWC'sabstract
fieldWhat is the new behavior?
Errors have been fixed.
Does this PR introduce a breaking change?
Other information
Is it part of one/more packages and which?
@dlr-eoc/services-ogc