I am trying to build a short program using cs2cs that will work on any windows pc
I copied cs2cs.exe and proj.dll to a seperate folder
When i run this to convert israel tranverse mercator to decimal latlon:

cs2cs -f "%.10f" +init=EPSG:2039 +to +init=epsg:4326

It works
but when i run the opossite:

cs2cs -If "%.10f" +init=EPSG:2039 +to +init=epsg:4326

It does not work

When i run this code from latlon in degreea to israel tranverse mercator :

cs2cs +init=epsg:4326 +to +init=EPSG:2039

it works
what am i doing wrong?

  • Do you have a typo with extra double quote in cs2cs" in your command or is it only in your question?
    – user30184
    Jun 16 '14 at 7:54
  • only in my question
    – eliavs
    Jun 16 '14 at 7:57
  • Then I do not understand: C:\temp\>cs2cs -f "%.10f" +init=EPSG:2039 +to +init=epsg:4326 100000 200000 33.9914757989 27.8782934566 16.3155329879 and C:\temp\>cs2cs -If "%.10f" +init=EPSG:2039 +to +init=epsg:4326 33.99 27.87 99845.5441014933 199082.2545403841 -16.3066176036
    – user30184
    Jun 16 '14 at 8:00
  • can it be that i am missing a library or some other connection?
    – eliavs
    Jun 16 '14 at 8:07
  • 1
    Copying .exe and .dll to another place is not a good idea. To run cs2cs correctly, you have to set the environment variables using SDKshell.bat. You need more than just those two files.
    – AndreJ
    Jun 16 '14 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.