GeoDaCenter / spatial_access

https://spatial.uchicago.edu
37 stars 11 forks source link

run check on spatial extent #17

Closed jkoschinsky closed 5 years ago

jkoschinsky commented 5 years ago

can we add a test on the spatial extent to make sure it's not wider or longer than, e.g. an MSA? Let us know if you want distance inputs for this.

from George: I was running the code on Jerry's data and it was taking an unexpectedly long time, then I ran out of hard drive space. There are a couple coordinates in the data which are far outside of Chicago (LA and DC actually), and a number that are in the Chicago suburbs. I think this just underscores the importance of adding some of the data checks. Ultimately, I think we do want a input data verification in the web app, but until we have that, it may be good to add a quick check in the back-end code?

lmnoel commented 5 years ago

In the past I've looked for a formula for converting two coordinates of a bounding box on a sphere to spatial area, but was unable to find one. Could you point me in the right direction?

jkoschinsky commented 5 years ago

how about calculating the distance between the two upper points, e.g. here: https://stackoverflow.com/questions/19412462/getting-distance-between-two-points-based-on-latitude-longitude/43211266#43211266 and then doing the same for one of the upper and lower points. When you multiple them you have the area?

On Fri, 9 Nov 2018 at 15:51, Logan Noel notifications@github.com wrote:

In the past I've looked for a formula for converting two coordinates of a bounding box on a sphere to spatial area, but was unable to find one. Could you point me in the right direction?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GeoDaCenter/spatial_access/issues/17#issuecomment-437506137, or mute the thread https://github.com/notifications/unsubscribe-auth/ANC8fzXtZzo0A9C1OkMK6zZOq-R9_emLks5utfjJgaJpZM4YXiH2 .