On 25 Nov 2014, at 20:00, [email protected] wrote:
Send grass-user mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.osgeo.org/mailman/listinfo/grass-user
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
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 <[email protected]>
To: grass-user <[email protected]>
Subject: Re: [GRASS-user] Computing major and minor axes for polygons
Message-ID: <[email protected]>
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:
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" <[email protected]
<mailto:[email protected]>>:
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
[email protected] <mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/grass-user
--
Dr. Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer
Spatial technology for the masses, not the classes:
experience free and open source GIS at http://gvsigce.org
------------------------------
Message: 2
Date: Mon, 24 Nov 2014 23:44:29 +0100
From: S?ren Gebbert <[email protected]>
To: Benjamin Ducke <[email protected]>
Cc: grass-user <[email protected]>
Subject: Re: [GRASS-user] Computing major and minor axes for polygons
Message-ID:
<caphdrejy+alkpezthfcd+8m935qgild1f-ynhrjemz-s8ru...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hi Ben,
2014-11-24 22:50 GMT+01:00 Benjamin Ducke <[email protected]>:
Right, a PCA of the polygon vertices, I assume?
Exactly, create a covariance matrix from the vertices coordinates of
each polygon
and compute the eigenvectors and eigenvalues of these matrices.
Best regards
Soeren
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:
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" <[email protected]
<mailto:[email protected]>>:
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
[email protected] <mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/grass-user
--
Dr. Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer
Spatial technology for the masses, not the classes:
experience free and open source GIS at http://gvsigce.org
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user
------------------------------
Message: 3
Date: Tue, 25 Nov 2014 19:10:38 +0200
From: Nikos Alexandris <[email protected]>
To: <[email protected]>
Subject: Re: [GRASS-user] Computing major and minor axes for polygons
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed
On 24.11.2014 23:50, Benjamin Ducke wrote:
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.
Wow, What a smart approach! :-)
Nikos
------------------------------
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user
End of grass-user Digest, Vol 103, Issue 42
*******************************************