0

I'm using Shapely to do some GIS analysis in Python. I have a Polygon and a Point, both in EPSG 3857 (web Mercator). I want to check whether the point is within a given distance (in metres) of the polygon. The data is guaranteed to be within the UK.

I can see how to do this in Shapely terms by buffering the polygon by the distance and then checking whether the result contains the point. But I don't think I can do this in EPSG 3857 because the scale is different in different directions (in the UK, one degree of latitude is getting on for twice as large as one degree of longitude). I need to first do a coordinate transform into something that has the same scale in every direction, at least locally.

The sort of distances I'm doing this over are less than 1km, and the polygons I start with are considerably smaller than that. Approximations are okay; I'd be happy with wrong answers up to 5% of the distance I'm checking for.

What is the projection property that I'm looking for? Can someone suggest a suitable projection please?

1 Answer 1

2

The Ordnance Survey National Grid (EPSG:27700) is an official grid used in Great Britain. WGS 84 / UTM zone 30N (EPSG:32630) is another option.

3
  • Thanks. I was looking at UTM zones after I posted this. Won't UTM 30N have the same scale problem as Mercator projections? Why don't I want UTM 30U or similar?
    – Tom
    Apr 5 at 13:28
  • Biggest problem with utm zones is that the UK straddles 2 zones. Use osgb its what its designed for
    – Ian Turton
    Apr 5 at 18:02
  • You can always check on epsg.io. like: epsg.io/27700 Apr 6 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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