[Proj] Finnish KKJ in proj 4.4.9 - Linux vs. Windows

Frank Warmerdam warmerdam at pobox.com
Thu Dec 15 09:46:11 EST 2005

On 12/15/05, Roger Oberholtzer <roger at opq.se> wrote:
> In the windows bin archive, a few (not all) of the files in the nad
> directory have DOS EOL sequences, while the source archive contains
> files with non-DOS EOL sequences. So:
> 1. Why don't all the text files in nad have the same EOL sequences on
> each platform.


As far as I know, I try to keep them in CVS in unix text mode.
How they are distributed might vary.

> 2. Is the code really written so it makes a difference? I think it may
> be, as when I changed the EOL sequences in the esri file (which I use)
> the results changed. This seems unnecessary, as a text file can be read
> correctly no matter if a small bit of care is taken. Is a patch needed
> for this? Should I make one?

The init files are opened in pj_open_lib() in "rt" (text) mode,
and fscanf(..,"%300s",...) is used to read them.  I presume this
is sufficient to handle unix or dos text modes on win32.  On unix
I think this might result in nearly blank lines but be otherwise
harmless (for dos mode files).

> Another Windows question: if the program is compiled to run on Windows,
> perhaps it could also look in the registry for the location of the
> various runtime files. If this is acceptable, I can supply a patch.
> Current behavior would not be altered.

It could, but I have avoided this in PROJ and other libraries I
work on.  If folks are writing applications using PROJ, they can
provide the search directory via API calls.  For users of the
top level PROJ commandline programs, they can use the same
environment variables as on unix.  I don't see a huge benefit
to using the registry.

> It is very simple to make a nice install for the windows package via a
> free program called Inno Setup Compiler. It only requires a script to
> describe the package. I can provide details if it is interesting.

Well, as you can see from the FWTools binaries, I am capable of
producing an installer.  But I'm not really inclined to put in the effort
for PROJ.4.  If someone (you?) would like to maintain PROJ.4 installable
packages for win32, I would be happy to point to their web page
for downloads.

I realize that "not inclined to put in the effort" sounds pretty callous,
but I am already spreading myself too thin, and so I try to minimize
the overhead of each component I maintain.  When I get my next
burst of ambition with regard to PROJ.4, I will invest it in resolving
the various EPSG->PROJ.4 translation issues with prime meridians,
and deal with the Krovak issue properly.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the Proj mailing list