Re: [gdal-dev] gdal_translate input separate R,G,B output combined RGB

2009-01-16 Thread Roger André
Hi Greg, I don't know of a gdal_translate command for this, but you can use the gdal_merge.py tool to do this. gdal_merge.py - o -separate gtif_R.tif gtif_G.tif gtif_B.tif Roger -- 2009/1/9 Greg Coats > I have 3 single band GeoTIF images of the same geographic area: one for the > Red band, o

Re: [gdal-dev] gdal_translate upside down image

2009-01-16 Thread Frank Warmerdam
Greg Ederer wrote: Hi, I'm running gdal_translate against a VRT file: -20.05, 0.1, 0.0, 40.05, 0.0, -0.1 GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]],

[gdal-dev] gdal_translate upside down image

2009-01-16 Thread Greg Ederer
Hi, I'm running gdal_translate against a VRT file: -20.05, 0.1, 0.0, 40.05, 0.0, -0.1 GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016,

[gdal-dev] gdalnumeric.BandWriteArray gdalnumeric.Int8

2009-01-16 Thread Gong, Shawn (Contractor)
hi list, I have used datablock.astype(gdalnumeric.Int16) in gdalnumeric.BandWriteArray() Is there a gdalnumeric.Int8 to write an 8-bit band/image? thanks, Shawn ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listin

[gdal-dev] Specifying Extents in GDAL Warp API

2009-01-16 Thread Wendy Fay Stevenson
Hi I notice that in the Gdal Warp Utility, it is possible to specify the extent of the source image that you would like warped. Is there an easy way to do this using the gdal warp API? For example, I have an image in LCC projection covering the whole of the United States. I would like to w

Re: [gdal-dev] GDAL & FORTRAN...

