I need to do some coordinate transformations on the browser and I cannot figure why I am getting wrong results with Openlayers 3.

Please see the below jsfiddle where I did a sample that defines the EPSG:2321 projection (using the proj4 definition from spatialreference.org) and then transforms a coordinate in that projection to EPSG:4326. Here's the fiddle:


The result should be 32.93843, 39.96738 (5 digit display precision) whereas ol.proj.transform returns 32.938839053463106, 39.96748782887031. That is quite a large error margin.

What is wrong with this picture?

1 Answer 1


+towgs84 was missing. The correct projection definition should have been:

proj4.defs("EPSG:2321", "+proj=tmerc +lat_0=0 +lon_0=33 +k=1 +x_0=500000 +y_0=0 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs");

  • 1
    EPSG has a possibly more accurate transformation, 1784: +towgs84=-84.1,-101.8,-129.7,0.0,0.0,0.468,1.05
    – mkennedy
    Feb 21, 2017 at 20:32
  • I appreciate the input, but my post proved to be more accurate.
    – Ulas
    Feb 22, 2017 at 6:35

Your Answer

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

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