Skip to content

Conversation

@anowacki
Copy link
Contributor

wkbPointZM is defined in Gdal and used within ogr2GMTdataset
with the expectation that it had been brought into scope of the
parent module with the using Gdal statement. However,
wkbPointZM was not actually exported from Gdal, causing an
error when converting some files.

Add wkbPointZM to the list of exports in Gdal to fix this.

This was found when reading a Shapefile containing sets of
points.

Note that this PR does not contain any tests. I don't really
understand Shapefiles (nor geospatial stuff generally) and am
not able to share the files which cause this problem, so I was
not sure how to write a test for this. However
I am willing to help diagnose in any other way I can.

I also wonder whether other things should be exported from
Gdal, but this change fixes reading of isolated points which is
enough for me for now.

`wkbPointZM` is defined in `Gdal` and used within `ogr2GMTdataset`
with the expectation that it had been brought into scope of the
parent module with the `using Gdal` statement.  However,
`wkbPointZM` was not actually exported from `Gdal`, causing an
error when converting some files.

Add `wkbPointZM` to the list of exports in `Gdal` to fix this.
@joa-quim
Copy link
Member

Thanks for catch and fix. You are right that other issues like this may still exist but hard to test all because that would need lots of different OGR type files. Many of the functions and constants in gdal.jl are not reexported because they are mainly used only inside the GDAL sub-module files. That was not the case of ogr2GMTdataset, though.

@joa-quim joa-quim merged commit 136bad1 into GenericMappingTools:master Sep 23, 2025
1 check passed
@anowacki anowacki deleted the an/fix-missing-wkbPointZM branch September 23, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants