[gdal-dev] Re: gdal_rasterize -tr and -te

Doug_Newcomb at fws.gov Doug_Newcomb at fws.gov
Fri Oct 1 10:02:14 EDT 2010


I probably do it the hard way.  The USDA flies summer color imagery in 
North Carolina every couple of years for crop verification.  They will put 
draft versions of the imagery up in single image per county mosaics in 
MrSid format for download about 6-8 months before they make the final 
quarter quadragle geotiffs available.  The single county mosaics are in 
UTM projection.  In NC, we like utm zones so much, we have three of them. 
Since I prefer to work with a seamless image layer in the same projection 
(North Carolina State Plane) and quarter quad format, I:

1) Use nearblack on the county MrSid images and output to Imagine format.
2) Reproject the county Imagine images to NC State Plane projection
3) use gdaltindex to create a shapefile index (1) from an older statewide 
image layer with image overlap in North Carolina State Plane projection.
4) use gdaltindex to make a shapefile index (2) of the reprojected county 
Imagine format image files.
4) Run a python script which grabs the corner coordinates  of each polygon 
from shapefile index 1 and use that to create a list of  Imagine images 
that overlap with the polygon by comparing it to index 2.  This script 
then recursively "cookie cuts" the section of each Imagine image that 
falls within the polygon and creates a tiff file , using gdaltranslate. 
After all of the "cookie cutting" has been done, the script merges all of 
the tiff files into one tiff file using gdalwarp.

For most of this, I cheat by using python to pass os.system commands to 
use the utility binaries. 

I made up a powerpoint presentation on this a couple of years ago at an 
internal national meeting, is there a suitable wiki to upload  it to  ( 
after getting release permission and conversion to Openoffice impress 
format)?

Doug
 


Doug Newcomb 
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb at fws.gov
---------------------------------------------------------------------------------------------------------
The opinions I express are my own and are not representative of the 
official policy of the U.S.Fish and Wildlife Service or Dept. of the 
Interior.   Life is too short for undocumented, proprietary data formats.



Hermann Peifer <peifer at gmx.eu> 
Sent by: gdal-dev-bounces at lists.osgeo.org
10/01/2010 09:21 AM

To
Jukka Rahkonen <jukka.rahkonen at mmmtike.fi>
cc
gdal-dev at lists.osgeo.org
Subject
[gdal-dev] Re: gdal_rasterize -tr and -te






On 01/10/2010 07:03, Jukka Rahkonen wrote:
> Hermann Peifer<peifer<at>  gmx.eu>  writes:
>
>
>> At work, we are taking this "standard grid" issue pretty serious, but
>> indeed, we might be the only ones worldwide with such a business rule.
>
> You are not alone, we are reprojecting our rasters to standard grid 
because it
> helps in making seamless mosaics from the reprojected images. We are 
widening
> the target extents a little bit to all directions with a python script 
to suit
> the grid.
>

So we are already 2 ;-)

Actually, I tentatively thought there would be more. This was why I 
wrote to the mailing list in the first place. I am aware that this 
(non-)issue can be solved in a shell one-liner or perhaps X lines of 
some other script code. I just thought that if there is a general 
interest, it could perhaps be built into the library.

Hermann
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101001/55ff244b/attachment-0001.html


More information about the gdal-dev mailing list