Opened 7 years ago

Closed 6 years ago

#1967 closed defect (fixed)

wxPy loc'n wiz: doesn't allow ellipsoid without datum

Reported by: hamish Owned by: grass-dev@…
Priority: critical Milestone: 6.4.3
Component: wxGUI Version: svn-releasebranch64
Keywords: location wizard, ellipsoid Cc:
CPU: All Platform: All

Description

Hi,

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.

Hamish

Change History (5)

comment:1 Changed 7 years ago by hamish

hopefully fixed (for selection by term table) in devbr6 by r56160. so far untested for creating using other methods.

comment:2 Changed 7 years ago by hamish

(fix fixed in r56161)

comment:3 Changed 7 years ago by hamish

ported to trunk in r56162, creation of planetary ellipsoid locations now works!

Hamish

comment:4 Changed 7 years ago by hamish

defining the new loc'n by proj4 terms, e.g. '+proj=longlat +ellps=sphere', was also broken as it always asked g.proj to find datum transform opts for the undefined datum. Now skipped in r56172 (devbr6).

if you mistype the proj4 string as "+ellips=sphere" you don't get an error, and the new grass location ends up with ellps: wgs84. you can typo anything extra actually.

Hamish

comment:5 Changed 6 years ago by hamish

Resolution: fixed
Status: newclosed

fixes tested & backported to relbr64 in r56253; misspelt +proj4 terms silently leading to unexpected results filed as #1993.

Hamish

Note: See TracTickets for help on using tickets.