[GRASS-dev] need update to core.create_location

Michael Barton Michael.Barton at asu.edu
Mon Oct 1 22:59:12 PDT 2012


Yes. This is indeed what needs to be done with core.create_location.

I'm not even sure if it was working correctly before anyway. I don't see how it could. Any problem with me updating it like this?

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice:  480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu











On Oct 1, 2012, at 9:37 PM, Michael Barton <michael.barton at asu.edu<mailto:michael.barton at asu.edu>> wrote:

In the GRASS python library, core.create_location needs to be updated to use the new datum argument in g.proj.

I think I know how to update it, but it looks like there may be an error in the create_location code. It is using "datum" to refer to the "datumtrans" argument of g.proj.

Currently, the code looks like this

def create_location(dbase, location,
                    epsg = None, proj4 = None, filename = None, wkt = None,
                    datum = None, desc = None):

...

    kwargs = dict()
    if datum:
        kwargs['datum'] = datum

I think it probably should be:

def create_location(dbase, location,
                    epsg = None, proj4 = None, filename = None, wkt = None,
                    datum = None, datumtrans=None, desc = None):

...

    kwargs = dict()
    if datum:
        kwargs['datum'] = datum
    if datumtrans:
        kwargs['datumtrans'] = datumtrans

The programmers manual would need to be updated to reflect this change. This means a change in the arguments for create_location. But it is currently sending the wrong argument to g.proj anyway. So this is also a bug fix to create_location.



Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice:  480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu<http://csdc.asu.edu/>












-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20121002/a4e83d38/attachment.html>


More information about the grass-dev mailing list