<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi Tim,<br>
      <br>
      I will have a look at this and report back.<br>
      <br>
      Cheers,<br>
      Angelos<br>
      <br>
      On 11/29/2014 03:32 PM, Tim Southern wrote:<br>
    </div>
    <blockquote
      cite="mid:A2F2866A-1AC4-4719-9669-DCA918CA7313@talktalk.net"
      type="cite">
      <pre wrap="">Dear all,

A couple of weeks ago I made the mistake of upgrading Opensuse on this 32 Toshiba Laptop to 13.2.  Grass failed to work with error messages indicating NumPy had not been installed.  It had been installed but did not contain the files Grass was looking for.  Attempts at removing and re-installing NumPy all produced the same incomplete file set.  (i586 installation)

I have reverted to Opensuse 13.1 and now have another non working version Grass 6.4

Traceback (most recent call
GRASS 6.4.3 (South_Oxfordshire):~ > Traceback (most recent call last):
File "/opt/grass/etc/wxpython/wxgui.py", line 139, in <module>
sys.exit(main())
File "/opt/grass/etc/wxpython/wxgui.py", line 132, in main
app = GMApp(workspaceFile)
File "/opt/grass/etc/wxpython/wxgui.py", line 45, in __init__
wx.App.__init__(self, False)
File "/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in __init__
self._BootstrapApp()
File "/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/opt/grass/etc/wxpython/wxgui.py", line 78, in OnInit
workspace = self.workspaceFile)
File "/opt/grass/etc/wxpython/lmgr/frame.py", line 111, in __init__
self.toolbars = { 'workspace' : LMWorkspaceToolbar(parent = self),
File "/opt/grass/etc/wxpython/lmgr/toolbars.py", line 40, in __init__
self.InitToolbar(self._toolbarData())
File "/opt/grass/etc/wxpython/gui_core/toolbars.py", line 96, in InitToolbar
self.CreateTool(*tool)
File "/opt/grass/etc/wxpython/gui_core/toolbars.py", line 120, in CreateTool
shortHelp, longHelp)
File "/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 3764, in AddLabelTool
shortHelp, longHelp, clientData)
File "/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 3686, in DoAddTool
return _controls_.ToolBarBase_DoAddTool(*args, **kwargs)
ValueError: invalid null reference in method 'ToolBarBase_DoAddTool', expected argument 4 of type 'wxBitmap const &'

I am assuming both the errors in 13.2 and now in 13.1 are due to installation issues.  Grass 6.4 worked well in 13.1 until I upgraded.  Can anyone help?

Thanks

Tim
Tim Southern
17, Park Close,
Sonning Common,
Oxfordshire
RG4 9RY



</pre>
      <blockquote type="cite">
        <pre wrap="">On 25 Nov 2014, at 20:00, <a class="moz-txt-link-abbreviated" href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a> wrote:

Send grass-user mailing list submissions to
        <a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>

To subscribe or unsubscribe via the World Wide Web, visit
        <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
or, via email, send a message with subject or body 'help' to
        <a class="moz-txt-link-abbreviated" href="mailto:grass-user-request@lists.osgeo.org">grass-user-request@lists.osgeo.org</a>

You can reach the person managing the list at
        <a class="moz-txt-link-abbreviated" href="mailto:grass-user-owner@lists.osgeo.org">grass-user-owner@lists.osgeo.org</a>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of grass-user digest..."


Today's Topics:

  1. Re: Computing major and minor axes for polygons (Benjamin Ducke)
  2. Re: Computing major and minor axes for polygons (S?ren Gebbert)
  3. Re: Computing major and minor axes for polygons (Nikos Alexandris)


----------------------------------------------------------------------

