Problems in segmentation and generation of polygons

38 views
Skip to first unread message

Carlos Leandro Cordeiro

unread,
Aug 28, 2017, 10:51:28 AM8/28/17
to RSGISLib Support
Hello all, I'd like some help. I am working with segmentation and classification of a region in Brazil. I can segment, calculate statistics, and import the attribute table. But when I try Polygonize the raster to have the segments in .SHP it comes in lines and not in polygons. If I transform lines and polygons into qgis or arcgis it gives me more polygons than the existing one in the raster and I can not unite the attribute table with shp correctly. Could someone help me with this?
Thanks

The example image is attached.
1 - polygonization in lines
2- Line to polygon
3- Attribute table of the polygons with null values


duvida.jpg

Pete Bunting [pfb]

unread,
Aug 30, 2017, 3:37:41 AM8/30/17
to Carlos Leandro Cordeiro, RSGISLib Support
Dear Carlos,

How are you creating a vector from your clumps image file?

I use gdal_polygonize.py and have had no problems. This is also the rsgislib function rsgislib.vectorutils.polygoniseRaster(inputImg, outShp, imgBandNo=1, maskImg=None, imgMaskBandNo=1), which uses the same GDAL function as gdal_polygonize.py.

Best wishes,

Pete
> --
> 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 https://groups.google.com/group/rsgislib-support.
> For more options, visit https://groups.google.com/d/optout.
> <duvida.jpg>

****************************************************
* Dr Pete Bunting
* Reader in Remote Sensing
* Earth Observation and Ecosystem Dynamics Group
* Department of Geography and Earth Sciences
* Aberystwyth University
* Aberystwyth
* Ceredigion
* SY23 3DB
* UK
*
* Ph: +44 (0) 1970 622615
* Mob: +44 (0) 7917 842743
* Email: p...@aber.ac.uk
* ORCID: http://orcid.org/0000-0002-7435-0148
****************************************************
"Please consider the environment before printing this email or any documents attached”



--------------------------------------------------------------------
Un o’r 5 prifysgol uchaf yn y DU a’r orau yng Nghymru am fodlonrwydd myfyrwyr.
(Arolwg Cenedlaethol y Myfyrwyr 2017)
www.aber.ac.uk

Top 5 UK university and best in Wales for student satisfaction
(National Student Survey 2017)
www.aber.ac.uk
Reply all
Reply to author
Forward
0 new messages