[GRASS-user] Raster with bounding box

2012-08-13 Thread Richard Chirgwin

Hi all,

I have a bunch of png format images to import. I also have a csv of the 
images' bounding boxes.


Rather than working by hand, which would be slow - is there any quick 
way to turn the bounding boxes into a POINTS file for each image, to 
automate the georectification?


Cheers,
Richard
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Raster with bounding box

2012-08-13 Thread Sylvain Maillard
Hi,

I would say you have at least 3 way to do that:
- use your bounding box points to make a vrt raster for each of your png
files
- use gdalwarp to georectify your png files
- manually write the POINTS files to use with i.rectify (try first to
georectify 1 file by hand with the georectify tool, and then go to the
group/subgroup directories to study the files structure)

for each of those solutions you will need to write a small script to
automate the process for all of your files ;)

cheers,
Sylvain



2012/8/13 Richard Chirgwin rchirg...@ozemail.com.au

 Hi all,

 I have a bunch of png format images to import. I also have a csv of the
 images' bounding boxes.

 Rather than working by hand, which would be slow - is there any quick way
 to turn the bounding boxes into a POINTS file for each image, to automate
 the georectification?

 Cheers,
 Richard
 __**_
 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] Raster with bounding box

2012-08-13 Thread Hamish
Sylvain wrote:
 - use your bounding box points to make a vrt raster for each of your png files
 - use gdalwarp to georectify your png files

here's a couple of other ways too:

translate the bounding box into a world file (a little bit of automatable
math is involved), call it by the same filename as the .png image but with
a .wld extension, use r.in.gdal to import it, it will see the world file
and geo-ref the PNG automatically.
  http://gdal.org/frmt_various.html#PNG



or, use gdal_translate to set the bounds and create a geotiff you can
import.

   -a_ullr ulx uly lrx lry:
   Assign/override the georeferenced bounds of the output
   file. This assigns georeferenced bounds to the output
   file, ignoring what would have been derived from the
   source file.

use your bbox to fill in the values.


Hamish
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Raster with bounding box

2012-08-13 Thread Richard Chirgwin

On 13/08/12 9:43 PM, Hamish wrote:

Sylvain wrote:

- use your bounding box points to make a vrt raster for each of your png files
- use gdalwarp to georectify your png files

here's a couple of other ways too:

translate the bounding box into a world file (a little bit of automatable
math is involved), call it by the same filename as the .png image but with
a .wld extension, use r.in.gdal to import it, it will see the world file
and geo-ref the PNG automatically.
   http://gdal.org/frmt_various.html#PNG



or, use gdal_translate to set the bounds and create a geotiff you can
import.

-a_ullr ulx uly lrx lry:
Assign/override the georeferenced bounds of the output
file. This assigns georeferenced bounds to the output
file, ignoring what would have been derived from the
source file.

use your bbox to fill in the values.


Hamish

Thanks Hamish and Sylvain - the gdal_translate worked best, because it 
was the easiest to automate. I just imported the bounding box values 
into a database, and ran a selection loop to get the values for 
gdal_translate.


Cheers,
Richard
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user