POINTS files are simple ascii files and can be read by any text processor or programming language.
If you mean, can Python read and write to a POINTS file, the answer is yes. That is exactly what happens in the georectifying module. Nothing special needed. Just create and open a Python file object. You can read or write. They are simple to parse too. Take a look at one in a text processor. You can look at the georectifying code in the wxPython GUI too.
Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA
voice: 480-965-6262; fax: 480-965-7671
www: http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton
On Dec 9, 2009, at 10:00 AM, grass-dev-request@lists.osgeo.org wrote:
Date: Wed, 9 Dec 2009 10:52:55 -0200
From: Pablo Carreira <pablotcarreira@hotmail.com>
Subject: [GRASS-dev] Reading Points File
To: <grass-dev@lists.osgeo.org>
Message-ID: <SNT114-W217853E6FC36A3B7C88489D68E0@phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"
Is there a function to read POINTS file from image group, in python?
Thanks.
Pablo Torres Carreira
2009/12/9 Michael Barton <michael.barton@asu.edu>:
If you mean, can Python read and write to a POINTS file, the answer is yes.
That is exactly what happens in the georectifying module. Nothing special
needed. Just create and open a Python file object. You can read or write.
They are simple to parse too. Take a look at one in a text processor. You
can look at the georectifying code in the wxPython GUI too.
http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/gui_modules/georect.py#L962
Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
That is just what I was looking for.
Thank you Martin and Michael.
Pablo Torres Carreira
Date: Wed, 9 Dec 2009 18:14:45 +0100
Subject: Re: [GRASS-dev] Reading Points File
From: landa.martin@gmail.com
To: michael.barton@asu.edu
CC: grass-dev@lists.osgeo.org
2009/12/9 Michael Barton michael.barton@asu.edu:
If you mean, can Python read and write to a POINTS file, the answer is yes.
That is exactly what happens in the georectifying module. Nothing special
needed. Just create and open a Python file object. You can read or write.
They are simple to parse too. Take a look at one in a text processor. You
can look at the georectifying code in the wxPython GUI too.
http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/gui_modules/georect.py#L962
Martin
–
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Windows 7: agora com recursos que economizam bateria. Clique para conhecer.
Thanks Martin
Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287-2402
USA
voice: 480-965-6262; fax: 480-965-7671
www: http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton
On Dec 9, 2009, at 10:14 AM, Martin Landa wrote:
2009/12/9 Michael Barton <michael.barton@asu.edu>:
If you mean, can Python read and write to a POINTS file, the answer is yes.
That is exactly what happens in the georectifying module. Nothing special
needed. Just create and open a Python file object. You can read or write.
They are simple to parse too. Take a look at one in a text processor. You
can look at the georectifying code in the wxPython GUI too.
http://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/gui_modules/georect.py#L962
Martin
--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa