[GRASS-user] reclass raster with all unique values?
I have a raster map with watersheds that are the same value. Is there an easy way to reclass the map with every distinc basin to have a unique value? many thanks, -- Stephen Sefick ** Auburn University Biological Sciences 331 Funchess Hall Auburn, Alabama 36849 ** sas0...@auburn.edu http://www.auburn.edu/~sas0025 ** Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis A big computer, a complex algorithm and a long time does not equal science. -Robert Gentleman ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] reclass raster with all unique values?
You might have already thought of these techniques, but here are two options that quickly come to mind... You should be be able to mask each watershed individually (from a vector layer), and then run r.reclass on the area within each watershed boundary. Alternatively, if you have a vector layer for watershed boundaries, what about creating a numeric attribute in which you assign each unique watershed a different number. Then, rasterize the watershed layer. If you have a lot of watersheds, it seems like the second option would be easier... and there obviously might be a more elegant solution that I'm not aware of. Hope that helps! Mike On Fri, Jul 5, 2013 at 2:03 PM, Stephen Sefick sas0...@auburn.edu wrote: I have a raster map with watersheds that are the same value. Is there an easy way to reclass the map with every distinc basin to have a unique value? many thanks, -- Stephen Sefick Auburn University Biological Sciences 331 Funchess Hall Auburn, Alabama 36849 sas0...@auburn.edu http://www.auburn.edu/~sas0025 Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis A big computer, a complex algorithm and a long time does not equal science. -Robert Gentleman __**_ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/**mailman/listinfo/grass-userhttp://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] reclass raster with all unique values?
You could convert the raster layer to a vector layer. In the attribute table you'll have a column with the raster value (the watershed values) and the cat column, which gives you the unique identifier for each polygon. Next you just convert the vector back to raster using the cat column as raster value. But depending on your data, you might also want to check out r.clump or r.clump2 (I think the latter is a add-on). Paulo On Fri, Jul 5, 2013 at 11:03 PM, Stephen Sefick sas0...@auburn.edu wrote: I have a raster map with watersheds that are the same value. Is there an easy way to reclass the map with every distinc basin to have a unique value? many thanks, -- Stephen Sefick Auburn University Biological Sciences 331 Funchess Hall Auburn, Alabama 36849 sas0...@auburn.edu http://www.auburn.edu/~sas0025 Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis A big computer, a complex algorithm and a long time does not equal science. -Robert Gentleman __**_ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/**mailman/listinfo/grass-userhttp://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Reclass: Atributte a string
Hello Glynn Thanks for the reply. About using r.categories, can I apply it to a raster map and then export it as a normal raster? Thanks Franz On Fri, Nov 12, 2010 at 6:18 AM, Glynn Clements gl...@gclements.plus.comwrote: Franz Schiller wrote: I'm doing a reclass of rasters based on a rule file. In this file I'm doing a correspondence between values (1,2... 100) to other integer values. Is it possible to do this but instead to done this to Numbers do this to Strings just like 1 = Agriculture 2,3,4= Forest You can associate category labels with each category using r.categories. You can't reclass to a string. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Reclass: Atributte a string
Franz Schiller wrote: Thanks for the reply. About using r.categories, can I apply it to a raster map and then export it as a normal raster? category labels are attached to an existing map; there's nothing to export. It might help if you explain what your ultimate goal is. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Reclass: Atributte a string
Greetings I'm doing a reclass of rasters based on a rule file. In this file I'm doing a correspondence between values (1,2... 100) to other integer values. Is it possible to do this but instead to done this to Numbers do this to Strings just like 1 = Agriculture 2,3,4= Forest ? Thanks Franz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Reclass: Atributte a string
Franz Schiller wrote: I'm doing a reclass of rasters based on a rule file. In this file I'm doing a correspondence between values (1,2... 100) to other integer values. Is it possible to do this but instead to done this to Numbers do this to Strings just like 1 = Agriculture 2,3,4= Forest You can associate category labels with each category using r.categories. You can't reclass to a string. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] reclass
Hi all, I have a problem reclassing a vector of polygons: I have areas with unique cats and a column value as integer. I want to reclass from column value and -here is the problem: keep the value information to identify the areas. In the manual it says: No table is created for reclassed layer if column option is used and column type is integer (there is nothing which could be written to the table). But couldn't be there a table with value-integer as cat? So how can I identify areas with the value? Thanks, Achim PS: workaround would be: v.to.rast with old values update centros of reclassed map from that raster map - but it seems a bit in-elegant.. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] reclass
PS: workaround would be: v.to.rast with old values update centros of reclassed map from that raster map - but it seems a bit in-elegant.. ...and which is a bit complicated as centroids cannot be used in v.what.rast... ...and conversion into points produces more than one point for some centroids (where one cat has more than two separate areas), so v.what.rast produces NULLs here... -so the workaround isn't one- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] reclass - multipolygon?
Well, I really stuck here: I havent found anything about playing with the common geom multipolygon in GRASS. I think that is what I need and what I thought I could handle with v.reclass. But it does not work. -Is there something in GRASS to create multipolygons? -Do they have one centroid or multiple with the same cat (as I thought) Any suggestions are very welcome achim achim schrieb: PS: workaround would be: v.to.rast with old values update centros of reclassed map from that raster map - but it seems a bit in-elegant.. ...and which is a bit complicated as centroids cannot be used in v.what.rast... ...and conversion into points produces more than one point for some centroids (where one cat has more than two separate areas), so v.what.rast produces NULLs here... -so the workaround isn't one- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] reclass
Hello, I', new in grass I'm trying to do a raster reclassification (r.reclass) but i can't set the rules. Someone can teach me how to do it? Yks ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] reclass
What just doesn't work? Tried this: cat rule | r.reclass input=map_a output=map_b while rule contains your new classes like 1 = 2 some labels .. Christian Hello, I', new in grass I'm trying to do a raster reclassification (r.reclass) but i can't set the rules. Someone can teach me how to do it? Yks ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user This mail was sent through http://webmail.uni-jena.de This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] reclass problem
Hi! all, I wish to classify the landuse from the landsat data of 1989. I created a 531 (rgb) composite and the features were quite noticeable. The relcassification part I tried to use pixel value for creating classes for eg 9320 thru 10367 = 1 semiurban etc. The problem is that there are other types of areas such as uncultivated fields that also get classed into areas such as semiurban. How to deal with this. And also is there any method to create polygon out of textures. The urban areas are quite noticeable by their texture or arrangement of pixel values. Is there any floating window formula that can use std dev to create such surfaces, I am not sure. Hope to get some help! Thanks, Ambrish _ Twice the fun—Share photos while you chat with Windows Live Messenger. http://www.microsoft.com/india/windows/windowslive/messenger.aspx___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] reclass problem
On Tue, Mar 10, 2009 at 10:59 AM, ambrish dhaka ambi...@hotmail.com wrote: Hi! all, I wish to classify the landuse from the landsat data of 1989. I created a 531 (rgb) composite and the features were quite noticeable. The relcassification part I tried to use pixel value for creating classes for eg 9320 thru 10367 = 1 semiurban etc. The problem is that there are other types of areas such as uncultivated fields that also get classed into areas such as semiurban. How to deal with this. And also is there any method to create polygon out of textures. The urban areas are quite noticeable by their texture or arrangement of pixel values. Is there any floating window formula that can use std dev to create such surfaces, I am not sure. Two quick suggestions: - mask out zones which aren't of interest (r.mask) - use a classifier like i.maxlik or better i.smap to perform a statistical assignment of pixel values to desired classes. For an overview, see http://grass.osgeo.org/wiki/Image_processing#Image_classification Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user