rsgislib.rastergis.ShapeIndex

126 views
Skip to first unread message

ciara...@googlemail.com

unread,
Feb 16, 2015, 6:47:00 PM2/16/15
to rsgislib...@googlegroups.com

Hello,

I'm a little unsure how to calculate shape parameters (Area, Elliptic fit etc) for a segmentation with python.
I can do this for spectral attributes but not shape based ones. There is a little on it here in the python api doc:
class rsgislib.rastergis.ShapeIndex(colName, idx, colIdx=0)

This is passed to the calcShapeIndices function

Can anyone show me how to calculate all shape attributes and write them to the segmentation raster RAT?

Many thanks

Ciaran Robb

Daniel Clewley

unread,
Mar 1, 2015, 7:20:02 AM3/1/15
to ciara...@googlemail.com, RSGISLib Support
Hi Ciaran,

Unfortunately these shape parameters are not currently available in the latest version of RSGISLib. They were available in version 2.1 (http://rsgislib.org/2_1/rsgislib_rastergis.html) but have been temporarily removed in the latest version.

The RFC40 changes (http://trac.osgeo.org/gdal/wiki/rfc40_enhanced_rat_support) introduced in the latest release of GDAL (1.11) broke most of the rastergis functions so we had to rewrite them. The good news is that the rewrites produced massive performance increases with large RATs, the bad news is we didn't have time to rewrite all of the functions so they are not available in the latest version. 

We do plan to add the shape features back but given mine and Pete's other commitments at the moment this is unlikely to happen until a project we are involved with needs them, unless someone else has time to look at them. In the meantime you can use an older version of RSGISLib which has these features, it just needs to be compiled against GDAL 1.10 or lower.

Thanks,

Dan

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at http://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.

ciara...@googlemail.com

unread,
Mar 2, 2015, 4:47:41 PM3/2/15
to rsgislib...@googlegroups.com, ciara...@googlemail.com
Hi Dan,

I have used scikit-image's regionprops function instead and written the data to RAT that way. I will post my scripts etc  when I've tidied it up.

Ciaran

javier...@gmail.com

unread,
May 27, 2016, 8:59:01 AM5/27/16
to RSGISLib Support
Hi Ciaran and Dan,

I am also interested in the shape indices. Ciaran, would you mind to provide a little example of the use of the regionprops function?

Thanks a lot!

Cheers,

Javier Lopatin

Daniel Clewley

unread,
Jun 1, 2016, 2:35:43 AM6/1/16
to javier...@gmail.com, ciara...@googlemail.com, RSGISLib Support
Hi Ciaran,

Did you ever get round to making your scripts for using scikit-image’s regionprops function to calculate shape indices available?

Thanks,

Dan


-- 
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.

javier...@gmail.com

unread,
Jun 3, 2016, 7:13:37 AM6/3/16
to RSGISLib Support, javier...@gmail.com, ciara...@googlemail.com
Hi Dan, I was trying to install and run rsgislib version 2.1 to use the ShapeIndex function, but I didn't have luck so far. Is to much work ask you for the way of doing this? I think it could be a nice topic for Spectraldifferencess :)

Cheers, 

Javier

Daniel Clewley

unread,
Jun 3, 2016, 8:19:20 AM6/3/16
to javier...@gmail.com, RSGISLib Support
Hi Javier,

Can you be more specific about the problem you are having? Is it with compiling the 2.1 version of RSGISLib (see https://bitbucket.org/petebunting/rsgislib-documentationor running the function. 

Will post something on spectraldifferences once the functions have been added back to the main version of RSGISLib. However, this is unlikely to happen until a project myself or Pete is involved in needs them. 

Thanks,

Dan
--

William Ray

unread,
Jan 16, 2017, 3:47:53 AM1/16/17
to RSGISLib Support, javier...@gmail.com
Hi Dan,

Is the Shape Index function still inactive? 

If not, any tips on how there maybe a workaround?

Many Thanks,

Will

Daniel Clewley

unread,
Jan 17, 2017, 4:29:13 PM1/17/17
to William Ray, RSGISLib Support, javier...@gmail.com
Hi Will,

These features haven’t been added back yet. The current work around is still to install the 2.1 version.

Thanks,

Dan

William Ray

unread,
Jan 18, 2017, 7:10:33 AM1/18/17
to RSGISLib Support, william....@gmail.com, javier...@gmail.com
Thanks for the reply, that should work.

How do I go about installing 2.1 as well as the current version?

Many Thanks,

Will
Reply all
Reply to author
Forward
0 new messages