updates on masking raster data

6 messages Options Options
Embed this Post
Permalink
Dylan Beaudette-2

updates on masking raster data

Reply Threaded MoreMore options
Print post
Permalink
anyone know if there has been any work related to this ticket:

http://trac.osgeo.org/gdal/ticket/1599

I was hoping to mask out a large section of raster data while warping, or
possibly in a second-pass with gdal_translate or the like.

thanks,

Dylan



--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
_______________________________________________
gdal-dev mailing list
gdal-dev@...
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Joaquim Luis

Re: updates on masking raster data

Reply Threaded MoreMore options
Print post
Permalink
Dylan Beaudette wrote:
> anyone know if there has been any work related to this ticket:
>
> http://trac.osgeo.org/gdal/ticket/1599
>
> I was hoping to mask out a large section of raster data while warping, or
> possibly in a second-pass with gdal_translate or the like.
>  

Dylan,
In case you are interested I implemented part of what is asked in that
ticket in the just released Mirone 1.3.0
We can now clip an image by an arbitrary polygon and create masks from
the ensemble of plotted polygons (just right click on polygon and select
what you want).

Joaquim Luis

_______________________________________________
gdal-dev mailing list
gdal-dev@...
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Frank Warmerdam

Re: updates on masking raster data

Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by Dylan Beaudette-2
Dylan Beaudette wrote:
> anyone know if there has been any work related to this ticket:
>
> http://trac.osgeo.org/gdal/ticket/1599
>
> I was hoping to mask out a large section of raster data while warping, or
> possibly in a second-pass with gdal_translate or the like.

Dylan,

gdal_rasterize can mask off areas of a raster inside or outside of a polygon.
Other than that, nothing has been done to the best of my knowledge.

Best regards.
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
gdal-dev mailing list
gdal-dev@...
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Dylan Beaudette-2

Re: updates on masking raster data

Reply Threaded MoreMore options
Print post
Permalink
On Friday 02 May 2008, Frank Warmerdam wrote:

> Dylan Beaudette wrote:
> > anyone know if there has been any work related to this ticket:
> >
> > http://trac.osgeo.org/gdal/ticket/1599
> >
> > I was hoping to mask out a large section of raster data while warping, or
> > possibly in a second-pass with gdal_translate or the like.
>
> Dylan,
>
> gdal_rasterize can mask off areas of a raster inside or outside of a
> polygon. Other than that, nothing has been done to the best of my
> knowledge.
>
> Best regards.

thanks for the tip Frank. I actually need to "clip" out (or apply a positive
mask when translating) a single state's worth of data, from a grid that
encompasses the Continental US. I was hoping there was a purely GDAL-way to
do this... without having to resort to GRASS for the raster clipping. Perhaps
there is a way to do this in python+GDAL...

Cheers,

Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
_______________________________________________
gdal-dev mailing list
gdal-dev@...
http://lists.osgeo.org/mailman/listinfo/gdal-dev
John C. Tull

Re: updates on masking raster data

Reply Threaded MoreMore options
Print post
Permalink
Dylan,

If you work out an efficient approach to this problem, I would  
appreciate hearing about your solution. This is a common problem for  
many people, I suspect.

Cheers,
John

On May 2, 2008, at 3:54 PM, Dylan Beaudette wrote:

> On Friday 02 May 2008, Frank Warmerdam wrote:
>> Dylan Beaudette wrote:
>>> anyone know if there has been any work related to this ticket:
>>>
>>> http://trac.osgeo.org/gdal/ticket/1599
>>>
>>> I was hoping to mask out a large section of raster data while  
>>> warping, or
>>> possibly in a second-pass with gdal_translate or the like.
>>
>> Dylan,
>>
>> gdal_rasterize can mask off areas of a raster inside or outside of a
>> polygon. Other than that, nothing has been done to the best of my
>> knowledge.
>>
>> Best regards.
>
> thanks for the tip Frank. I actually need to "clip" out (or apply a  
> positive
> mask when translating) a single state's worth of data, from a grid  
> that
> encompasses the Continental US. I was hoping there was a purely GDAL-
> way to
> do this... without having to resort to GRASS for the raster  
> clipping. Perhaps
> there is a way to do this in python+GDAL...
>
> Cheers,
>
> Dylan
>
> --
> Dylan Beaudette
> Soil Resource Laboratory
> http://casoilresource.lawr.ucdavis.edu/
> University of California at Davis
> 530.754.7341
> _______________________________________________
> gdal-dev mailing list
> gdal-dev@...
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
gdal-dev@...
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Dylan Beaudette-2

Re: updates on masking raster data

Reply Threaded MoreMore options
Print post
Permalink
In reply to this post by Frank Warmerdam
On Friday 02 May 2008, Frank Warmerdam wrote:

> Dylan Beaudette wrote:
> > anyone know if there has been any work related to this ticket:
> >
> > http://trac.osgeo.org/gdal/ticket/1599
> >
> > I was hoping to mask out a large section of raster data while warping, or
> > possibly in a second-pass with gdal_translate or the like.
>
> Dylan,
>
> gdal_rasterize can mask off areas of a raster inside or outside of a
> polygon. Other than that, nothing has been done to the best of my
> knowledge.
>
> Best regards.

Thanks Frank. Short of some fancy python-GDAL goodness, I came up with some
bash + GRASS scripting to solve the problem:

http://casoilresource.lawr.ucdavis.edu/drupal/node/613

Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
_______________________________________________
gdal-dev mailing list
gdal-dev@...
http://lists.osgeo.org/mailman/listinfo/gdal-dev