cbalint13 / gdal-segment

GDAL Segment
GNU General Public License v2.0
64 stars 33 forks source link

Don't segment out of useful raster (feature request) #9

Closed diogocaribe closed 6 years ago

diogocaribe commented 6 years ago

Hello,

I am using gdal-segment to segment raster images from Landsat satellite. However, landsat image doesn't have full useful image, cause of background values. So, When I run segmentation, it has been created polygons out of image. These polygons are useless.

I think that the algorithm will be better if don't create polygons in background area from images. Is it possible to implement this kind of behavior?

See below what about I am talking.

screenshot at 2018-02-24 07-57-23

Regards

rodolfolotte commented 6 years ago

Dear @dogosousa , how are u going?

I think ignore the null or background values would be essential, but would take time to change that specific behavior. What I suggest is to open the shp on QGIS or even on TerraAmazon, edit the polygon, and delete all those segments not interesting to you, then, save the new shapefile.

For new improvements or features to this code, you can also develop by yourself and suggest this new modifications as a pull-request.

Cheers, Rodolfo.

diogocaribe commented 6 years ago

Dear @rodolfolotte,

I am better when your lib worked well here.

Ok. I understand you. I did it here but my purpose is that the interpret (human person) doesn't have to do many things manually like your suggestion. I will put selection by location in my routine to get rid of useless segments. I am wating to avoid it because my code is taking so long time to finish.

Ohh my gosh!! When I learn to code with C++, I will do this improvements.

I was surprised when I see that you study in INPE. Very good! If I don't have a lot of commitments I will study in it too. It is my dream.

But no problem, thank you so much for your lib and your attention.

I hope to meet you soon.

Cheers! Diogo Caribé

rodolfolotte commented 6 years ago

Yeap, I'm also brazilian! Just answering in english in case this issue might be useful for somebody else. The main author is @cbalint13 , but I'm happy to help as I was helped by him when I needed for the first time. :) Make us a visit whenever you want. INPE is an open institute as long as you have some friend to guide you here. So, let me know... ;)

Cheers!