wxPy loc'n wiz: doesn't allow ellipsoid without datum
|Reported by:||hamish||Owned by:|
|Keywords:||location wizard, ellipsoid||Cc:|
the location wizard won't like you create a location unless you set a datum.
example: start grass with the wxGUI, click on loc'n wizard, click on Select coord sys params from list, proj code: ll, "Select datum or ellipsoid (next page)" -> Ellipsoid only, ellipsoid code: sphere,
WARNING: Datum <unknown> not recognised by GRASS and no parameters found ERROR: Invalid datum code <>
the warning may be harmless (expected), but the ERROR is probably the loc wiz passing the datum= option unconditionally, which we can easily fix.
adding a G_debug() statement in there shows:
D0/0: proj4string=[+proj=longlat +lat_0=0.0 +lon_0=0.0 +ellps=sphere +a=6370997.000 +e=0.0 +no_defs +no_defs]
(I don't think related, but again note the two '+no_defs')
Once you click ok to the warning pop-up it goes away and takes you to the Summary page, but the PROJ.4 definition is blank, and so it won't let you finish.
this is somewhat related to #1849 (r56093, r56143), and most likely the real trouble earlier noticed in #1513/comment 3, but in the latter case I mistook the cause for being specific to the new Planetary ellipsoid selection tool.
It is unclear to me if proj 4.8.0 will automatically try to fill in datum details if you left it blank, but I get the same breakage w/ 4.7.0 and 4.8.0 proj4s.
thanks for the diagnosis Yann.
using the text startup and g.setproj all should be ok.