convertGeoJSON if both PR and id are given for UOM
@kogliny CC @gehrmann @fhoueto.amz @debasisc Steve Tomlinson
For convertgeojson, if both VerticalUnitZ and persistableReferenceUnitZ are given then it uses the PR. I would have expected it used the id.
-
confirm with @gehrmann the expected behavior. Is it like for CRS that UOM should prefer "id" or is it "pr"? -
if "id" is to be dominant than fix the code. -
document the behavior. -
I was not sure whether VerticalUnitZ is already part of the FeatureCollection schema or was added here in the request body as optional new parameter. If not then @gehrmann may need to be added.
Example request:
{
"toCRS": "{{NAMESPACE}}:reference-data--CoordinateReferenceSystem:Geographic2D:EPSG::4326",
"toUnitZ": "{{NAMESPACE}}:reference-data--UnitOfMeasure:m",
"featureCollection": {
"features": [
{
"geometry": {
"coordinates": [
313405.9477893702,
6944797.620047403,
6.561679790026246
],
"bbox": null,
"type": "AnyCrsPoint"
},
"bbox": null,
"properties": {},
"type": "AnyCrsFeature"
}
],
"bbox": null,
"properties": {},
"CoordinateReferenceSystemID": "{{NAMESPACE}}:reference-data--CoordinateReferenceSystem:BoundProjected:EPSG::23032_EPSG::1612",
"VerticalUnitZ": "{{NAMESPACE}}:reference-data--UnitOfMeasure:ft",
"persistableReferenceUnitZ": "{\"scaleOffset\":{\"scale\":10.3048,\"offset\":0.0},\"symbol\":\"ft\",\"baseMeasurement\":{\"ancestry\":\"Length\",\"type\":\"UM\"},\"type\":\"USO\"}",
"type": "AnyCrsFeatureCollection"
}
}
response (note in the request ft is defined as 10.3048m by PR; and by 1ft=0.3048m as "id". The correct answer for z=2m in this case but returns like 67m).
{
"successCount": 1,
"totalCount": 1,
"featureCollection": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
5.364754854438938,
62.58480904234893,
67.61679790026245
]
},
"properties": {}
}
],
"properties": {},
"CoordinateReferenceSystemID": "osdu:reference-data--CoordinateReferenceSystem:BoundProjected:EPSG::23032_EPSG::1612",
"persistableReferenceUnitZ": "{\"scaleOffset\":{\"scale\":1.0,\"offset\":0.0},\"symbol\":\"m\",\"baseMeasurement\":{\"ancestry\":\"Length\",\"type\":\"UM\"},\"type\":\"USO\"}"
},
"operationsApplied": [
"conversion from ED_1950_UTM_Zone_32N to GCS_European_1950; 1 points converted",
"transformation GCS_European_1950 to GCS_WGS_1984 using ED_1950_To_WGS_1984_23; 1 points successfully transformed",
"Z-axis unit conversion from ft to m"
]
}
Edited by Bert Kampes