Hot answers tagged

3

Since you're using shapefiles, you have vector layers. The vector "half" of GDAL is called OGR. The command ogr2ogr lets you convert vector layers, including selecting only a subset of attributes with the -select parameter. The full documentation is at https://gdal.org/programs/ogr2ogr.html. With additional parameters, you can also clip your layer ...


3

Solved - thanks to @user2856 comment (above). Use the GDALGetMetadataItem() function (C), or the GetMetadataItem() method (C++). Passing in a pszName argument of GDAL_DCAP_VECTOR returns "YES" for a vector driver and NULL otherwise (as far as I can tell - I haven't actually found the exact behaviour documented, as yet). For my iOS Swift code I ...


2

This works for me: Download and install Python 3.7. I don't like "Program Files" much but in this test I used C:\Program Files\Python37. Install GDAL with the MSI installer. I used C:\Program Files\GDAL. Install GDAL Python bindings with the MSI installer. Use the Python37 location from point 1) and check that you have osgeo package in C:\Program ...


2

The EFAL driver is written, maintained, and delivered by the MapInfo team, earlier under Pitney Bowes and now as a part of Precisely. If you have troubles you can contact your MapInfo support. The GDAL development team cannot help you. In this case you should be able to help yourself. Download the two files from https://support.precisely.com/product-...


2

Here is the only solution that I've found so far. It's not ideal, but it works... Hard code a list of Vector Driver Names, based on the driver short names found at: https://gdal.org/drivers/vector/index.html Check if each driver's short name is in the hard-coded list of Vector Driver Names This is a little kludgy, and obviously not going to dynamically ...


2

If you're just looking to compare files for any difference then you can use generic tools that have no relation to GIS as such. I would calculate an md5sum. If the files are identical, then the MD5 hash will be the same. If they are even slightly different, the MD5 hash will be completely different. Since you've tagged python, see this question for detail: ...


1

Your observation may be related with the change in the order of the points in polygons that is discussed in gdal-dev mailing list thread https://lists.osgeo.org/pipermail/gdal-dev/2021-February/053534.html. You seem to deal with contour lines but maybe the process is first building polygons in some previous step. Even if your issue was not the same it could ...


1

Solved! The problem was that I should be passing these particular option(s) to the function that creates the layer, and not to the function that creates the data source. Eg, like this: let options = ["GEOMETRY=AS_XYZ", "CREATE_CSVT=YES"] var cOpts = options.map { strdup($0) } cOpts.append(nil) let ogrLayer = GDALDatasetCreateLayer(ds, ...


Only top voted, non community-wiki answers of a minimum length are eligible