[GRASS-user] Minimum fitting ellipse with attributes

Hello,
I am trying to fit a minimum fitting/bounding ellipse to each polygon in a series of polygons. Ideally the ellipse would also give me attributes such as major and minor axes lengths along with orientation. Is this possible within GRASS 7.0 on a Mac? I cannot seem to find a tool to do this.
Thanks,
John


John Wall

Earth Science Ph.D. Student
Department of Marine, Earth & Atmospheric Sciences
North Carolina State University

On Fri, Sep 19, 2014 at 8:30 PM, John Wall <jwall@ncsu.edu> wrote:

Hello,
I am trying to fit a minimum fitting/bounding ellipse to each polygon in a
series of polygons. Ideally the ellipse would also give me attributes such
as major and minor axes lengths along with orientation. Is this possible
within GRASS 7.0 on a Mac? I cannot seem to find a tool to do this.

I found some Python code online, so the best solution might be to
combine that with pygrass:

http://grass.osgeo.org/grass71/manuals/libpython/pygrass_index.html
http://grass.osgeo.org/grass71/manuals/libpython/pygrass_vector.html

Markus

On Sat, Sep 20, 2014 at 7:48 AM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Sep 19, 2014 at 8:30 PM, John Wall <jwall@ncsu.edu> wrote:
> Hello,
> I am trying to fit a minimum fitting/bounding ellipse to each polygon in
a
> series of polygons. Ideally the ellipse would also give me attributes
such
> as major and minor axes lengths along with orientation. Is this possible
> within GRASS 7.0 on a Mac? I cannot seem to find a tool to do this.

I found some Python code online, so the best solution might be to
combine that with pygrass:

Markus, perhaps you wanted to give us a link to the Python code?

Anna

http://grass.osgeo.org/grass71/manuals/libpython/pygrass_index.html
http://grass.osgeo.org/grass71/manuals/libpython/pygrass_vector.html

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Anna
On Sep 21, 2014 2:05 AM, “Anna Petrášová” <kratochanna@gmail.com> wrote:

On Sat, Sep 20, 2014 at 7:48 AM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Sep 19, 2014 at 8:30 PM, John Wall <jwall@ncsu.edu> wrote:

Hello,
I am trying to fit a minimum fitting/bounding ellipse to each polygon in a
series of polygons. Ideally the ellipse would also give me attributes such
as major and minor axes lengths along with orientation. Is this possible
within GRASS 7.0 on a Mac? I cannot seem to find a tool to do this.

I found some Python code online, so the best solution might be to
combine that with pygrass:

Markus, perhaps you wanted to give us a link to the Python code?

I just found some code using google search (first hits) but did not check their license. That’s why I did not add the links right away.

Markus (on mobile at time)

Anna

http://grass.osgeo.org/grass71/manuals/libpython/pygrass_index.html
http://grass.osgeo.org/grass71/manuals/libpython/pygrass_vector.html

Markus


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Markus,
Is this some of the code you are talking about: http://nicky.vanforeest.com/misc/fitEllipse/fitEllipse.html

I do not see any other code than this when I search for it on Google.
Thanks,
John

···

John Wall

Earth Science Ph.D. Student
Department of Marine, Earth & Atmospheric Sciences
North Carolina State University

On Sun, Sep 21, 2014 at 7:06 AM, Markus Neteler <neteler@osgeo.org> wrote:

Hi Anna
On Sep 21, 2014 2:05 AM, “Anna Petrášová” <kratochanna@gmail.com> wrote:

On Sat, Sep 20, 2014 at 7:48 AM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Sep 19, 2014 at 8:30 PM, John Wall <jwall@ncsu.edu> wrote:

Hello,
I am trying to fit a minimum fitting/bounding ellipse to each polygon in a
series of polygons. Ideally the ellipse would also give me attributes such
as major and minor axes lengths along with orientation. Is this possible
within GRASS 7.0 on a Mac? I cannot seem to find a tool to do this.

I found some Python code online, so the best solution might be to
combine that with pygrass:

Markus, perhaps you wanted to give us a link to the Python code?

I just found some code using google search (first hits) but did not check their license. That’s why I did not add the links right away.

Markus (on mobile at time)

Anna

http://grass.osgeo.org/grass71/manuals/libpython/pygrass_index.html
http://grass.osgeo.org/grass71/manuals/libpython/pygrass_vector.html

Markus


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Sun, Sep 21, 2014 at 8:59 PM, John Wall <jwall@ncsu.edu> wrote:

Markus,
Is this some of the code you are talking about:
http://nicky.vanforeest.com/misc/fitEllipse/fitEllipse.html

Yes.

I do not see any other code than this when I search for it on Google.

I just searched briefly during travelling.
Here was a reference but it is referred to the same code:

https://stackoverflow.com/questions/13635528/fit-a-ellipse-in-python-given-a-set-of-points-xi-xi-yi

Maybe books about computational geometry could be useful, too.

Markus