[gdal-dev] Java API: how to find dimensions of MDArray

2023-06-02 Thread Barry DeZonia
Hi all, I have access to an MDArray. I am trying to find its dimensions. In the C++ API I can see that GDALMDArray has a method called GetDimensions() to find the info I need. But I am programming in Java and the Java API does not show such a call for MDArray. Is there some way in Java to find the

Re: [gdal-dev] Create a GDAL VRT for a 3D image that transposes the image dimensions

2023-06-02 Thread Even Rouault
You may use the multidimensional API for that : https://gdal.org/drivers/raster/vrt_multidimensional.html . Typically the element is relevant. Note however that on-the-fly transposing can have bad performance, but for the relatively small image you mention, that might be OK. That said, you'd m

Re: [gdal-dev] Creation of a new driver from scratch

2023-06-02 Thread Even Rouault
It is indeed desired that the code style of the contribution matches GDAL's style to some degree. GDAL provides a .clang-format file that might be helpful when you are editing to provide some automated conformance. Cf https://gdal.org/development/dev_practices.html#commit-hooks also to inst

Re: [gdal-dev] Creation of a new driver from scratch

2023-06-02 Thread Howard Butler
Abel, Comments inline > On Jun 2, 2023, at 10:08 AM, Abel Pau wrote: > > You can find the specifications of our vector and raster formats on our > website www.miramon.cat in the "Support/Technical notes" section under the > titles "Format specification of the MiraMon vector files" and "Forma

[gdal-dev] Create a GDAL VRT for a 3D image that transposes the image dimensions

2023-06-02 Thread Daniel Scheffler
Hi! I have an image with 500 rows, 1000 columns, and 2 bands in a NetCDF file which stores the data in the following scheme: - dimension 1: rows - dimension 2: bands - dimension 3: columns If I now do gdal.Open('filepath').GetRasterBand(1).ReadAsArray(), I get a numpy array in the shape 500x2

Re: [gdal-dev] Want to work with MDArrays

2023-06-02 Thread Laurențiu Nicola via gdal-dev
Hi Barry, I think you want GDAL_OF_MULTIDIM_RASTER. There's an example here: https://gdal.org/tutorials/multidimensional_api_tut.html. Laurentiu On Fri, Jun 2, 2023, at 19:25, Barry DeZonia wrote: > Hello, > > I am a software developer that has written a numerical analysis software > package

[gdal-dev] Want to work with MDArrays

2023-06-02 Thread Barry DeZonia
Hello, I am a software developer that has written a numerical analysis software package that has support for n-dimensional data ( https://github.com/bdezonia/zorbage). I sometimes write importer libraries to pull data into my data structures for further processing. It is primarily a package for sc

[gdal-dev] Creation of a new driver from scratch

2023-06-02 Thread Abel Pau
Dear GDAL Team, I am writing to you to introduce myself and ask you some questions, if I am allowed to. We are a team of developers working on MiraMon GIS, and I, Abel Pau, am representing our group. We are interested in contributing to the GDAL community by generating GDAL drivers for our vect

Re: [gdal-dev] How to decrease file size of colored raster bands?

2023-06-02 Thread afernandez
Hi Scott and Laurentiu, It is now compressing the file. On a minor note I usually prefer to use 'subprocess' instead of 'os.system' but either way it is now a matter of experimenting with the flags and finding out which is the best combination to compress the project output files. Thanks for all