[GRASS-user] Re: Creating a world file from unreferenced images

maning sambale emmanuel.sambale at gmail.com
Thu Aug 21 03:17:34 EDT 2008


A bit of progress on this:

The dwg files contains a tic mark and a frame layer.  This can be used
to get the bounds of each topo image.

I then converted the dwg file to shapefile then to gml.
Get number of pixels of the image with gdalinfo, calculate the pixel
size base on the distance of tic marks.

Create a world file for the image.

Done!

Know my main problem is to automate through a thousand images.

cheers,

maning

On 8/21/08, maning sambale <emmanuel.sambale at gmail.com> wrote:
> Hi,
>
> Not entirely a GRASS question but I'm hoping someone can point me to
> the right direction
>
> I was given thousands (literally!) of topo images in either jpg or
> bmp.  My task is to create an indexed raster for viewing in either
> GRASS or QGIS via WMS.
>
> The problem: all files do not have a world file!  Each topo is
> subsetted to 6 images (probably due to scanning limitations).  There
> is also a dwg file for each image showing the image frame among other
> layers.  The dwg file is referenced to a lon-lat.
>
> My plan is to get the coordinates of the image frame from the dwg
> file, this provides a reference bounding box for the images.  Then
> automatically create a worldfile for each image subset.
>
> I'm thinking of using a bash script with gdal, imagemagick.  I also
> found something similar in producing a world file here:
> http://hackmap.blogspot.com/2008/04/numpy-to-tiff-via-gdal.html
>
> Any ideas/pointers on how to solve this?
>
> cheers,
> maning
>
>
> --
> |---------|----------------------------------------------------------|
> | __.-._  |"Ohhh. Great warrior. Wars not make one great." -Yoda     |
> | '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
> |  /'.-c  |Linux registered user #402901, http://counter.li.org/     |
> |  |  /T  |http://esambale.wikispaces.com|
> | _)_/LI
> |---------|----------------------------------------------------------|
>


-- 
|---------|----------------------------------------------------------|
| __.-._  |"Ohhh. Great warrior. Wars not make one great." -Yoda     |
| '-._"7' |"Freedom is still the most radical idea of all" -N.Branden|
|  /'.-c  |Linux registered user #402901, http://counter.li.org/     |
|  |  /T  |http://esambale.wikispaces.com|
| _)_/LI
|---------|----------------------------------------------------------|


More information about the grass-user mailing list