this is a follow on question from Geo-Referencing an image from google maps with gdal_translate

I am trying to get cs2cs to work but I am getting the following error.

My command is as follows:

cs2cs +init=epsg:4326 +to +init=epsg:3857 -f "%%.2f" <wgs.txt >merc.txt

And the output when using PROJ_DEBUG=5 is

pj_open_lib(epsg): call fopen(C:\Users\monke\Desktop\Trial\cs2cs\Bin/epsg) - succeeded
pj_open_lib(epsg): call fopen(C:\Users\monke\Desktop\Trial\cs2cs\Bin/epsg) - succeeded
pj_open_lib(@null): call fopen(C:\Users\monke\Desktop\Trial\cs2cs\Bin/@null) - failed

I have been at this for hours and haven't made any progress.

Failing a cs2cs solution, a solution using java would be great too.

  • Can you describe in what environment you start the command, and where you installed proj.4 or GDAL from? – AndreJ Dec 25 '15 at 18:05
  • @AndreJ So I am trying to do all this as a part of a standalone project so it is run from a regular Windows command prompt in a batch file. – Ando Dec 25 '15 at 19:55
  • If you run the command inside a OSGeo4W shell or gisinternals SDK shell, it should run out of the box. For a standalone project, you have to set the environment variables that are set in those shells. – AndreJ Dec 26 '15 at 7:16
  • I have come up with a solution using geotools in Java. Thanks for all that helped. – Ando Dec 28 '15 at 9:26

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.