Interesting thoughts @dfellis, yes I didn't think about that, google maps uses kind of mercator projection. Also I went and had a peek in point-in-polygon library (didn't look at the code carefully though) which uses ray tracing and should work on complex polygons as well directly ( if we give a set of x-y coordinates for the polygon) but this way its simpler.