Add `ca` to the `to` values
Closed this issue · 6 comments
Hi @tankaru, great effort!
In order to send valid changesets, please add the ca
target value of the image to the changes (making rotations possible also), something like
"changes" : [
{
"image_key" : "gKXDclTG17NdUiEpCMggpA",
"values" : {
"from" : {
"lon" : -118.4999857,
"ca" : 153.45135498046875,
"lat" : 34.0141713
},
"to" : {
"lon" : -118.49996627142858,
// add this
"ca": 153,
"lat" : 34.01417284285714
}
Thank you @peterneubauer for your information.
I read the API document and it seems "ca" is not necessary.
Should I add it?
{
"image_key": "7erPn382xDMtmfdh0xtvUw",
"to": {
"geometry": {
"coordinates": [13.3328, 50.44619],
"type": "Point"
},
"properties": {},
"type": "Feature"
}
},
https://www.mapillary.com/developer/api-documentation/#submit-a-changeset
And it seems your "changes" sample is completely different from API document.
Is that document obsoleted?
Oh, sorry, I just checked the internal changeset representation. Yes, please add the ca
property, that should do the trick. I can test when it is changed if you want to.
- Question
Can I setca
to -1 to specify ca is not changed? Like this:
{
"image_key": "7erPn382xDMtmfdh0xtvUw",
"to": {
"geometry": {
"coordinates": [13.3328, 50.44619],
"type": "Point"
},
"properties": {
"ca": -1
},
"type": "Feature"
}
},
- Reason
I need the latestca
data to setca
in a changeset submission.
Now I retrieve image data (key, coordinates, ca) via sequence API. But coordinates and ca data retrieved from sequence API is sometimes old (I don't know why).
I should use image API to obtain the latest coordinates and ca. However in this case I should call image API several hundreds times. It's not acceptable for mapillary server and also for me, API call is limited to 10000 per month.
So I don't want to specify ca to a certain value.
Actually, let me change the backend code to accept missing CA
values, in that case you don't have to change anything. I will report back when that is done.
Works now.
@peterneubauer Thanks a lot!