This question already has an answer here:

I have a set of points that are defined as WGS84. In ArcMap the featureclass details are:

  • Geographic Coordinate System: GCS_WGS_1984.
  • Datum: D_WGS_1984
  • Prime Meridian: Greenwich
  • Angular Unit: Degree.

...so basically lats and longs - I want to effectively convert these to pixel coordinates on an empty image (1200x600 pixels). So the top left of the image is 0,0 and the bottom right is 1200,600. I will be doing this via a graphics API, but that's not important.

I am sure there is some kind of algorithm to convert the lat,longs to x,y pixel coordinates - does anyone know how to do this Python - or just the maths involved? Or is there a handy Python api I could use? I was thinking PyProj, but I'm not sure...

marked as duplicate by jbalk, whyzar, xunilk, Dan C, PolyGeo arcpy Nov 28 '18 at 6:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.