Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've got a little problem. I have a GPX-Track containing LatLon coordinates based on WGS84. The track should be drawn on a cropped map, and for this, I need the pixel coordinates. The map tiles are from OSM

I'm not quite sure how to do this, but I figured out a way (without implementing it yet, since I don't have the formulars right now).

1.) Convert LatLon to Spherical Mercator which is used by OSM 2.) Linear transformation spherical mercator -> pixel coordinates. For step 2., 2 identical points are needed. I guess I can use the map's corner points.

Is there a better way to do this? As this is a homework, I am not allowed to use a library. (Since I am not at home right now, where my formulary is, is there any good site containing ellipsoid parameters and the formulars?)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Solved the Problem. Code here: http://verbose-mode.de/2013/02/cropped-maps-und-wgs84-koordinaten/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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