geoadmin / mf-chsdi3

api3.geo.admin.ch source code
https://api3.geo.admin.ch
Other
33 stars 15 forks source link

Fake result in Identify Features in layer ch.bfe.solarenergie-eignung-daecher breaks client applications #3433

Open RobertoMinelli opened 4 years ago

RobertoMinelli commented 4 years ago

While performing an Identify Features request on the ch.bfe.solarenergie-eignung-daecher layer, I discovered that among the results now you have a fake result with "featureId": -99

Screenshot 2020-03-17 at 15 52 04

You use this message when an user opens the visualizer without a selection:

Screenshot 2020-03-17 at 16 21 09

However, this breaks all the client applications relying on the fact that all results of an Identify Features will have the same shape (i.e., attributes, for example). Could you please comment on that?

Best, Roberto

Here you can find a sample request. The fake result is the last one.

davidoesch commented 4 years ago

@boecklic related to today’s deploy? @RobertoMinelli since when is this the case?

RobertoMinelli commented 4 years ago

I have been on hold with my client project for a while — I discovered it yesterday. Debug it today. And here I am.

Thanks for looking into it. IMHO this shouldn't be there, it's highly inconsistent.

davidoesch commented 4 years ago

@mariokeusen - can you check if this is GIGO with BFE as well?

AFoletti commented 4 years ago

This result is nothing new and has always been the case. If you look at the model for both Daecher and Fassaden solarkataster, the results are differenciated by scale. On smaller scales (minscale = 100005) you get the overview result, not the actual roof geometries.

AFoletti commented 4 years ago

Hmmmm... on a closer look, something is really fishy out there. I need to spend some time on it

AFoletti commented 4 years ago

Ok, found it.

Somehow Roberto's mapExtent=0,0,100,100 messes up with chsdi's delicate internal organs and he gets results from both models. If you take Roberto's original request (see the opening comment) and modify mapExtent to mapExtent=1,1,100,100 you only get roof results. test

I cannot rule out that something has effectively changed in this respect (was mapExtent=0,0,100,100 correctly handled before? No idea) but to me the model and the layer work as defined.

Maybe @procrastinatio could tell us something about this behavior?

RobertoMinelli commented 4 years ago

Dear @AFoletti, thanks for looking into the issue.

My code is unchanged in the last months, hence yes, something has changed in your API. I confirm that mapExtent=0,0,100,100 was working before (i.e., all my requests have that mapExtent, since I... never understood what to do with that parameter but it was required).

With mapExtent=1,1,100,100 it seems to be working again. Now I have a failing test when I play with the ch.bfe.solarenergie-eignung-fassaden layer. Apparently I receive a facade with two equal points. I'll look into that.

Best, Roberto

AFoletti commented 4 years ago

@procrastinatio maybe bound to this?