Re: [gdal-dev] Quality boundaries for JPEG driver

2011-11-22 Thread Nicolas Mayer
Thanks a lot for your answers. Nicolas 2011/11/22 Chaitanya kumar CH > Nicolas, > > The values must be integers. They will be rounded off otherwise. In any > case, the value is just a rough indication. > > 10 and 100 are included. > > On Tue, Nov 22, 2011 at 9:18 PM, Nicolas Mayer wrote: > >> H

[gdal-dev] ogr.Feature field access

2011-11-22 Thread Frank Warmerdam
Folks, Tonight I have made some changes to the OGR Python bindings such that there is a SetField2() method that tries to support a wider variety of value types that can be assigned to a field, including the list types. I also implemented __setattr__, __getitem__ and __setitem__ so that you can d

Re: [gdal-dev] CopyLayer oddity using GML driver

2011-11-22 Thread Even Rouault
> > Hm, after some thinking I think the best approach is to construct the > original SQL to assign XML-valid column names. The same change > can/should be done in for the WFS DescribeFeature response. The the > CopyLayer method should work ok (seems so after initial tests). My initial thought was

RE: [gdal-dev] Making a "hole" in existing image

2011-11-22 Thread Jay Jennings
Thanks, that suggestion worked great. For simplicity, I used KML instead of shapefile, as follows: gdal_rasterize -burn 0 -b 1 -b 2 -b 3 -l TestLayerName HoleExtent.kml OriginalRGB.tif And my KML file looks like this, with 'coordinates' in longitude/latitude: http://www.opengis.net/kml/2.2";

Re: [gdal-dev] Making a "hole" in existing image

2011-11-22 Thread Travis Kirstine
gdal_rasterize can be used to create a hole using a polygon from a vector datasource. gdal_rasterize -burn 0 -b 1 -b 2 -b 3 -l my_polygon my_image.tif my_polygon.shp regards On 22 November 2011 11:22, Jay Jennings wrote: > Hi List, > > I’m looking for a slick way, using GDAL utilities, to make

Re: [gdal-dev] Making a "hole" in existing image

2011-11-22 Thread Chaitanya kumar CH
Jay, You can use the VRT format to do this. Create patches of the image surrounding the hole. Make sure the nodata is set to zero. Your VRT file should contain four SimpleSource elements for each band. First create a simple vrt file using gdalbuildvrt, edit it and then use gdal_translate to creat

Re: [gdal-dev] Quality boundaries for JPEG driver

2011-11-22 Thread Chaitanya kumar CH
Nicolas, The values must be integers. They will be rounded off otherwise. In any case, the value is just a rough indication. 10 and 100 are included. On Tue, Nov 22, 2011 at 9:18 PM, Nicolas Mayer wrote: > Hello everybody, > > I have a question about the JPEG driver. > The documentation says th

Re: [gdal-dev] Quality boundaries for JPEG driver

2011-11-22 Thread Mateusz Łoskot
On 22 November 2011 15:48, Nicolas Mayer wrote: > Hello everybody, > > I have a question about the JPEG driver. > The documentation says that the quality "must be in the range 10-100". > > Must this value be an integer ? Yes, quality is a discrete value. > Are the 10 and/or 100 boundaries includ

[gdal-dev] Making a "hole" in existing image

2011-11-22 Thread Jay Jennings
Hi List, I'm looking for a slick way, using GDAL utilities, to make a NoData "hole" in an existing image : I'd like to set value 0 (which is this image's NoData value) for each band of the image within the rectangle denoted by minX, minY, maxX, maxY. I looked at 'gdal_translate' and 'gdalwarp'

[gdal-dev] Quality boundaries for JPEG driver

2011-11-22 Thread Nicolas Mayer
Hello everybody, I have a question about the JPEG driver. The documentation says that the quality "must be in the range 10-100". Must this value be an integer ? Are the 10 and/or 100 boundaries included in the definition range ? Thank you in advance Nicolas __

Re: [gdal-dev] CopyLayer oddity using GML driver

2011-11-22 Thread Ari Jolma
On 11/21/2011 08:57 PM, Even Rouault wrote: Le lundi 21 novembre 2011 11:20:33, Ari Jolma a écrit : Hi, I'm making a new GML layer from an existing layer. For some reason the CopyLayer method leaves adjusted fields out but CreateField, CreateFeature sequence does not. I guess they should be ide

Re: [gdal-dev] CopyLayer oddity using GML driver

2011-11-22 Thread Even Rouault
> Hi, > > another thing I noticed while using CopyDataSource, which might be > related to CopyLayer, that's why I am posting this here: the driver is > lost, don't know if this is intentional ... see the short code example below Frank, No, this is not intentional. CopyDataSource() should assign