0

As a follow-on to the answer provided by blah238 to this question.

So I'm working in maps with units of meters, and I convert 96 DPI as follows, but I don't seem to be able to click on anything when zoomed beyond a certain scale?

def get_srch_distance_metres(scale, selection_tolerance=3):
 """ returns the map distance in metres that corresponds to the input
 selection tolerance in pixels (default 3) at the specified map scale"""
 # DPI used by ArcMap when reporting scale (96.0 DPI = 3779. Dots Per Metre)
 return scale * selection_tolerance / 3779.527559055
PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Apr 28, 2017 at 9:18

1 Answer 1

1

Solved this! It wasn't working when zoomed in. The reason being was that I was accidentally rounding the search distance to an integer when passing it as a value in a subsequent call to arcpy.SelectLayerByLocation_management. The part after the decimal place obviously becomes more and more important as you zoom in! So the above should work for metric units.

answered May 2, 2017 at 11:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.