tankaru / mapillarySequenceStraightener

MIT License
0 stars 0 forks source link

Add `ca` to the `to` values #7

Closed peterneubauer closed 4 years ago

peterneubauer commented 4 years ago

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
                }
tankaru commented 4 years ago

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?

peterneubauer commented 4 years ago

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.

tankaru commented 4 years ago

@peterneubauer,

    {
      "image_key": "7erPn382xDMtmfdh0xtvUw",
      "to": {
        "geometry": {
          "coordinates": [13.3328, 50.44619],
          "type": "Point"
        },
        "properties": {
            "ca": -1
        },
        "type": "Feature"
      }
    },
peterneubauer commented 4 years ago

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.

peterneubauer commented 4 years ago

Works now.

tankaru commented 4 years ago

@peterneubauer Thanks a lot!