Python Forum
Finding overlap of boxed coordinates
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding overlap of boxed coordinates
#1
I have a panda dataframe that I would like to now query. The dataframe contains the 4 coordinates of a geographic area using longotude and latitude so effectively each entry represents a box shape. What I would like is to query the dataframe and return one line for every occurrence where box overlaps another box and to miss out any rows where there is a box that has no overlap at all. I am ideally looking to show the number of overlaps a row has and to which original rows all link together to form this overlap. Further down the line I would like to visually represent these on the screen to show the overlap perhaps with a backing image to give context.

An example of the data is below (which is for Mars) which uses aerocentric latitude and an east positive longitude I think it was which goes up to 360 from the central point.

UPPER_LEFT_LONGITUDE 347.15
UPPER_LEFT_LATITUDE -36.545832
UPPER_RIGHT_LONGITUDE 347.69
UPPER_RIGHT_LATITUDE -36.486035
LOWER_LEFT_LONGITUDE 347.81
LOWER_LEFT_LATITUDE -40.795116
LOWER_RIGHT_LONGITUDE 348.38
LOWER_RIGHT_LATITUDE -40.735216

Any help appreciated.
Reply


Messages In This Thread
Finding overlap of boxed coordinates - by 83dons - Aug-31-2021, 01:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Efficient way to mark entries in df with overlap in time ranges Andreas_Python 0 1,620 Mar-24-2021, 02:10 PM
Last Post: Andreas_Python
  Finding Coordinates Sikum7 0 1,700 Mar-27-2019, 11:25 AM
Last Post: Sikum7

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020