[Qgis-user] GRASS Mask Issue QGIS 2.2

Carlos Cerdán sig.upagu at gmail.com
Mon Jul 14 08:03:41 PDT 2014


Hola Ivan

Maybe it is related to my recent message "Cannot convert float infinity to
integer": GRASS don't work with "-inf" values that are produced by QGIS 2.2
(Maybe 2.0 also) or greater. Leave null values and try zero values for the
mask, that is, just use zero and one... and tell us.

Saludos desde Perú

Carlos Cerdán


2014-07-14 9:31 GMT-05:00 Ivan Santiago <isantiago at ogp.pr.gov>:

> Hello all:
>
> I'm currently working with grass plugin using QGIS 2.2.
> I've been successfully working with raster data but a problem appeared
> when trying to use a MASK.
>
> At the last step of the analysis with raster layers in QGIS/GRASS I tried
> to apply a mask.
>
> First problem: Defining the mask:
> I rasterized an area/polygon vector layer.  It should have values of 1
> inside the area and NULL outside the area.
> When using QGIS/GRASS tools (v.to.rast constant value=1) the program
> returns a raster layer covering all the region in pink.
>
> I was expecting values of 1 and NULL outside, so I used the info (i) tool
> in QGIS and sampled points inside the box... inside was 1 and outside was
> NULL or no values shown.
>
> Believing that this was OK I applied r.mask using the raster layer
> mentioned above...
>
> Then I ran r.reclass to produce a new raster table/layer but...
> instead of having just the area inside the original polygon I have
> computed the whole region.
>
> Then... using the GRASS command shell:
> I ran v.rast and that time it ran and gave me the results I was expecting,
> painting only the inside area of the original polygon.
>
> Ran r.mask option removing the old mask
> Ran r.reclass from the command shell
> The reclassed raster came identical, depicting the whole region instead of
> the area of interest.
>
> I do not understand. Is the mask supposed to apply to all read and
> produced rasters from the moment that a mask is generated?
>
> Any help will be appreciated.
> ---------------------------
> Iván Santiago
> GIS Specialist
> Information Technologies
> Office of Management and Budget
> 787.725.9420 x 2378
> Calle Cruz 254
> PO Box 9023228
> San Juan, PR 00902-3228
> http://gis.pr.gov
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140714/49d3ca01/attachment.html>


More information about the Qgis-user mailing list