Message: 1
Date: Mon, 24 Nov 2014 22:50:46 +0100
From: Benjamin Ducke <a class="moz-txt-link-rfc2396E" href="mailto:benducke@fastmail.fm"><benducke@fastmail.fm></a>
To: grass-user <a class="moz-txt-link-rfc2396E" href="mailto:grass-user@lists.osgeo.org"><grass-user@lists.osgeo.org></a>
Subject: Re: [GRASS-user] Computing major and minor axes for polygons
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:5473A836.5030305@fastmail.fm"><5473A836.5030305@fastmail.fm></a>
Content-Type: text/plain; charset=utf-8

Right, a PCA of the polygon vertices, I assume?
Maybe "v.to.db" could be enhanced to allow it to upload
the lengths of the first two/three components to the
attribute table?

For a quick fix, I solved the problem in a shell script using
a crude approximation. FWIW:
0. Set major axis length=-1
1. Rotate polygon by 10? (v.transform)
2. Fit region to polygon (g.region vect=).
3. Get width of region. If it is greater than major axis length,
  set "major axis length = width"
4. Repeat from 1, until polygon has been rotated 350?
5. Minor axis length = height of current region.

Like I said, it's just a crude approximation (precision can
be increased by using smaller rotation steps) and slow, too.
But it's good enough for my purposes, which is basically to
calculate "elongation=len(major)/len(min)".

Best,

Ben

On 24/11/14 19:27, S?ren Gebbert wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">IIRC is the code to compute the major and minor axes already in GRASS.
You need to perform a Karhunen-Loewe-Transformation for each Polygon.
This is also known as principal components analysis.

Best regards
Soeren

Am 21.11.2014 23:33 schrieb "Benjamin Ducke" <<a class="moz-txt-link-abbreviated" href="mailto:benducke@fastmail.fm">benducke@fastmail.fm</a>
<a class="moz-txt-link-rfc2396E" href="mailto:benducke@fastmail.fm"><mailto:benducke@fastmail.fm></a>>:

   Hi All --

   Does anybody here know of an existing GRASS modules that
   will compute the major and minor axes for the polygons of
   a vector map?

   Thanks and best,

   Ben
   _______________________________________________
   grass-user mailing list
   <a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:grass-user@lists.osgeo.org"><mailto:grass-user@lists.osgeo.org></a>
   <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>

</pre>
        </blockquote>
        <pre wrap="">


-- 
Dr. Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer

Spatial technology for the masses, not the classes:
experience free and open source GIS at <a class="moz-txt-link-freetext" href="http://gvsigce.org">http://gvsigce.org</a>


------------------------------

Message: 2
Date: Mon, 24 Nov 2014 23:44:29 +0100
From: S?ren Gebbert <a class="moz-txt-link-rfc2396E" href="mailto:soerengebbert@googlemail.com"><soerengebbert@googlemail.com></a>
To: Benjamin Ducke <a class="moz-txt-link-rfc2396E" href="mailto:benducke@fastmail.fm"><benducke@fastmail.fm></a>
Cc: grass-user <a class="moz-txt-link-rfc2396E" href="mailto:grass-user@lists.osgeo.org"><grass-user@lists.osgeo.org></a>
Subject: Re: [GRASS-user] Computing major and minor axes for polygons
Message-ID:
        <a class="moz-txt-link-rfc2396E" href="mailto:CAPHDReJy+aLKPEZThfCd+8M935qGiLD1f-yNhrjemZ-s8RUmog@mail.gmail.com"><CAPHDReJy+aLKPEZThfCd+8M935qGiLD1f-yNhrjemZ-s8RUmog@mail.gmail.com></a>
Content-Type: text/plain; charset=UTF-8

Hi Ben,

2014-11-24 22:50 GMT+01:00 Benjamin Ducke <a class="moz-txt-link-rfc2396E" href="mailto:benducke@fastmail.fm"><benducke@fastmail.fm></a>:
</pre>
        <blockquote type="cite">
          <pre wrap="">Right, a PCA of the polygon vertices, I assume?
</pre>
        </blockquote>
        <pre wrap="">
Exactly, create a covariance matrix from the vertices coordinates of
each polygon
and compute the eigenvectors and eigenvalues of these matrices.

