0

I was struggling with using the drawmapscale function at matplotlib basemap. I couldn't understand what the syntax is extactly mean. So far I have understood the following?

e.g. map.drawmapscale(80.625, 5.75, ???, ???, 100)

As I understood, above function generate mapscale at longitude 80.625 and latitude 5.75. It should represent 100 km. But how do you understand the other two parameters? I played with some random numbers, but results are not good. I have searched on the web no satisfactory answer was found. Any help is appreciated.

1 Answer 1

1

Looking at the documentation

drawmapscale(lon, lat, lon0, lat0, length, **kwargs)
Draw a map scale at lon,lat of length length representing distance in the map projection coordinates at lon0,lat0.

From that one would assume that lon0,lat0 need to be the coordinates of the place in the map where 100km are to be measured.

As a start one may choose lon0 == lon and lat0 == lat. This is of course the less erroneous, the smaller the map. Whether this gives good results would also depend on the projection in use. One may also choose to use the coordinates of the middle of the map, since they would be closest to the viewer's expectation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.