Closed Karol-Kolenda closed 1 week ago
Hi Karol,
Please could you provide the full payload that you are using? Many thanks
No problem, here it is (remove "representation" and it will be accepted, otherwise Spatial Reference error occurs):
{
"schemaVersion": "3.2.4",
"data": {
"Source": {
"actionType": "amendment",
"currentTraOwner": 2,
"traCreator": 2,
"traAffected": [
2
],
"section": "All sections",
"reference": "O369",
"troName": "AA Order 1",
"provision": [
{
"reference": "R121645",
"actionType": "partialAmendment",
"orderReportingPoint": "permanentNoticeOfMaking",
"provisionDescription": "No waiting 8am-6pm",
"regulatedPlace": [
{
"description": "THORNE ROAD",
"geometry": {
"version": 1,
"LinearGeometry": {
"direction": "bidirectional",
"lateralPosition": "onKerb",
"representation": "linear",
"linestring": "SRID=27700;LINESTRING(459201.736 404452.05,459190.787 404441.797,459190.783 404441.793,459182.434 404433.845,459177.286 404428.996,459173.069 404425.04)"
},
"externalReference": [
{
"lastUpdateDate": "1981-02-08 11:30:43",
"uniqueStreetReferenceNumber": {
"usrn": 96854586
}
}
]
}
}
],
"regulation": [
{
"generalRegulation": {
"regulationType": "kerbsideLimitedWaiting"
},
"condition": [
{
"timeValidity": {
"validPeriod": [
{
"start": "",
"recurringTimePeriodOfDay": [
{
"startTimeOfPeriod": "08:00:00",
"endTimeOfPeriod": "18:00:00"
}
]
}
]
}
}
]
}
]
}
]
}
}
}
Thanks @Karol-Kolenda - I have replicated this process in Integration. We will consider and get back to you.
In the current build, there is a sensitivity around the sequence of the fields in "LinearGeometry". By changing to the following sequence: direction, lateralPosition, linestring, representation, I have been able to send my own version of the above payload and get a 201. The amended section is as per below:
"LinearGeometry": {
"direction": "bidirectional",
"lateralPosition": "onKerb",
"linestring": "SRID=27700;LINESTRING(459201.736 404452.05,459190.787 404441.797,459190.783 404441.793,459182.434 404433.845,459177.286 404428.996,459173.069 404425.04)",
"representation": "linear"
},
We recognise that it shouldn't really matter what the sequence of these terms and have been working on a fix which will be rolled out in the next update. However, in the interim, using the above modified sequence should solve the problem.
I confirm that changing attribute order makes the issue to go away. Thank you, John, for investigating it.
When I am trying to provide mandatory field (v3.2.4) "representation" set to "linear" in LinearGeometry object (in regulatedPlace), submission is rejected by the service with the following error code (despite the fact that WKT representation is preceeded with valid SRID):
"message":"British National Grid - Spatial Reference is not present within the geometry or is referenced incorrectly.","path":"Source.provision.regulatedPlace.geometry"
However, when I remove "representation" key completely (making object invalid according to schema 3.2.4), submission is processed successfully.