Best regards
Soeren

</pre>
        <blockquote type="cite">
          <pre wrap="">Maybe "v.to.db" could be enhanced to allow it to upload
the lengths of the first two/three components to the
attribute table?

For a quick fix, I solved the problem in a shell script using
a crude approximation. FWIW:
0. Set major axis length=-1
1. Rotate polygon by 10? (v.transform)
2. Fit region to polygon (g.region vect=).
3. Get width of region. If it is greater than major axis length,
  set "major axis length = width"
4. Repeat from 1, until polygon has been rotated 350?
5. Minor axis length = height of current region.

Like I said, it's just a crude approximation (precision can
be increased by using smaller rotation steps) and slow, too.
But it's good enough for my purposes, which is basically to
calculate "elongation=len(major)/len(min)".

Best,

Ben

On 24/11/14 19:27, S?ren Gebbert wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="">IIRC is the code to compute the major and minor axes already in GRASS.
You need to perform a Karhunen-Loewe-Transformation for each Polygon.
This is also known as principal components analysis.

Best regards
Soeren

Am 21.11.2014 23:33 schrieb "Benjamin Ducke" <<a class="moz-txt-link-abbreviated" href="mailto:benducke@fastmail.fm">benducke@fastmail.fm</a>
<a class="moz-txt-link-rfc2396E" href="mailto:benducke@fastmail.fm"><mailto:benducke@fastmail.fm></a>>:

   Hi All --

   Does anybody here know of an existing GRASS modules that
   will compute the major and minor axes for the polygons of
   a vector map?

   Thanks and best,

   Ben
   _______________________________________________
   grass-user mailing list
   <a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a> <a class="moz-txt-link-rfc2396E" href="mailto:grass-user@lists.osgeo.org"><mailto:grass-user@lists.osgeo.org></a>
   <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>

</pre>
          </blockquote>
          <pre wrap="">


--
Dr. Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer

Spatial technology for the masses, not the classes:
experience free and open source GIS at <a class="moz-txt-link-freetext" href="http://gvsigce.org">http://gvsigce.org</a>
_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
</pre>
        </blockquote>
        <pre wrap="">

------------------------------

Message: 3
Date: Tue, 25 Nov 2014 19:10:38 +0200
From: Nikos Alexandris <a class="moz-txt-link-rfc2396E" href="mailto:nik@nikosalexandris.net"><nik@nikosalexandris.net></a>
To: <a class="moz-txt-link-rfc2396E" href="mailto:grass-user@lists.osgeo.org"><grass-user@lists.osgeo.org></a>
Subject: Re: [GRASS-user] Computing major and minor axes for polygons
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:5db8e3e250d0adde57c6a9628ba5611f@nikosalexandris.net"><5db8e3e250d0adde57c6a9628ba5611f@nikosalexandris.net></a>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 24.11.2014 23:50, Benjamin Ducke wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Right, a PCA of the polygon vertices, I assume?
Maybe "v.to.db" could be enhanced to allow it to upload
the lengths of the first two/three components to the
attribute table?

For a quick fix, I solved the problem in a shell script using
a crude approximation. FWIW:
0. Set major axis length=-1
1. Rotate polygon by 10? (v.transform)
2. Fit region to polygon (g.region vect=).
3. Get width of region. If it is greater than major axis length,
  set "major axis length = width"
4. Repeat from 1, until polygon has been rotated 350?
5. Minor axis length = height of current region.
</pre>
        </blockquote>
        <pre wrap="">
Wow, What a smart approach! :-)

Nikos


------------------------------

_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>

End of grass-user Digest, Vol 103, Issue 42
*******************************************
</pre>
      </blockquote>
      <pre wrap="">

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Angelos Tzotsos
Remote Sensing Laboratory
National Technical University of Athens
<a class="moz-txt-link-freetext" href="http://users.ntua.gr/tzotsos">http://users.ntua.gr/tzotsos</a></pre>
  </body>
</html>