Re: [gdal-dev] Python API: Geometry.Buffer with JOIN_STYLE

2024-10-04 Thread Even Rouault via gdal-dev
Le 04/10/2024 à 23:06, Barry DeZonia via gdal-dev a écrit : I don't know a lot about gdal but what if your call was just: geom.Buffer(6, ["JOIN_STYLE=MITRE"]) Yes, or using a dict. Cf https://github.com/OSGeo/gdal/blob/f1f750e1b25cfe22f2b2ce4795ee459beb3fa8d8/autotest/ogr/ogr_geom.py#L4711

Re: [gdal-dev] Python API: Geometry.Buffer with JOIN_STYLE

2024-10-04 Thread Barry DeZonia via gdal-dev
I don't know a lot about gdal but what if your call was just: geom.Buffer(6, ["JOIN_STYLE=MITRE"]) On Fri, Oct 4, 2024 at 3:55 PM Martin Landa via gdal-dev < gdal-dev@lists.osgeo.org> wrote: > Hi all, > > in the documentation [1] is mentioned: > > """ > Buffer(Geometry self, double distance, cha

[gdal-dev] Python API: Geometry.Buffer with JOIN_STYLE

2024-10-04 Thread Martin Landa via gdal-dev
Hi all, in the documentation [1] is mentioned: """ Buffer(Geometry self, double distance, char ** options)→ Geometry """ where the options argument points to [2]. But """ geom.Buffer(6, options=["JOIN_STYLE=MITRE"]) """ fails with """ File "/usr/lib/python3.11/site-packages/osgeo/ogr.py", l

Re: [gdal-dev] Python API ReadAsArray axis order

2022-12-04 Thread Even Rouault
Chris, ReadAsArray() returns a NumPy array, and the first dimension in NumPy is the slowest varying one, that is y. GDAL's geotransform is Xgeoref = gt[0] + column * gt[1] + line * gt[2] Ygeoref = gt[3] + column * gt[4] + line * gt[5] and GDAL's Raster API have their arguments with column f

Re: [gdal-dev] Python API ReadAsArray axis order

2022-12-04 Thread Javier Jimenez Shaw
Hi Chris I am not an expert in python. But I had similar problems in other environments. At https://gdal.org/api/python/osgeo.gdal.html you can see that in many functions the numpy array returned is always in the form "array[y][x]". Looks like the shape in stored as "row,cols", not as "x,y". Chee

[gdal-dev] Python API ReadAsArray axis order

2022-12-04 Thread Chris Crook
Hi I am using the Python GDAL API and looking at a simple TIFF image with a test program: from osgeo import gdal dataset = gdal.Open('test-gdal.tif') transform=dataset.GetGeoTransform() nx=dataset.RasterXSize ny=dataset.RasterYSize data=dataset.ReadAsArray() print(f"Raster xsize, ysize ({nx},{ny

Re: [gdal-dev] Python API docs

2022-10-20 Thread Even Rouault
https://gdal.org/api/python/osgeo.html Le 20/10/2022 à 21:13, Chaitanya kumar CH a écrit : Hi all, Does anyone know where the python api docs are moved? I can't find them at "gdal.org/python ". Thank you Best regards, Chaitanya Kumar CH.

Re: [gdal-dev] Python API docs

2022-10-20 Thread Alan Snow
They are now here: https://gdal.org/api/python/osgeo.html On Thu, Oct 20, 2022, 2:14 PM Chaitanya kumar CH wrote: > Hi all, > > Does anyone know where the python api docs are moved? I can't find them at > "gdal.org/python". > Thank you > > Best regards, > Chaitanya Kumar CH. > >

[gdal-dev] Python API docs

2022-10-20 Thread Chaitanya kumar CH
Hi all, Does anyone know where the python api docs are moved? I can't find them at " gdal.org/python". Thank you Best regards, Chaitanya Kumar CH. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Python API

2013-03-06 Thread Frank Warmerdam
On Wed, Mar 6, 2013 at 11:01 AM, Jeremy Palmer wrote: > Hi All, > > I've got a few questions about the support and future of some method calls > within the OGR Python API. > > 1/ What is preferred way to method to access geometries from features? is > it feature.geometry() or feature.GetGeometryR

[gdal-dev] Python API

2013-03-06 Thread Jeremy Palmer
Hi All, I've got a few questions about the support and future of some method calls within the OGR Python API. 1/ What is preferred way to method to access geometries from features? is it feature.geometry() or feature.GetGeometryRef()? "geometry()" seems funny as it's not well documented and is