[Proj] Geo Transfoms and calculations

Gerald I. Evenden geraldi.evenden at gmail.com
Tue Jan 6 19:43:19 EST 2009

On Tuesday 06 January 2009 5:56:52 pm Charles Karney wrote:
> Gerald I. Evenden wrote:
> > The need for readline or something like it is so universal it should
> > be supported under a more general license.  Can you imagine using
> > 'bash' or any of the other shell programs without it?  Usage applies
> > to any command line program.  Just like the program I am working on:
> > without it if you make an error typing in a line, you have to do the
> > whole line over; if you made an error on the last command, again, type
> > it over.  Without it you can't back up and make a quick fix.
> Some other suggestions:
> Code your programs without readline but suggest that the user invoke
> them with rlwrap(1) which intercepts the keyboard input and does the
> readline magic on it.  E.g.,
>     rlwrap proj +proj=utm +lon_0=112w +ellps=clrk66 -r
>     45d15.55N -111d30
>     ...
> Code your program to do something useful with flags and 1 (or 2) lines
> of input, and then use a pipe and bash's readline capabilities.  E.g.,
>     echo 45d15.55N -111d30 | proj +proj=utm +lon_0=112w +ellps=clrk66 -r

rlwrap sounds interesting and I can download it to my Kubuntu but I see that 
it uses readline and would be having the same problems as if I had included 
readline within the program.  That is, the eventual user of the program is 
still faced with GPL ... but with another package.

presumably.  geodesic has virtually no runline parameters other than like -h, 

gie at charon:~/CARTO/geodesic/src$ rlwrap ./geodesic
geod: earth ellps=WGS84
geod: show earth
    Ellipse major axis: 6378137.0000, 1./f = 298.2572236
geod: p1 1 1
geod: p2 2 2
    Point 1 Lon:    1d00'00.00000"E  Lat:    1d00'00.00000"N  height: 0.000
    Point 2 Lon:    2d00'00.00000"E  Lat:    2d00'00.00000"N  height: 0.000
    Azimuth p1->p2: 45d10'13.69"
    Distance: 156876.149
    Azimuth p2->p1: 225d11'47.94"
geod: p1 1 2
    Point 1 Lon:    1d00'00.00000"E  Lat:    2d00'00.00000"N  height: 0.000
    Point 2 Lon:    2d00'00.00000"E  Lat:    2d00'00.00000"N  height: 0.000
    Azimuth p1->p2: 89d58'57.18"
    Distance: 111252.130
    Azimuth p2->p1: 270d1'2.82"

Well it does work.  I baked up and changed the p1 line, and a couple of 
backups within the lines actions.

And it does remember previous operations after I 'quit' and re-executed.

OK.  I guess this solves the problem except for M$ users but what else do they 
expect. ;-)

The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist

More information about the Proj mailing list