I have a JPEG image with Exif data that I can use to get latitude, longitude, altitude. How can I determine whether a coordinate (latitude, longitude, altitude) is inside or outside the above image?

  • 3
    \$\begingroup\$ I'm voting to close this question because it is about geospatial information system processing or calculation of GPS coordinates that is outside the scope of creating, capturing, editing, or processing still photography. \$\endgroup\$
    – scottbb
    Jul 29, 2018 at 19:08
  • \$\begingroup\$ Possibly this might be better on gis.stackexchange.com, given what it seems like you are trying to do. \$\endgroup\$
    – mattdm
    Jul 30, 2018 at 6:18

1 Answer 1


To get this information you also need the direction, North for instance. Then you get the angle of view and create infinite triangle. Then you can check if the coordinates are inside this triangle or not.

If you are searching for a formula to do this, it would be better to ask your question at math.stackexchange.com.

Also you should consider your understanding of "inside". If you have a hill, house, tree between camera and the coordinates, you will not see the point, but it will be within your angle of view (based on the photo).

The angle of view is a property of your lens. Moreover, based on your question at StackOverflow, you need the angle between the focal axis of a lens and the surface because you can't be sure your drone is perpendicular to the ground. In general your question has nothing to do with photography. It is mathematical.

  • 1
    \$\begingroup\$ Also, your calculation may be incorrect if indoors. Or if the lens cap is on. \$\endgroup\$
    – mattdm
    Jul 29, 2018 at 17:19
  • \$\begingroup\$ Hi @Romeo Ninov, how to get the angle of view and create infinite triangle ?. I don't know manner to do this operation, can you talk more detail ? thank you! \$\endgroup\$
    – IT 999
    Jul 30, 2018 at 2:59
  • \$\begingroup\$ Please see my updated answer \$\endgroup\$ Jul 30, 2018 at 4:11
  • 1
    \$\begingroup\$ Hi @Romeo Nivov, I understand your answer, thank you so much! \$\endgroup\$
    – IT 999
    Jul 31, 2018 at 2:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.