• Mark Harley (7/23/2014)


    Eirikur Eiriksson (7/23/2014)


    Quick thought, you are using GEOMETRY ( Cartesian / planar ) for geographic operations, must be careful here!

    😎

    I think this is a matter of necessity. In our event data, the event positions are recorded as a LAT and LON, while our locations table contains X and Y coordinates. We're converting the lat/lon to X/Y, which is why we use the geometry type instead of geography. Is that what you were referring to?

    You should be doing this the other way around, taking the X/Y to lat/lon, otherwise the distance calculation is somewhat meaningless. The distance unit in GEOGRAPHY is meter, it is a relative coordinate (grid) value in the GEOMETRY.

    😎