Skip to content

Commit 81214bf

Browse files
martinfleisHammamiKhaledkshitijaucharmalpetern48jsignell
authored
RLS: backport fixes for 1.1.2 (#3693)
Co-authored-by: Khaled Hammami <69561306+HammamiKhaled@users.noreply.github.com> Co-authored-by: KshitijAucharmal <39955649+kshitijaucharmal@users.noreply.github.com> Co-authored-by: Peter Nguyen <petern0408@gmail.com> Co-authored-by: Julia Signell <jsignell@gmail.com> Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com> Co-authored-by: bretttully <brett.tully@nearmap.com> Co-authored-by: Matt Richards <45483497+m-richards@users.noreply.github.com> Co-authored-by: Giacomo Caria <44147817+gcaria@users.noreply.github.com> Co-authored-by: Christine P. Chai <star1327p@gmail.com> Co-authored-by: Kavin <135452240+kavin160100@users.noreply.github.com> Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com> Co-authored-by: Yunus AYDIN <aydinnyunus@gmail.com> Co-authored-by: Yunus Aydın <yunus.aydin@trendyol.com> Co-authored-by: Pieter Roggemans <pieter.roggemans@gmail.com> Co-authored-by: Egor Sanin <116128944+egorbn@users.noreply.github.com>
1 parent 62dd4a2 commit 81214bf

30 files changed

Lines changed: 652 additions & 118 deletions

.github/workflows/tests.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Tests
22

33
on:
44
push:
5-
branches: [main, 0.**]
5+
branches: [main, 0.**, 1.**]
66
pull_request:
7-
branches: [main, 0.**]
7+
branches: [main, 0.**, 1.**]
88
schedule:
99
- cron: "0 0 * * *"
1010

@@ -37,6 +37,7 @@ jobs:
3737
- ci/envs/312-latest.yaml
3838
- ci/envs/312-latest-no-pyproj.yaml
3939
- ci/envs/313-latest.yaml
40+
- ci/envs/314-latest.yaml
4041
include:
4142
- env: ci/envs/310-latest-no-pyogrio.yaml
4243
os: macos-latest
@@ -81,7 +82,8 @@ jobs:
8182
pytest -v -r a -n auto --color=yes --cov=geopandas --cov-append --cov-report term-missing --cov-report xml geopandas/
8283
8384
- name: Test with PostGIS
84-
if: (contains(matrix.env, '311-pd22.yaml') || contains(matrix.env, '312-latest.yaml'))
85+
if:
86+
(contains(matrix.env, '311-pd22.yaml') || contains(matrix.env, '312-latest.yaml'))
8587
&& contains(matrix.os, 'ubuntu')
8688
env:
8789
PGUSER: postgres

CHANGELOG.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## Version 1.1.2 (December 22, 2025)
4+
5+
Bug fixes:
6+
7+
- Fix an issue that caused an error in `GeoDataFrame.from_features` when there is no `properties` field (#3599).
8+
- Fix `read_file` and `to_file` errors (#3682)
9+
- Fix `read_parquet` with `to_pandas_kwargs` for complex (list/struct) arrow types (#3640)
10+
- `value_counts` on GeoSeries now preserves CRS in index (#3669)
11+
- Fix f-string placeholders appearing in error messages when `pyogrio` cannot be imported (#3682).
12+
- Fix `read_parquet` with `to_pandas_kwargs` for complex (list/struct) arrow types (#3640).
13+
- `.to_json` now provides a clearer error message when called on a GeoDataFrame without an active geometry
14+
column (#3648).
15+
- Calling `del gdf["geometry"]` now will downcast to a `pd.DataFrame` if there are no geometry columns left
16+
in the dataframe (#3648).
17+
- Fix SQL injection in `to_postgis` via geometry column name (#3681).
18+
319
## Version 1.1.1 (June 27, 2025)
420

521
Bug fixes:
@@ -48,12 +64,12 @@ New features and improvements:
4864
extension mechanism (#3272).
4965
- Improve performance of `overlay` with `how=identity` (#3504).
5066
- A warning message is raised in `read_file` when a GeoDataFrame or GeoSeries mask
51-
and/or the source dataset is missing a defined CRS. (#3464)
67+
and/or the source dataset is missing a defined CRS (#3464).
5268
- GeoDataFrame no longer hard-codes the class internally, allowing easier subclassing (#3505).
5369

5470
Bug fixes:
5571

56-
- Fix an issue that showed numpy dtypes in bbox in `to_geo_dict` and `__geo_interface__`. (#3436)
72+
- Fix an issue that showed numpy dtypes in bbox in `to_geo_dict` and `__geo_interface__`. (#3436).
5773
- Fix an issue in `sample_points` that could occasionally result in non-uniform distribution (#3470).
5874
- Fix unspecified layer warning being emitted while reading multilayer datasets, even
5975
when layer is specified when using the mask or bbox keywords (#3378).
@@ -85,7 +101,7 @@ Deprecations and compatibility notes:
85101
Bug fixes:
86102

87103
- Support a named datetime or object dtype index in `explore()` (#3360, #3364).
88-
- Fix a regression preventing a Series as an argument for geometric methods (#3363)
104+
- Fix a regression preventing a Series as an argument for geometric methods (#3363).
89105

90106
## Version 1.0.0 (June 24, 2024)
91107

@@ -100,7 +116,7 @@ Notes on dependencies:
100116
New methods:
101117

102118
- Added `count_geometries` method from shapely to GeoSeries/GeoDataFrame (#3154).
103-
- Added `count_interior_rings` method from shapely to GeoSeries/GeoDataFrame (#3154)
119+
- Added `count_interior_rings` method from shapely to GeoSeries/GeoDataFrame (#3154).
104120
- Added `relate_pattern` method from shapely to GeoSeries/GeoDataFrame (#3211).
105121
- Added `intersection_all` method from shapely to GeoSeries/GeoDataFrame (#3228).
106122
- Added `line_merge` method from shapely to GeoSeries/GeoDataFrame (#3214).
@@ -151,22 +167,23 @@ New features and improvements:
151167
- The `GeoSeries.fillna` method now supports the `limit` keyword (#3290).
152168
- Added ``on_attribute`` option argument to the ``sjoin()``
153169
method, allowing to restrict joins to the observations with
154-
matching attributes. (#3231)
170+
matching attributes (#3231).
155171
- Added support for `bbox` covering encoding in geoparquet. Can filter reading of parquet
156172
files based on a bounding box, and write out a bounding box column to parquet files (#3282).
157173
- `align` keyword in binary methods now defaults to `None`, treated as True. Explicit True
158174
will silence the warning about mismatched indices (#3212).
159175
- `GeoSeries.set_crs` can now be used to remove CRS information by passing
160176
`crs=None, allow_override=True` (#3316).
161177
- Added ``autolim`` keyword argument to ``GeoSeries.plot()`` and ``GeoDataFrame.plot()`` (#2817).
162-
- Added `metadata` parameter to `GeoDataFrame.to_file` (#2850)
178+
- Added `metadata` parameter to `GeoDataFrame.to_file` (#2850).
163179
- Updated documentation to clarify that passing a named (Geo)Series as the `geometry`
164180
argument to the GeoDataFrame constructor will not use the name but will always
165181
produce a GeoDataFrame with an active geometry column named "geometry" (#3337).
166182
- `read_postgis` will query the spatial_ref_sys table to determine the CRS authority
167183
instead of its current behaviour of assuming EPSG. In the event the spiatal_ref_sys
168184
table is not present, or the SRID is not present, `read_postgis` will fallback
169-
on assuming EPSG CRS authority. (#3329)
185+
on assuming EPSG CRS authority (#3329).
186+
- Added ``GeoDataFrame.active_geometry_name`` property returning the active geometry column's name or None if no active geometry column is set (#2943).
170187

171188
Backwards incompatible API changes:
172189

@@ -251,7 +268,7 @@ Bug fixes:
251268
`GeoSeries` the name was not used as the active geometry column name (#3237).
252269
- Fix bug in `GeoSeries` constructor when passing a Series and specifying a `crs` to not change the original input data (#2492).
253270
- Fix regression preventing reading from file paths containing hashes in `read_file`
254-
with the fiona engine (#3280). An analgous fix for pyogrio is included in
271+
with the fiona engine (#3280). An analogous fix for pyogrio is included in
255272
pyogrio 0.8.1.
256273
- Fix `to_parquet` to write correct metadata in case of 3D geometries (#2824).
257274
- Fixes for compatibility with psycopg (#3167).
@@ -309,7 +326,6 @@ New methods:
309326
New features and improvements:
310327

311328
- Added ``exclusive`` parameter to ``sjoin_nearest`` method for Shapely >= 2.0 (#2877)
312-
- Added ``GeoDataFrame.active_geometry_name`` property returning the active geometry column's name or None if no active geometry column is set.
313329
- The ``to_file()`` method will now automatically detect the FlatGeoBuf driver
314330
for files with the `.fgb` extension (#2958)
315331

@@ -609,7 +625,7 @@ Small bug-fix release:
609625
overlay of two geometries in a GeometryCollection with other geometry types
610626
(#2177).
611627
- Fix ``overlay()`` to honor the ``keep_geom_type`` keyword for the
612-
``op="differnce"`` case (#2164).
628+
``op="difference"`` case (#2164).
613629
- Fix regression in ``plot()`` with a mapclassify ``scheme`` in case the
614630
formatted legend labels have duplicates (#2166).
615631
- Fix a bug in the ``explore()`` method ignoring the ``vmin`` and ``vmax`` keywords
@@ -1055,7 +1071,7 @@ Bug fixes:
10551071
- Fixed ``GeoDataFrame.to_file`` to preserve VFS file paths (e.g. when a "s3://" path is specified) (#1124).
10561072
- Fixed failing case in ``geopandas.sjoin`` with empty geometries (#1138).
10571073

1058-
In addition, the minimum required versions of some dependencies have been increased: GeoPandas now requirs pandas >=0.23.4 and matplotlib >=2.0.1 (#1002).
1074+
In addition, the minimum required versions of some dependencies have been increased: GeoPandas now requires pandas >=0.23.4 and matplotlib >=2.0.1 (#1002).
10591075

10601076
Version 0.5.1 (July 11, 2019)
10611077
-----------------------------

ci/envs/314-latest.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: test
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.14
6+
# required
7+
- pandas
8+
- shapely
9+
- pyogrio
10+
- pyproj
11+
- packaging
12+
# testing
13+
- pytest
14+
- pytest-cov
15+
- pytest-xdist
16+
- fsspec
17+
- pytz
18+
# optional
19+
# - fiona # no 3.14 build yet
20+
- matplotlib
21+
- mapclassify
22+
- folium
23+
- xyzservices
24+
- scipy
25+
- geopy
26+
- pointpats
27+
- geodatasets
28+
# installed in tests.yaml, because not available on windows
29+
# - postgis
30+
- SQLalchemy
31+
- psycopg
32+
- psycopg2
33+
- libspatialite
34+
- geoalchemy2
35+
- pyarrow
36+
- geoarrow-pyarrow
37+
# doctest testing
38+
- pytest-doctestplus

doc/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: geopandas_docs
22
channels:
33
- conda-forge
44
dependencies:
5-
- python
5+
- python=3.13
66
- pandas
77
- shapely
88
- geopy

doc/source/community/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ At this point you can easily do a *development* install, as detailed in the next
206206
3) Installing Dependencies
207207
--------------------------
208208

209-
To run GeoPandas in an development environment, you must first install the dependencies of
209+
To run GeoPandas in a development environment, you must first install the dependencies of
210210
GeoPandas. If you used the provided environment in section 2, skip this
211211
step and continue to section 4. If you created the environment manually, we suggest installing
212212
dependencies using the following commands (executed after your development environment has been activated)::

doc/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676

7777
def setup(app):
78-
app.add_css_file("custom.css") # may also be an URL
78+
app.add_css_file("custom.css") # may also be a URL
7979

8080

8181
# Add any paths that contain templates here, relative to this directory.
@@ -373,8 +373,8 @@ def setup(app):
373373
# connect docs in other projects
374374
intersphinx_mapping = {
375375
"cartopy": (
376-
"https://scitools.org.uk/cartopy/docs/latest/",
377-
"https://scitools.org.uk/cartopy/docs/latest/objects.inv",
376+
"https://cartopy.readthedocs.io/stable/",
377+
"https://cartopy.readthedocs.io/stable/objects.inv",
378378
),
379379
"contextily": (
380380
"https://contextily.readthedocs.io/en/stable/",

doc/source/gallery/cartopy_convert.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"\n",
1010
"Converting between GeoPandas and CartoPy for visualizing data.\n",
1111
"\n",
12-
"[CartoPy](http://scitools.org.uk/cartopy/) is a Python library\n",
12+
"[CartoPy](https://cartopy.readthedocs.io/) is a Python library\n",
1313
"that specializes in creating geospatial\n",
1414
"visualizations. It has a slightly different way of representing\n",
1515
"Coordinate Reference Systems (CRS) as well as constructing plots.\n",

doc/source/getting_started/install.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ For plotting, these additional packages may be used:
214214

215215
.. _pointpats: https://pysal.org/pointpats/
216216

217-
.. _folium: https://python-visualization.github.io/folium/stable/
217+
.. _folium: https://python-visualization.github.io/folium/latest/
218+
219+
.. _scipy: https://docs.scipy.org/doc/scipy/
218220

219-
.. _scipy: https://docs.scipy.org/doc/scipy/

geopandas/_compat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
PANDAS_GE_202 = Version(pd.__version__) >= Version("2.0.2")
1313
PANDAS_GE_21 = Version(pd.__version__) >= Version("2.1.0")
1414
PANDAS_GE_22 = Version(pd.__version__) >= Version("2.2.0")
15+
PANDAS_GE_23 = Version(pd.__version__) >= Version("2.3.0")
1516
PANDAS_GE_30 = Version(pd.__version__) >= Version("3.0.0.dev0")
17+
PANDAS_INFER_STR = PANDAS_GE_23 and pd.options.future.infer_string
1618

1719

1820
# -----------------------------------------------------------------------------

geopandas/array.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,7 @@ def has_sindex(self):
375375
def crs(self):
376376
"""The Coordinate Reference System (CRS) represented as a ``pyproj.CRS`` object.
377377
378-
Returns None if the CRS is not set, and to set the value it
379-
:getter: Returns a ``pyproj.CRS`` or None. When setting, the value
378+
Returns a ``pyproj.CRS`` or None. When setting, the value
380379
Coordinate Reference System of the geometry objects. Can be anything accepted by
381380
:meth:`pyproj.CRS.from_user_input() <pyproj.crs.CRS.from_user_input>`,
382381
such as an authority string (eg "EPSG:4326") or a WKT string.
@@ -1350,7 +1349,7 @@ def fillna(self, value=None, method=None, limit=None, copy=True):
13501349
----------
13511350
value : shapely geometry object or GeometryArray
13521351
If a geometry value is passed it is used to fill all missing values.
1353-
Alternatively, an GeometryArray 'value' can be given. It's expected
1352+
Alternatively, a GeometryArray 'value' can be given. It's expected
13541353
that the GeometryArray has the same length as 'self'.
13551354
13561355
method : {'backfill', 'bfill', 'pad', 'ffill', None}, default None
@@ -1474,7 +1473,7 @@ def value_counts(
14741473
# Can't use fillna(None) or Index.putmask, as this gets converted back to nan
14751474
# for object dtypes
14761475
result.index = Index(
1477-
from_wkb(np.where(result.index.isna(), None, result.index))
1476+
from_wkb(np.where(result.index.isna(), None, result.index), crs=self.crs)
14781477
)
14791478
return result
14801479

@@ -1649,7 +1648,7 @@ def _values_for_argsort(self):
16491648
# process those. The missing values are handled separately by
16501649
# pandas regardless of the values we return here (to sort
16511650
# first/last depending on 'na_position'), the distances for the
1652-
# empty geometries are substitued below with an appropriate value
1651+
# empty geometries are replaced below with an appropriate value
16531652
geoms = self.copy()
16541653
indices = np.nonzero(~mask)[0]
16551654
if indices.size:

0 commit comments

Comments
 (0)