-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geopandas 1.0.0 or pyogrio 0.9.0 doesn't support OGR_GMT output? #3301
Comments
That's weird. I tried to create the same environment locally.
Now I have geopandas 1.0.0, pyogrio 0.9.0 and gdal 3.9.0 installed, but the script works well for me. In [1]: import pygmt
In [2]: import geopandas as gpd
In [3]: # Example GeoDataFrame
...: gdf = gpd.GeoDataFrame(
...: {
...: "geometry": gpd.points_from_xy([2, 5, 9], [2, 3, 4]),
...: "value": [10, 20, 30],
...: }
...: )
...:
...: # Use the GeoDataFrame to specify the 'data' parameter
...: fig = pygmt.Figure()
...: fig.basemap(region=[0, 10, 0, 5], projection="X10c/5c", frame=True)
...: fig.plot(data=gdf, style="c0.2c", fill="purple")
...: fig.show() |
There is one more failure:
|
This error comes from GDAL https://github.com/OSGeo/gdal/blob/a66c71d0e1e19a5ef9d94b33bef90074173be9c2/gcore/gdaldataset.cpp#L3965C7-L3965C7 |
The "GMT Dev Tests" installs Your example at #3301 (comment) works for me too if I run it individually. But when I do |
The "Tests" workflow also has geopandas from conda-forge, but the geopandas tests all pass. |
Found a related issue upstream at geopandas/pyogrio#144. There is supposed to be some logic to register GDAL drivers when pyogrio is imported (geopandas/pyogrio#145), but it is not working properly in Sphinx build for some reason, and causing that Workaround is to manually register the drivers like so: import pyogrio
pyogrio.core._register_drivers() See also https://github.com/GenericMappingTools/pygmt/pull/3305/files#r1669745089 where this patch is applied. |
Have reported this upstream, and got a super helpful response at geopandas/pyogrio#448 (comment). It seems like there may be some conflict with the order of how rioxarray/rasterio and pyogrio is loading the GDAL drivers. |
geopandas v1.0.0 was released a few hours ago and now our Docs workflow fails to build (https://github.com/GenericMappingTools/pygmt/actions/runs/9559533732/job/26634813440) which is not caught in our "GMT Dev Tests" workflow (why?):
The text was updated successfully, but these errors were encountered: