Re: [gdal-dev] Failed to process SRS definition

2009-07-17 Thread Even Rouault
OGR only supports the "+a=x +b=y" and "+a= +rf=z" combinations. It could be extended to support more combinations, but those 2 ones are the most common to describe an ellipsoid. Patches welcome if your needs go beyond that. I don't think OCTProj4Normalize() strips the b paramet

Re: [gdal-dev] RE clip intersected

2009-07-17 Thread Frank Warmerdam
steve.tout...@inspq.qc.ca wrote: I finally got gdal_polygonize.py and tried it and generate a shapefile. I might not use it as a solution for what I described below but I would like to use it for other purpose. My understanding is this function merge contiguous cells with the same pixel value

RE: [gdal-dev] Creating a new raster and adding data

2009-07-17 Thread Henneke, Amanda M
Thanks Frank for your help, I think I'm further, but still not quite there. The definition requires me to send the iBandMap as an array, I cannot insert the index of the band I wish to write, because then I'm just passing an integer. So with that said, I decided to combine all my byte arrays (buf

[gdal-dev] AttributeError: 'MaskedArray' object has no attribute 'typecode' -- when writing GeoTiff

2009-07-17 Thread Greg Fiske
Dear list, In python, I'm writing GeoTiff files from numpy arrays. I keep getting the error: AttributeError: 'MaskedArray' object has no attribute 'typecode' Of which I cannot find any good description. Can anybody suggest a reason? Thanks in advance for any advice, I've pasted my code below,

Re: [gdal-dev] RE clip intersected

2009-07-17 Thread Steve . Toutant
I finally got gdal_polygonize.py and tried it and generate a shapefile. I might not use it as a solution for what I described below but I would like to use it for other purpose. My understanding is this function merge contiguous cells with the same pixel value. Can I use this function and speci

Re: [gdal-dev] Creating a new raster and adding data

2009-07-17 Thread Frank Warmerdam
Henneke, Amanda M wrote: ... This is what I have so far... Dataset ds = Gdal.Open("F:\\Mat_Class\\Alaska\\new_tifs\\class_ak_sheet_8a.tif", Access.GA_Update); Dataset ds_new = drv.Create("F:\\Mat_Class\\Alaska\\new_tifs\\class_ak_sheet_8a_test.tif", ds.RasterXSize, ds.RasterYSize, 5, DataTyp

Re: [gdal-dev] RE clip intersected

2009-07-17 Thread Frank Warmerdam
steve.tout...@inspq.qc.ca wrote: I might try this..is it the good way to do what I need? 1- Use gdal_polygonize.py to create a boundary (excluding pixels with no value) of each image and save the boundary as a .shp 2- Somehow find the intersected region of the 2 polygons (boundaries) created

[gdal-dev] RE clip intersected

2009-07-17 Thread Steve . Toutant
I might try this..is it the good way to do what I need? 1- Use gdal_polygonize.py to create a boundary (excluding pixels with no value) of each image and save the boundary as a .shp 2- Somehow find the intersected region of the 2 polygons (boundaries) created above and save the result to .shp 3-

[gdal-dev] clip intersected

2009-07-17 Thread Steve . Toutant
Hi, I have 2 Erdas (.img) images that overlap. See attached image. I need to clip one of the 2 images by removing the intersected (dark red) part. If it's possible, how should I accomplish this? thanks for your help, Steve Steve Toutant, M. Sc. Analyste en géomatique Secteur environnement

Re: [gdal-dev] Re: C# Nad27 to WGS 84

2009-07-17 Thread Tamas Szekeres
2009/7/17 Tomas R > Hi again > > Seems like I have solved the problem... the line > >> such as preprocessing the grid shift file into binary form. >> > gave me (finally) the hint I needed. Tried to compile Proj4 and the shift > files but managed only compile the first part. Then I finally went fo

[gdal-dev] Creating a new raster and adding data

2009-07-17 Thread Henneke, Amanda M
Hello all- Using the C# gdal libraries, I'm trying to create a new raster dataset with 5 bands and then use the WriteRaster method to add data to each of those 5 bands. This is what I have so far... Dataset ds = Gdal.Open("F:\\Mat_Class\\Alaska\\new_tifs\\class_ak_sheet_8a.tif", Access.GA_Upd

Re: [gdal-dev] Regarding using OCI

2009-07-17 Thread Peter J Halls
Srikanth, Srikanth wrote: Peter , To be more specific, I want to store a ESRI shape file into the oracle database. I would like to know whether gdal provides such a kind of direct method where in if one passes the shape file name it gets stored in the database handling the conversion of SDO_GEO

Re: [gdal-dev] DGN Data set creation options : Need details

2009-07-17 Thread Chaitanya kumar CH
Nilesh, Refer to the various links from http://www.gdal.org/ogr/ The datasource creation options are specific to each driver and often there are no options and simply NULL is passed. You use them when the datasource can be opened in different modes. I see that the current DGN driver supports some

Re: [gdal-dev] Regarding using OCI

2009-07-17 Thread Chaitanya kumar CH
Srikanth, The ogr2ogr utility might be of help to you. Docs: http://gdal.org/ogr2ogr.html Download: http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries On Fri, Jul 17, 2009 at 4:37 PM, Srikanth wrote: > Peter , > > To be more specific, I want to store a ESRI shape file into the oracle > dat

Re: [gdal-dev] Regarding using OCI

2009-07-17 Thread Srikanth
Peter , To be more specific, I want to store a ESRI shape file into the oracle database. I would like to know whether gdal provides such a kind of direct method where in if one passes the shape file name it gets stored in the database handling the conversion of SDO_GEOM type internally. I have go

[gdal-dev] Re: C# Nad27 to WGS 84

2009-07-17 Thread Tomas R
Hi again Seems like I have solved the problem... the line such as preprocessing the grid shift file into binary form. gave me (finally) the hint I needed. Tried to compile Proj4 and the shift files but managed only compile the first part. Then I finally went for the easy solution, I grabbed th

[gdal-dev] Re: C# Nad27 to WGS 84

2009-07-17 Thread Tomas R
Ok. my bad perhaps. Grabbed the shift-files from FWTools, and yes, now it works. It was, not to soon, I noticed the line such as preprocessing the grid shift file into binary form. I realized I had probably missed a step. But how-to do that? No idea. Try compiling Proj4, yes that works, but c

Re: [gdal-dev] Regarding using OCI

2009-07-17 Thread Peter Halls
Srikanth, with the driver documentation, Frank has provided a simple overview example. Otherwise, the OCI driver works just like any other. Look carefully at Frank's syntax for the connection string, though. I've been using this driver for a couple of years now with very good results - i

[gdal-dev] Regarding using OCI

2009-07-17 Thread Srikanth
Dear All, I want to connect to Oracle and save/retrieve the vector/raster files using OCI. I have identified the classes ( ogrocidriver, ogrocistatement, ogrocitablelayer, etc) in GDAL to achieve this.But I did not find any documentation or examples to guide. I would be thankful if anyone can prov

[gdal-dev] DGN Data set creation options : Need details

2009-07-17 Thread Nilesh Choure
Hi ALL, I am working on exporting features from other file formats into DGN and new to GIS field. From the ogr documentation I found that there are significant limitations on DGN writer part. But can anyone explain me or show link to what is the meaning of each data set creation option, what is th

Re: [gdal-dev] Use of CPLAssert macro

2009-07-17 Thread Jorge Arévalo
Hello, 2009/7/16 Even Rouault : > Jorge, > > CPLAssert should be rarely used. You should generally use CPLError instead. > I've regularly removed remaining CPLAssert from GDAL code base to replace > them with CPLError when it was appropriate. > > As you noted, CPLAssert causes an abort to the proc

Re: [gdal-dev] Failed to process SRS definition

2009-07-17 Thread Jørn Vegard Røsnes
On Thursday 16 July 2009 20:59:55 Even Rouault wrote: > Le Thursday 16 July 2009 10:14:27 Jørn Vegard Røsnes, vous avez écrit : > > Hi again, > > > > On Wednesday 15 July 2009 13:12:38 Jørn Vegard Røsnes wrote: > > > Hi all, > > > > > > can you see the problem (this works with proj4)? > > > It work