robynsb / interactive-track-and-trace

BSD 2-Clause "Simplified" License
0 stars 3 forks source link

Linear transformation for latitude and longitude might not be good enough #12

Closed robynsb closed 6 months ago

robynsb commented 6 months ago

See the following figure image Especially in latitude, the intended coordinates and displayed coordinates are quite far apart for the middle sections of the image. Possibly a more complex transformation could resolve this. Hopefully such an improved transformation is still homogeneous 🤞.

djairoh commented 6 months ago

I've done a little experimenting with the transformation matrix as well, but I can't actually determine where the problem lies. I doubt it's fpe; the difference for the point in Groningen specifically is quite large. Manually adding a particle on top of Groningen outputting the wrong coordinates also supports this.

Have you done any testing/debugging for this one @MakeNEnjoy ?

robynsb commented 6 months ago

My observation is that the points do look correct on the top and bottom, but do not look correct in the middle of the image. I'm sure there exists a transformation that can correct for this. Why don't you think its fpe? @djairoh

djairoh commented 6 months ago

i generated some more glyphs using the following loops image

which produces these glyphs image

I also decreased the glyphsize and then panned the camera around the zoomed in particles, and they all line up to the same display coordinates. If it was fpe i'd expect at least some of the glyphs to be out of line with the others.

djairoh commented 6 months ago

I also checked the actual image we're using for the background - this lines up with the latitude/longitudes used as well, so that shouldn't be the problem either.

robynsb commented 6 months ago

Your glyph grid looking regular makes 100% sense to me. I'm saying the grid looks regular because we're doing linear interpolation between coordinates and screen space. The point is that the map image (i.e screen space) in contrast is not linear, it's got some more complex projection, probably a mercator projection. Therefore I'm suggesting we change the projection in CartographicTransformation.cpp so that if you make a grid spaced equally in lat/lons, the particles DO look more bunched up in the centre and more spread out on the sides. (Which they currently don't) (Or maybe somehow different I'm not sure but the point is that I think they shouldn't be equally spaced)

robynsb commented 6 months ago

I will send Christian an email about this