[GRASS-dev] Re: [GRASS GIS] #965: Location wizard: doesn't create MYNAME

GRASS GIS trac at osgeo.org
Wed Dec 29 14:44:28 EST 2010


#965: Location wizard: doesn't create MYNAME
---------------------+------------------------------------------------------
  Reporter:  hamish  |       Owner:  martinl            
      Type:  defect  |      Status:  reopened           
  Priority:  normal  |   Milestone:  6.4.1              
 Component:  wxGUI   |     Version:  svn-releasebranch64
Resolution:          |    Keywords:  location wizard    
  Platform:  All     |         Cpu:  All                
---------------------+------------------------------------------------------

Comment(by hamish):

 Hamish:
 > > TypeError: create_location() got an unexpected keyword argument 'desc'
 Martin:
 > your pythonlib is probably out-dated. Please run svn up & make in
 lib/python.

 yes, that was it. works now.


 I suggest to add a tooltip to the "Location title:" in the loc wiz to
 clarify that the title is descriptive text and another to the "Project
 location:" to clarify that that one is the real name that it will go by.
 It seems like it could get confused.


 > question: why need to be description of the location only one-line text

 for grass 6 this is part of the specification for LOCATION file tree and
 should not be changed. at the low level G_myname() only reads 1 line of
 text for the location title.

 > and moreover limited to the given number of chars.

 simply a function of the buffer size used in G_myname()

 > I guess that this limitation broken in GRASS7.

 yes, but anything that uses G_myname() would have to be changed too.
 Currently it is the 1 line ''title'' of the location, not full metadata
 story about it. So it is used for example as the long map title in ps.map
 if you ask for an automatic header.

 moreover the entire metadata system for grass7 needs to be overhauled, and
 this is one part of that.

 > > perhaps wrongly applied, but G_myname() is using GNAME_MAX for the
 > > max length (256 chars in gis.h) of the description.
 >
 > yes, GNAME_MAX could be replaced by GPATH_MAX (or new GTITLE_MAX) to
 enlarge the
 > buffer.

 what I meant was that GNAME_MAX is meant for map names, not arbitrary
 strings of text. If random things are using it which shouldn't be, we get
 afraid to change it later even if the change is safe for the intended map
 names. GPATH_MAX is abusing it even more, the loc title has nothing to do
 with filesystem limits. For a single line description I think 256 chars is
 appropriate, just not to hijack defined constants meant for another
 purpose. RECORD_LEN would actually be more appropriate, but for grass 6
 that's stuck at 80 chars. meh, so I guess just leave this as-is.


 thanks,
 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/965#comment:8>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list