2009-01-16 Thread Frank Warmerdam
Tripp Lowe wrote: Are there any gdal libraries for fortran? . Currently, my fortran programs read in a BSQ satellite image, do something, and output the pixel values as a text file (that's read into a perl/gdal program that creates the .img). It would be nice to eliminate some of the steps.

[gdal-dev] GDAL & FORTRAN...

2009-01-16 Thread Tripp Lowe
Are there any gdal libraries for fortran? . Currently, my fortran programs read in a BSQ satellite image, do something, and output the pixel values as a text file (that's read into a perl/gdal program that creates the .img). It would be nice to eliminate some of the steps. Thanks. -- Tripp ___

Re: [gdal-dev] How to use TransformPoints in python?

2009-01-16 Thread Steve Gaffigan
Rene, You could also use the pyproj module (http://code.google.com/p/pyproj/). import os, osgeo, numpy import pyproj from osgeo import ogr, osr def getProjection( EPSGcode ): """ set a projection from ... to lat-long """ srs = osgeo.osr.SpatialReference() srs.ImportFromEPSG( EP

Re: [gdal-dev] improve PDS and Isis drivers

2009-01-16 Thread Trent M Hare
Lidiriel, All PDS, ISIS2, and ISIS3 drivers should support detached labels for the simple raw (or ISIS3 tiled) formats (now the PDS reader doesn't support detached JP2 images yet). There have been a few fixes in the last few months for these planetary readers so try to stick with 1.6.x.

Re: [gdal-dev] using GDAL in a java-program

2009-01-16 Thread Frank Warmerdam
albrecht.wei...@hzd.hessen.de wrote: Hi list, i'm developing a tool which has to convert all tiff-files in a directory. I'm doing it with java. The tool should create some overview images (image pyramid) for the tiffs like we used to do manually with gdaladdo before. Therefore i compiled the g

Re: [gdal-dev] using GDAL in a java-program

2009-01-16 Thread Lucena, Ivan
Albrecht, On the code that I am working right now I can see that there is a BuildOverviews on the GDAL Java API: "dataset.BuildOverviews(result, overviewlist, callback, callback_data)" So it should use the same logic as in: http://www.gdal.org/classGDALDataset.html#2aa6f88b3bbc840a5696236af11d

[gdal-dev] using GDAL in a java-program

2009-01-16 Thread Albrecht.Weiser
Hi list, i'm developing a tool which has to convert all tiff-files in a directory. I'm doing it with java. The tool should create some overview images (image pyramid) for the tiffs like we used to do manually with gdaladdo before. Therefore i compiled the gdal 1.5.2 librarys with swig-support fo

Re: [gdal-dev] read non spatial tables using OGR driver

2009-01-16 Thread Frank Warmerdam
chen cui wrote: hello, I know that using OGRSFDriverRegistrar::Open() we can access and open personal geodatabase .mdb file. The table with geometry_column will be returned as Layers. But how about non spatial tables inside this personal geodatabase .mdb file? Or we should use ODBC provider t

[gdal-dev] read non spatial tables using OGR driver

2009-01-16 Thread chen cui
hello, I know that using OGRSFDriverRegistrar::Open() we can access and open personal geodatabase .mdb file. The table with geometry_column will be returned as Layers. But how about non spatial tables inside this personal geodatabase .mdb file? Or we should use ODBC provider to access those

Re: [gdal-dev] How to use TransformPoints in python?

2009-01-16 Thread Ari Jolma
Frank Warmerdam kirjoitti: Hogendoorn, Rene wrote: print proj.TransformPoints( len(polygon), x, y, z) Rene, To the best of my knowledge TransformPoints() is not currently working smoothly with Python. But it works in Perl: use Geo::GDAL; $to = Geo::OSR::SpatialReference->create( E

Re: [gdal-dev] Intersect of two shapefiles

2009-01-16 Thread Frank Warmerdam
nicholas.g.lawre...@mainroads.qld.gov.au wrote: I have two shapefiles containing polygons. Can OGR derive an intersection of these two layers? Nick, The OGR commandline tools do not include anything to do this. You could do it using the library or write a script in one of the supporting bind

Re: [gdal-dev] OGR error

2009-01-16 Thread Frank Warmerdam
nicholas.g.lawre...@mainroads.qld.gov.au wrote: I am using ogr2ogr to append several shapefiles into one shapefile. The command ogr2ogr -update -append C:\DATA\neville\fire.shp C:\DATA\neville\bundaberg.shp -nln fire which is repeated many times in a batch file to append more and more shapefil

Re: [gdal-dev] Writing a Tiff

2009-01-16 Thread Frank Warmerdam
Henning Bredel wrote: ups .. sorry, I was on the R-sig mailinglist before, so I forget to point the language out explicitely. It's R -- I'm using GDAL with a wrapper package called `rgdal' (Roger Bivand is involved in its development). Henning, Gotcha. I will note that the R bindings are not

Re: [gdal-dev] How to use TransformPoints in python?

2009-01-16 Thread Jose Gómez-Dans
Hi, On Friday 16 January 2009 12:31:01 Hogendoorn, Rene wrote: > TypeError: in method 'CoordinateTransformation_TransformPoints', argument 3 > of type 'double *' > > I also tried straight python lists of doubles. > So what type of arguments does TransformPoints expect (as there is > obviously nothi

Re: [gdal-dev] How to use TransformPoints in python?

2009-01-16 Thread Frank Warmerdam
Hogendoorn, Rene wrote: x = numpy.array( [p[0] for p in polygon] ) y = numpy.array( [p[1] for p in polygon] ) z = numpy.array( [p[2] for p in polygon] ) print proj.TransformPoints( len(polygon), x, y, z) returns: Traceback (most recent call last): File "", line 37, in File

[gdal-dev] How to use TransformPoints in python?

2009-01-16 Thread Hogendoorn, Rene
The following simple python script import os, osgeo, numpy from osgeo import ogr, osr def getProjection( EPSGcode ): """ set a projection from ... to lat-long """ srs = osgeo.osr.SpatialReference() srs.ImportFromEPSG( 4326 ) # WGS84 ll = srs.CloneGeogCS() srs.ImportFromEPS

Re: [gdal-dev] Writing a Tiff

2009-01-16 Thread Henning Bredel
On Thu, 2009-01-15 at 16:57 -0500, Frank Warmerdam wrote: > > ,---. > > bm.writeTiff <- function(bm,filename) { > > > > # GTiff ist standard but show it here, though > > driver <- new('GDALDriver', 'GTiff') > > > > t <- new("