php - How to check if a point is inside specified area? -



php - How to check if a point is inside specified area? -

my server receive 4 points on map(a,b,c,d),that represent rectangle on map. in database have business table:

bussid | longitude | latitude ============================= .. .. ..

how businesses placed within rectangle ?

let point p. p within rectangle vertices (a,b,c,d) [in order] if , if dot product of vectors ab.ap , bc.bp, cd.cp, , da.dp having same sign (i.e. either they're positive or negative). approximate if you're talking longitude , latitude because surface of earth curved surface, not flat rectangle.

php mysql algorithm map

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -