instance_id stringlengths 10 57 | file_changes listlengths 1 15 | repo stringlengths 7 53 | base_commit stringlengths 40 40 | problem_statement stringlengths 11 52.5k | patch stringlengths 251 7.06M |
|---|---|---|---|---|---|
gaogaotiantian__coredumpy-61 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/coredumpy/coredumpy.py:Coredumpy.load_data_from_path"
],
"edited_modules": [
"src/coredumpy/coredumpy.py:Coredumpy"
]
},
"file": "src/coredumpy/coredumpy.py"
}
] | gaogaotiantian/coredumpy | f9bfc952aaa3de0188d2a1555b1dec871cb254cc | Arbitrary code execution when loading a maliciously crafted dump file
pdb would call `linecache.getline` to get the source code:
[https://github.com/python/cpython/blob/3.13/Lib/bdb.py#L640](https://github.com/python/cpython/blob/3.13/Lib/bdb.py#L640)
```py
if lineno is not None:
line = linecache.g... | diff --git a/src/coredumpy/coredumpy.py b/src/coredumpy/coredumpy.py
index deb2220..483b7af 100644
--- a/src/coredumpy/coredumpy.py
+++ b/src/coredumpy/coredumpy.py
@@ -265,6 +265,16 @@ class Coredumpy:
for thread in data["threads"]:
data["threads"][thread]["frame"] = container.get_object(data["th... |
garcia__simfile-29 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "simfile/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"simfile/ssc.py:S... | garcia/simfile | 46074d9b9ce14089f9c0c05ed20772748fcb810f | Multi-value properties aren't handled correctly in SSC
Two bugs in **simfile** 2.0.0β2.1.0's SSC implementation break multi-value properties, causing them to be truncated or mangled past the first value:
1. When opening an SSC file, the `DISPLAYBPM` and `ATTACKS` properties of both simfiles and charts stop parsing a... | diff --git a/simfile/__init__.py b/simfile/__init__.py
index 37dc0ea..431cd21 100644
--- a/simfile/__init__.py
+++ b/simfile/__init__.py
@@ -22,7 +22,7 @@ from .sm import SMSimfile
from .types import Simfile
-__version__ = "2.1.0"
+__version__ = "2.1.1"
__all__ = [
"load",
"loads",
diff --git a/simfile/... |
garnaat__placebo-21 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"placebo/__init__.py:attach"
],
"edited_modules": [
"placebo/__init__.py:attach"
]
},
"file": "placebo/__init__.py"
},
{
"changes": {
"added_entities": [
... | garnaat/placebo | 81cb9c0e48f7e6e58e2cdd6414b777b39c846c4b | Optional prefix for saved response filenames
I noticed that each time Placebo writes a new response JSON file, it adds a `_<number>` suffix before the `.json`, and simply increments the suffix until it finds one that doesn't exist yet. This is better than overwriting previous runs, but doesn't give any way to distingui... | diff --git a/placebo/__init__.py b/placebo/__init__.py
index 43e34d6..8dc9470 100644
--- a/placebo/__init__.py
+++ b/placebo/__init__.py
@@ -15,7 +15,7 @@
from placebo.pill import Pill
-def attach(session, data_path, debug=False):
- pill = Pill(debug=debug)
+def attach(session, data_path, prefix=None, debug=Fal... |
gautamkrishnar__socli-193 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"socli/parser.py:parse_arguments"
],
"edited_modules": [
"socli/parser.py:parse_arguments"
]
},
"file": "socli/parser.py"
},
{
"changes": {
"added_entities... | gautamkrishnar/socli | 4a8332098b6c247815f1c4d724830563a44e1eda | Option to load stack overflow url directly
I use terminal a lot and using googler(jarun/googler) I can get the url of the stack overflow post . It would be good that I could just pass it as a argument to socli and it would open the page | diff --git a/.gitignore b/.gitignore
index dedeef3..06ff269 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,4 @@ build/
*.egg
venv
.eggs
-socli/data.json
\ No newline at end of file
+socli/data.json
diff --git a/README.md b/README.md
index c065580..c8beac2 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@... |
gawel__pyquery-221 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pyquery/pyquery.py:PyQuery.html"
],
"edited_modules": [
"pyquery/pyquery.py:PyQuery"
]
},
"file": "pyquery/pyquery.py"
}
] | gawel/pyquery | 7096042c6563cea07194a6430dea1b2dcb531b2f | .html() fails to escape initial html entities
The html() method returns incorrect results in some cases because it fails to escape HTML entities prior to the first tag in the inner HTML:
```
>>> PyQuery("<foo><script>// uh oh</script>bar<boo/></foo>").html()
'<script>// uh oh</script>bar<boo/>'
```
... | diff --git a/CHANGES.rst b/CHANGES.rst
index 971d377..3e0901e 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -3,6 +3,8 @@
- Add nextUntil method
+- Fix escaping of top-level element text in ``.html()`` output
+
1.4.3 (2020-11-21)
------------------
diff --git a/pyquery/pyquery.py b/pyquery/pyquery.py
index e549... |
gboeing__osmnx-359 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"osmnx/core.py:add_path",
"osmnx/core.py:add_paths"
],
"edited_modules": [
"osmnx/core.py:add_path",
"osmnx/core.py:add_paths"
]
},
"file": "osmnx/core.p... | gboeing/osmnx | 499a8e685342f9e040504411bbfbc20c9ee6cdeb | Fix duplicate edges in save_graph_osm()
When I originally wrote this function, I didn't realize that the edges dataframe generated by `ox.graph_to_gdfs()` will contain multiple rows with the same `osmid` for any way that is associate with more than two nodes. As such, save_graph_osm() will generate XML like
```
<way ... | diff --git a/osmnx/core.py b/osmnx/core.py
index d9588335..9c844d4a 100644
--- a/osmnx/core.py
+++ b/osmnx/core.py
@@ -807,8 +807,11 @@ def add_path(G, data, one_way):
del data['nodes']
# set the oneway attribute to the passed-in value, to make it consistent
- # True/False values
- data['oneway'] = on... |
gcaufield__MonkeyPack-25 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mbget/config.py:Config.__init__"
],
"edited_modules": [
"mbget/config.py:Config"
]
},
"file": "mbget/config.py"
}
] | gcaufield/MonkeyPack | e0d69035971808edb9f18965563ed7bed5ea7f54 | Pull GitHub token from environment
## Describe the feature
Add the option to pass the GitHub token using an environment variable.
| diff --git a/mbget/config.py b/mbget/config.py
index 6a7e8ef..cdde665 100644
--- a/mbget/config.py
+++ b/mbget/config.py
@@ -36,8 +36,11 @@ class Config(object):
def __init__(self, args):
if args.token is not None:
self.__token = args.token[0]
+ elif "MBGET_GH_TOKEN" in os.environ:
+ ... |
gcaufield__MonkeyPack-27 | [
{
"changes": {
"added_entities": [
"mbget/config.py:Config.manifest",
"mbget/config.py:Config.__get_cached_config",
"mbget/config.py:Config.__add_config_to_cache"
],
"added_modules": null,
"edited_entities": [
"mbget/config.py:Config.__init__",
"mb... | gcaufield/MonkeyPack | a63a746c20f3a0e83b8572cdc4d538c91237bf38 | Add support for ini configuration
## Describe the feature
Allow for projects to add an mbgetcfg.ini file to their project to change the configuration without needing to pass parameters on the command line.
| diff --git a/mbget/config.py b/mbget/config.py
index dffaefb..3771e1a 100644
--- a/mbget/config.py
+++ b/mbget/config.py
@@ -29,38 +29,60 @@
# ############################################################################ #
import os
+from configparser import ConfigParser
from typing import Optional
class Confi... |
gcovr__gcovr-540 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"gcovr/__main__.py:fail_under",
"gcovr/__main__.py:main",
"gcovr/__main__.py:collect_coverage_from_tracefiles",
"gcovr/__main__.py:collect_coverage_from_gcov",
"gcovr/__ma... | gcovr/gcovr | 8e0c377b2a0bbbcd76deff368b260302e6d0789e | Replace custom logger with python logging module
It would be easier and simplify integration with other modules to use the standard python `logging` package instead of relying on the custom solution.
This way it would be also easier to add different log levels and redirecting of logs to file instead of stdout. | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c00bd54a..0dcd2200 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -23,6 +23,7 @@ Improvements and new features:
- Add :option:`--no-markers` to ignore exclusion markers in code. (:issue:`361`)
- Generate also a Report of Excluded Coverage. (:issue:`503`)
- Added :o... |
genadijrazdorov__algograph-36 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"algograph/lexer.py:Lexer.newline"
],
"edited_modules": [
"algograph/lexer.py:Lexer"
]
},
"file": "algograph/lexer.py"
},
{
"changes": {
"added_entities": ... | genadijrazdorov/algograph | 967e516a99fba43b6ce4cd4991e547739b86eef9 | Complex branches (more then one statement) not working | diff --git a/algograph/lexer.py b/algograph/lexer.py
index 9d0e50f..39fa603 100644
--- a/algograph/lexer.py
+++ b/algograph/lexer.py
@@ -64,10 +64,10 @@ class Lexer:
old, self.indent = self.indent, indent
if indent > old:
- yield INDENT(indent)
+ yield INDENT(indent - old)
... |
genericclient__genericclient-requests-14 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"genericclient/__init__.py:Endpoint.request"
],
"edited_modules": [
"genericclient/__init__.py:Endpoint"
]
},
"file": "genericclient/__init__.py"
}
] | genericclient/genericclient-requests | 8fba5f6101b7226a8a6a3e7fe8a02e22c6314cf9 | Does not handle response status code 401
When a user sends a GET request to a DRF server using invalid base authentication email/password values, a response status code of 401 is returned. The client does not raise an exception when this happens, which results in a None resource being returned. The client should raise ... | diff --git a/genericclient/__init__.py b/genericclient/__init__.py
index fc0d66a..89af323 100644
--- a/genericclient/__init__.py
+++ b/genericclient/__init__.py
@@ -24,7 +24,7 @@ class Endpoint(BaseEndpoint):
data=self.api.hydrate_data(resp),
)
- if response.status_code == 403:
+ i... |
genialis__resolwe-bio-py-264 | [
{
"changes": {
"added_entities": [
"src/resdk/tables/base.py:BaseTables.readable_index"
],
"added_modules": null,
"edited_entities": [
"src/resdk/tables/base.py:BaseTables._samples",
"src/resdk/tables/base.py:BaseTables._get_descriptors",
"src/resdk/tables... | genialis/resolwe-bio-py | 1a757ae2a8b687f1a611745ddd3061cd65921877 | CollectionTables unable to fatch metadata from large collection
During downloading of metadata from a large collection (it has 1220 samples) you get the following exception:
```
/home/robert/git/resolwe-bio-py/venv/bin/python /home/robert/git/resolwe-bio-py/foo.py
Traceback (most recent call last):
File "/home/ro... | diff --git a/src/resdk/tables/base.py b/src/resdk/tables/base.py
index aa2399c..4f9c55b 100644
--- a/src/resdk/tables/base.py
+++ b/src/resdk/tables/base.py
@@ -14,9 +14,11 @@ import abc
import asyncio
import json
import os
+import warnings
+from collections import Counter
from functools import lru_cache
from io i... |
genialis__resolwe-bio-py-91 | [
{
"changes": {
"added_entities": [
"resdk/query.py:ResolweQuery.count",
"resdk/query.py:ResolweQuery.create",
"resdk/query.py:ResolweQuery.delete"
],
"added_modules": null,
"edited_entities": [
"resdk/query.py:ResolweQuery.__len__",
"resdk/query.py... | genialis/resolwe-bio-py | 739582b58ef3573480347ac4798b5d37f848abce | Queries in new objects are not evaluated correctly
When new object is created, all queries that are included (i.e. `collection.data`, `collection.samples`,...) are constructed in a wrong way, because object's id is not yet known and filters are applied with `id=None`.
Queries shouldn't be initialized in `__init__`, ... | diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst
index e92a0b2..3aaeaef 100644
--- a/docs/CHANGELOG.rst
+++ b/docs/CHANGELOG.rst
@@ -12,11 +12,22 @@ Added
-----
* Option to set API url with ``RESOLWE_HOST_URL`` environment varaible
+Added
+-----
+* ``count``, ``delete`` and ``create`` methods to query
+* Suppor... |
geographika__mappyfile-146 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mappyfile/validator.py:Validator.get_versioned_schema",
"mappyfile/validator.py:Validator.get_expanded_schema"
],
"edited_modules": [
"mappyfile/validator.py:Validator"
... | geographika/mappyfile | 89795e05ff32da1574508c888d5fbd09c0d5d2d8 | Invalid value in COMPOSITE - 'compfilter'
COMPFILTER is missing in the COMPOSITE block
mappyfile validate layer_comp.map
layer_comp.map (Line: 124 Column: 3) ERROR: Invalid value in COMPOSITE - 'compfilter' does not match any of the regexes: '^__[a-z]+__$'
Working mapfile in: https://gist.github.com/LarsSchy/4a... | diff --git a/docs/schemas/mapfile-schema-7-6.json b/docs/schemas/mapfile-schema-7-6.json
index 3e01f5a..ce41cb3 100644
--- a/docs/schemas/mapfile-schema-7-6.json
+++ b/docs/schemas/mapfile-schema-7-6.json
@@ -2727,9 +2727,41 @@
"composite"
]
... |
geographika__mappyfile-147 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"mappyfile/ordereddict.py:DefaultOrderedDict.__missing__"
],
"edited_modules": [
"mappyfile/ordereddict.py:DefaultOrderedDict"
]
},
"file": "mappyfile/ordereddict.py"
... | geographika/mappyfile | c6923b976dbb87b325f1cdf8697ee0bb6989b180 | layers.insert fails with dict error
maybe related to python +3.6?
as suggested at https://mappyfile.readthedocs.io/en/latest/#adding-items
```
mf = mappyfile.open("./default.map")
lyrs = mf['layers']
lyrs.insert(0,mslr)
```
throws:
```
lyrs.insert(0,mslr)
AttributeError: 'CaseInsensitiveOrderedDict' object ... | diff --git a/mappyfile.pyproj b/mappyfile.pyproj
index 5655df3..91a95a6 100644
--- a/mappyfile.pyproj
+++ b/mappyfile.pyproj
@@ -12,7 +12,7 @@
<Name>mappyfile</Name>
<RootNamespace>mappyfile</RootNamespace>
<InterpreterId>MSBuild|mappyfile|$(MSBuildProjectFullPath)</InterpreterId>
- <StartupFile>tests... |
geomet__geomet-101 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geomet/esri.py:_dump_geojson_point",
"geomet/esri.py:_dump_geojson_multipoint",
"geomet/esri.py:_dump_geojson_polyline",
"geomet/esri.py:_dump_geojson_polygon"
],
"ed... | geomet/geomet | f4def96884c3c5f36fc9be98bc5e351e4aa5a3a6 | srid option for geomet.esri.dumps does not do anything
The option for defining output srid for the esrijson geometry is actively ignored
I have installed version 1.0.0
```python
import geomet.esri
from pprint import pprint
input_geojson = {'coordinates': [494252.595744681, 7066045.31914894], 'type': 'Point'}
... | diff --git a/geomet/esri.py b/geomet/esri.py
index e68772d..1000243 100644
--- a/geomet/esri.py
+++ b/geomet/esri.py
@@ -111,7 +111,8 @@ def _dump_geojson_point(obj, srid=None):
"""
coordkey = "coordinates"
coords = obj[coordkey]
- srid = _extract_geojson_srid(obj) or srid
+ if srid is None:
+ ... |
geomstats__geomstats-1353 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geomstats/geometry/base.py:VectorSpace.__init__",
"geomstats/geometry/base.py:VectorSpace.basis"
],
"edited_modules": [
"geomstats/geometry/base.py:VectorSpace"
]
}... | geomstats/geomstats | a313d8eb06025b6bb2c5a4a5100f9f16cdce197b | Metrics for positive semi-definite matrices
LogEuclidean and affine invariant metrics indicated PSD `rank_k_psd_matrices` for PSD matrices are not applicable and could not be computed (thus raising numerical errors). Euclidean is fine and Bures-Wasserstein should work (more on that in a different issue).
I'll open a... | diff --git a/geomstats/geometry/base.py b/geomstats/geometry/base.py
index 3ef8be2e1..b88c45b04 100644
--- a/geomstats/geometry/base.py
+++ b/geomstats/geometry/base.py
@@ -29,7 +29,7 @@ class VectorSpace(Manifold, abc.ABC):
kwargs["dim"] = int(gs.prod(gs.array(shape)))
super(VectorSpace, self).__... |
geomstats__geomstats-1411 | [
{
"changes": {
"added_entities": [
"geomstats/geometry/special_euclidean.py:SpecialEuclideanMatrixLieAlgebra.random_point"
],
"added_modules": null,
"edited_entities": [
"geomstats/geometry/special_euclidean.py:SpecialEuclideanMatrixLieAlgebra.__init__"
],
"ed... | geomstats/geomstats | d60d543b4f377b38fed3d74a3527921615081b9b | SpecialEuclieanMatrixLieAlgebra randompoint has doesn't generate valid point
```
from geomstats.geometry.special_euclidean import SpecialEuclideanMatrixLieAlgebra
algebra = SpecialEuclideanMatrixLieAlgebra(2)
point = algebra.random_point(2)
algebra.belongs(point)
``` | diff --git a/geomstats/geometry/special_euclidean.py b/geomstats/geometry/special_euclidean.py
index 2090419f1..32a15efca 100644
--- a/geomstats/geometry/special_euclidean.py
+++ b/geomstats/geometry/special_euclidean.py
@@ -1307,9 +1307,10 @@ class SpecialEuclideanMatrixLieAlgebra(MatrixLieAlgebra):
def __init_... |
geomstats__geomstats-1874 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geomstats/geometry/spd_matrices.py:SPDBuresWassersteinMetric.parallel_transport"
],
"edited_modules": [
"geomstats/geometry/spd_matrices.py:SPDBuresWassersteinMetric"
]
},
... | geomstats/geomstats | 78025da671ef6b07aaade669adb266a62ca1bcd0 | Bug: In-place operation in pytorch backend
### Describe the bug
In SPDBuresWassersteinMetric.parallel_transport (line 921), in-place operation happens, which is not supported by torch autograd
`partial_horizontal_velocity += Matrices.transpose(partial_horizontal_velocity)`
### Steps/Code to Reproduce
In SPDBuresWas... | diff --git a/geomstats/geometry/spd_matrices.py b/geomstats/geometry/spd_matrices.py
index f6b718b05..8e07926b0 100644
--- a/geomstats/geometry/spd_matrices.py
+++ b/geomstats/geometry/spd_matrices.py
@@ -918,7 +918,9 @@ class SPDBuresWassersteinMetric(RiemannianMetric):
horizontal_velocity = gs.matmul(inver... |
geopandas__contextily-253 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"contextily/plotting.py:add_basemap"
],
"edited_modules": [
"contextily/plotting.py:add_basemap"
]
},
"file": "contextily/plotting.py"
}
] | geopandas/contextily | 0e385414b06ac34e9edae245a2676a8168e8871f | check scaling of basemaps and axis
I noticed that the contextily basemap scales my figure axes significantly more than a geopandas object does. This is documented for my tool here: https://github.com/Deltares/dfm_tools/issues/966. Is this something that you recognize or is this even intented? I am curious to hear. If i... | diff --git a/contextily/plotting.py b/contextily/plotting.py
index bd711e3..ec14d6c 100644
--- a/contextily/plotting.py
+++ b/contextily/plotting.py
@@ -26,7 +26,7 @@ def add_basemap(
crs=None,
resampling=Resampling.bilinear,
zoom_adjust=None,
- **extra_imshow_args
+ **extra_imshow_args,
):
"... |
geopandas__dask-geopandas-101 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dask_geopandas/backends.py:_nonempty_geodataframe"
],
"edited_modules": [
"dask_geopandas/backends.py:_nonempty_geodataframe"
]
},
"file": "dask_geopandas/backends.py"
... | geopandas/dask-geopandas | bcbdfd11a74e07c675b2cb41eabaaa8c93877898 | BUG: Metadata inference issue with named geometry column
If you create dask GeoDataFrame from a geopandas gdf with geometry column name different than "geometry", calling `.geometry` in `map_partitions` raises an attribute error. With `"geometry"` name the same code is fine.
```py
import geopandas as gpd
import ... | diff --git a/dask_geopandas/backends.py b/dask_geopandas/backends.py
index 6ca0999..89b47c5 100644
--- a/dask_geopandas/backends.py
+++ b/dask_geopandas/backends.py
@@ -57,7 +57,7 @@ def _nonempty_geoseries(x, idx=None):
@meta_nonempty.register(geopandas.GeoDataFrame)
def _nonempty_geodataframe(x):
df = meta_non... |
geopandas__dask-geopandas-175 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dask_geopandas/core.py:_Frame.to_dask_dataframe"
],
"edited_modules": [
"dask_geopandas/core.py:_Frame"
]
},
"file": "dask_geopandas/core.py"
}
] | geopandas/dask-geopandas | c888f455f796455210e38f470eac652501b2223f | BUG: to_dask_dataframe method doesn't work
`dask_geopandas.GeoDataFrame.to_dask_dataframe()` method doesn't work and even cannot work as it assumes `geopandas.GeoDataFrame.to_pandas()` method that doesn't exist.
https://github.com/geopandas/dask-geopandas/blob/f18ae2c7572969b8cf331555298c83bbdf18c426/dask_geopandas/... | diff --git a/dask_geopandas/core.py b/dask_geopandas/core.py
index 60fe0e5..9cb5831 100644
--- a/dask_geopandas/core.py
+++ b/dask_geopandas/core.py
@@ -59,7 +59,7 @@ class _Frame(dd.core._Frame, OperatorMethodMixin):
def to_dask_dataframe(self):
"""Create a dask.dataframe object from a dask_geopandas o... |
geopandas__dask-geopandas-306 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"dask_geopandas/io/file.py:read_file"
],
"edited_modules": [
"dask_geopandas/io/file.py:read_file"
]
},
"file": "dask_geopandas/io/file.py"
}
] | geopandas/dask-geopandas | d84e29902b1ec43522c397f8086eebf1ec90182d | Drop distributed as a required dependency?
Continuing discussion from https://github.com/conda-forge/dask-geopandas-feedstock/pull/15#discussion_r1294298427 on whether [`distributed`](https://distributed.dask.org/en/stable/) should be a required dependency of dask-geopandas. Currently it is listed as required in setup.... | diff --git a/ci/envs/310-no-optional-deps.yaml b/ci/envs/310-no-optional-deps.yaml
index bc9d0a9..99fa647 100644
--- a/ci/envs/310-no-optional-deps.yaml
+++ b/ci/envs/310-no-optional-deps.yaml
@@ -5,7 +5,6 @@ dependencies:
# required dependencies
- python=3.10
- dask
- - distributed
- geopandas
- pyproj... |
geopandas__geopandas-1089 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.__ne__"
],
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray._binop"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "... | geopandas/geopandas | f6b835cee2020d938b667587380c842acb5a1120 | Pass keywords to colorbar construction
Hey all,
Amazing tool β thank you so much for putting it together and managing it so well.
I'm sure there is an easy fix to this, but I'm having trouble accessing the legend object from a chloropleth plot. I'd imagine ax.get_legend() should return it, but that doesn't seem to ... | diff --git a/geopandas/array.py b/geopandas/array.py
index 230d79bd..d894c9ed 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -1029,6 +1029,9 @@ class GeometryArray(ExtensionArray):
lvalues = self
rvalues = convert_values(other)
+ if len(lvalues) != len(rvalues):
+ rais... |
geopandas__geopandas-1091 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:plot_polygon_collection",
"geopandas/plotting.py:plot_linestring_collection",
"geopandas/plotting.py:plot_point_collection"
],
"edited_modules": [
... | geopandas/geopandas | fbbb16687342a24287e075fe9f89925250a44506 | cmap/norm not persisting when passed as arguments
Mentioned this briefly on gitter, but I'm having trouble with my color map and norm persisting across multiple calls to plot on version 0.4.0. xref:#730, #420.
First I set up a cmap and norm:
```python
import matplotlib as mpl
cmap = mpl.cm.viridis_r
norm = mpl.... | diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst
index 18f75385..7cbbe410 100644
--- a/doc/source/contributing.rst
+++ b/doc/source/contributing.rst
@@ -32,21 +32,25 @@ In particular, when submitting a pull request:
- Classes, methods, functions, etc. should have docstrings. The first
line ... |
geopandas__geopandas-1124 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:to_file"
],
"edited_modules": [
"geopandas/io/file.py:to_file"
]
},
"file": "geopandas/io/file.py"
},
{
"changes": {
"added_entities"... | geopandas/geopandas | b71ab0bf3a0a88151a827189dba5c97284460b5d | Writing to file doesn't respect fiona vsi schemes
Fiona supports writing to different OGR virtual filesystem schemes via the file path, e.g., `zip://`, `s3://`, etc. However, these schemes get overwritten in `gpd.to_file()`, which attempts to take the path and construct an absolute path:
https://github.com/geopandas/g... | diff --git a/geopandas/io/file.py b/geopandas/io/file.py
index 3c95102e..50f7f50c 100644
--- a/geopandas/io/file.py
+++ b/geopandas/io/file.py
@@ -1,5 +1,4 @@
from distutils.version import LooseVersion
-import os
import numpy as np
import six
@@ -120,10 +119,10 @@ def to_file(df, filename, driver="ESRI Shapefile",... |
geopandas__geopandas-1160 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:read_file"
],
"edited_modules": [
"geopandas/io/file.py:read_file"
]
},
"file": "geopandas/io/file.py"
}
] | geopandas/geopandas | 39b20b0ef268007d808844c7f67008c7180512ff | Lazy Loading Dataframes
There have been times when I wanted to use geopandas to get an idea of what was in a large file. But, it took a long time to load it in. So, I used `fiona` instead. Are there any plans (or desires) to do lazy loading of the geopandas data?
This is library I recently saw is related:
https://v... | diff --git a/doc/source/io.rst b/doc/source/io.rst
index 170262a9..a09e93c3 100644
--- a/doc/source/io.rst
+++ b/doc/source/io.rst
@@ -14,7 +14,7 @@ Reading Spatial Data
which returns a GeoDataFrame object. (This is possible because *geopandas* makes use of the great `fiona <http://fiona.readthedocs.io/en/latest/man... |
geopandas__geopandas-1173 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:plot_dataframe"
],
"edited_modules": [
"geopandas/plotting.py:plot_dataframe"
]
},
"file": "geopandas/plotting.py"
}
] | geopandas/geopandas | bbf06a753c0b8f96fc4c4e0286ec9d55062345c5 | Consistent legend colors over subplots
I am plotting two maps, each associated with a column (`c1`, `c2`), and with a legend.
I want a consistent coloring for the two maps, however, as in right map one categorical feature is missing (`feature1`), the colors change too.
Basically I am looking for a way of mapping ... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index 9076113b..169fe39d 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -448,6 +448,7 @@ def plot_dataframe(
markersize=None,
figsize=None,
legend_kwds=None,
+ categories=None,
classification_kwds=None,
missing_kwd... |
geopandas__geopandas-1225 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:_flatten_multi_geoms",
"geopandas/plotting.py:plot_polygon_collection",
"geopandas/plotting.py:plot_linestring_collection",
"geopandas/plotting.py:plot_poin... | geopandas/geopandas | 22b5a0dc23be8876a3270d0c009db5bd765fabf3 | geopandas fails to plot GeometryCollection
It looks like geometry collections are not supported by the geopandas `plot` feature. The following will generate an empty plot.
```
import shapely
import geopandas
a = shapely.geometry.LineString([(0, 0), (1, 1), (1,2), (2,2)])
b = shapely.geometry.LineString([(0, 0), (1... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index c86509aa..f915a569 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -3,45 +3,41 @@ import warnings
import numpy as np
import pandas as pd
+import geopandas
-def _flatten_multi_geoms(geoms, colors=None):
+
+def _flatten_multi_geoms(g... |
geopandas__geopandas-1228 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:infer_schema"
],
"edited_modules": [
"geopandas/io/file.py:infer_schema"
]
},
"file": "geopandas/io/file.py"
},
{
"changes": {
"added... | geopandas/geopandas | 22b5a0dc23be8876a3270d0c009db5bd765fabf3 | DOC: add explanation of using zorder to control which layers are on top
See eg https://stackoverflow.com/questions/59052898/why-are-line-plots-in-geopandas-ignoring-plot-order-when-it-comes-to-display-lay (@martinfleis was faster in answering ;))
We should add some explanation to the mapping docs on this.
| diff --git a/doc/source/mapping.rst b/doc/source/mapping.rst
index 9fa4baf8..c278db20 100644
--- a/doc/source/mapping.rst
+++ b/doc/source/mapping.rst
@@ -200,6 +200,27 @@ Before combining maps, however, remember to always ensure they share a common CR
@savefig capitals_over_countries_2.png
plt.show();
+Con... |
geopandas__geopandas-1279 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray.fillna"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
}
] | geopandas/geopandas | a0cbd5d1e79970f7bfb04fc94ebd56c00d988783 | fillna error with 0.6
When performing `fillna` with `numpy.nan` on the entire dataframe, I get this error in version 0.6:
```
~/miniconda/envs/geocube/lib/python3.6/site-packages/geopandas/array.py in fillna(self, value, method, limit)
831 elif not isinstance(value, BaseGeometry):
832 ra... | diff --git a/geopandas/array.py b/geopandas/array.py
index a7bb9cc0..61b3dc0f 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -858,18 +858,17 @@ class GeometryArray(ExtensionArray):
if method is not None:
raise NotImplementedError("fillna with a method is not yet supported")
- ... |
geopandas__geopandas-1304 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.from_features",
"geopandas/geodataframe.py:GeoDataFrame.to_parquet"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
... | geopandas/geopandas | 4a972f059c936ca71c38d3ae5c6c6a744b7bf152 | Changing a geodataframe's row order inplace should invalidate its spatial index
This bit me recently, but when a geodataframe's order of rows changes "in place", the `sindex` should be invalidated and recomputed. Here's a reproducible example:
```
import geopandas
import pandas as pd
from shapely import wkt
# cr... | diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py
index 54adb0ed..c82cba5f 100644
--- a/geopandas/geodataframe.py
+++ b/geopandas/geodataframe.py
@@ -633,7 +633,10 @@ class GeoDataFrame(GeoPandasBase, DataFrame):
"geometry": shape(feature["geometry"]) if feature["geometry"] else None
... |
geopandas__geopandas-1309 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/tools/clip.py:clip"
],
"edited_modules": [
"geopandas/tools/clip.py:clip"
]
},
"file": "geopandas/tools/clip.py"
}
] | geopandas/geopandas | 196902feeaec2acd65bec4832704a8196f4d3b0d | BUG: clip GeoSeries by non-overlapping mask raises error
Clipping GeoSeries by non-overlapping `mask` raises error as we try to return GeoDataFrame with original columns in here: https://github.com/geopandas/geopandas/blob/7350b49688f51b281f69638c8c51a448a0115fb0/geopandas/tools/clip.py#L155
In case of GeoSeries we ... | diff --git a/geopandas/tools/clip.py b/geopandas/tools/clip.py
index da022b8e..bf74e837 100644
--- a/geopandas/tools/clip.py
+++ b/geopandas/tools/clip.py
@@ -152,7 +152,11 @@ def clip(gdf, mask, keep_geom_type=False):
((box_mask[0] <= box_gdf[2]) and (box_gdf[0] <= box_mask[2]))
and ((box_mask[1] <= ... |
geopandas__geopandas-1318 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/tools/sjoin.py:sjoin"
],
"edited_modules": [
"geopandas/tools/sjoin.py:sjoin"
]
},
"file": "geopandas/tools/sjoin.py"
}
] | geopandas/geopandas | a5c14c83514767aa3449d464c9e4af922cefbd28 | BUG: sjoin fails for empty dataframe
```
import geopandas as gpd
gdf = gpd.read_file(gpd.datasets.get_path('nybb'))
gpd.sjoin(gdf, gdf.head(0))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input... | diff --git a/geopandas/tools/sjoin.py b/geopandas/tools/sjoin.py
index d7157405..0473f099 100644
--- a/geopandas/tools/sjoin.py
+++ b/geopandas/tools/sjoin.py
@@ -75,14 +75,15 @@ def sjoin(
)
# Attempt to re-use spatial indexes, otherwise generate the spatial index
- # for the longer dataframe
+ #... |
geopandas__geopandas-1336 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__getitem__"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
}
] | geopandas/geopandas | 83153dde4bd46e1d62b29bb5d7369dba0f8f2ca2 | ENH: return GeoSeries when accessing other (non "active") geometry columns
Now that that we have the geometry dtype and ExtensionArray based GeometryArray, it is more transparent to have multiple geometry columns (which was already possible before, but they were all "object")
```
In [30]: df = geopandas.read_file(g... | diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py
index 2dc663c0..617d98c6 100644
--- a/geopandas/geodataframe.py
+++ b/geopandas/geodataframe.py
@@ -6,7 +6,7 @@ from pandas import DataFrame, Series
from shapely.geometry import mapping, shape
-from geopandas.array import GeometryArray, from_shapel... |
geopandas__geopandas-1339 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.crs"
],
"added_modules": null,
"edited_entities": [
"geopandas/array.py:from_shapely",
"geopandas/array.py:from_wkb",
"geopandas/array.py:from_wkt",
"geopandas/array.py:points_fro... | geopandas/geopandas | 3562159eb897d685db45eb99a5586f7ac10fbff9 | ENH: move CRS metadata to array level (allow columns with different CRS)
Currently, the CRS (`.crs` attribute) is kept track of at the GeoDataFrame (or GeoSeries if selecting the column) level. This means it is implicitly the CRS for the "active" geometry column.
We could also look into moving the metadata to the G... | diff --git a/doc/source/projections.rst b/doc/source/projections.rst
index d6febeec..9903c041 100644
--- a/doc/source/projections.rst
+++ b/doc/source/projections.rst
@@ -98,6 +98,44 @@ Re-projecting is the process of changing the representation of locations from on
ax.set_title("Mercator");
+Projection for mu... |
geopandas__geopandas-1373 | [
{
"changes": {
"added_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__xor__",
"geopandas/geodataframe.py:GeoDataFrame.__or__",
"geopandas/geodataframe.py:GeoDataFrame.__and__",
"geopandas/geodataframe.py:GeoDataFrame.__sub__"
],
"added_modules": null,
... | geopandas/geopandas | edf6e964300afaee87e491d97b055b98fd30f373 | Failing tests for sjoin(... how='right', op='within') on pandas master
Tests for `sjoin` are failing with pandas master (https://travis-ci.org/github/geopandas/geopandas/jobs/673491281) it we do `sjoin(... how='right', op='within')`. However, it seems to me that the change in pandas is actually fix of incorrect behavio... | diff --git a/doc/source/mergingdata.rst b/doc/source/mergingdata.rst
index 3bfddeb3..7c5daf05 100644
--- a/doc/source/mergingdata.rst
+++ b/doc/source/mergingdata.rst
@@ -13,7 +13,7 @@ There are two ways to combine datasets in *geopandas* -- attribute joins and spa
In an attribute join, a ``GeoSeries`` or ``GeoDataF... |
geopandas__geopandas-1375 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__setitem__"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
}
] | geopandas/geopandas | 4061567e85ce55c24ed2a418fca6c86e8c49d3cb | BUG: CRS not propagated to array
I have found one issue caused by #1339. OSMnx [uses](https://github.com/gboeing/osmnx/blob/a4b4dc9efb8223b8aab257ff8825454d4bd06ddc/osmnx/projection.py#L71-L75) following pattern:
```py
geometry = Point(0,0) # my addition
gdf = gpd.GeoDataFrame()
gdf.crs = 4326
gdf['geometry']... | diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py
index c5c3ec8d..0fc527cf 100644
--- a/geopandas/geodataframe.py
+++ b/geopandas/geodataframe.py
@@ -6,6 +6,8 @@ import pandas as pd
from pandas import DataFrame, Series
from shapely.geometry import mapping, shape
+from shapely.geometry.base import B... |
geopandas__geopandas-1383 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:read_file"
],
"edited_modules": [
"geopandas/io/file.py:read_file"
]
},
"file": "geopandas/io/file.py"
}
] | geopandas/geopandas | 55c372e97816d133c53ac01641eb91ef8391e745 | PROPOSAL: Load subset of columns on read file
Related:
- https://gis.stackexchange.com/questions/129414/only-read-specific-attribute-columns-of-a-shapefile-with-geopandas-fiona#129422
- https://gis.stackexchange.com/questions/348064/rasterising-multiple-shapefiles-into-a-single-raster/348065#348065
- #1157
Thoug... | diff --git a/doc/source/io.rst b/doc/source/io.rst
index 4d07c8a0..304b7976 100644
--- a/doc/source/io.rst
+++ b/doc/source/io.rst
@@ -116,6 +116,31 @@ or a slice object.
rows=slice(10, 20),
)
+Field/Column Filters
+^^^^^^^^^^^^^^^^^^^^
+
+Load in a subset of fields from the file:
+
+.. note:: Requires ... |
geopandas__geopandas-1438 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/base.py:GeoPandasBase._generate_sindex"
],
"edited_modules": [
"geopandas/base.py:GeoPandasBase"
]
},
"file": "geopandas/base.py"
},
{
"changes": {
... | geopandas/geopandas | 985c6e70b7630f483ae919ba17bf67842e841efa | MAINT: unify spatial index error handling
Currently, there is no unified approach to error handling for empty spatial indexes or lack of a spatail index backend:
- sjoin does it's own check for rtree, this means you need rtree even if you have pygeos!
- overlay and clip do not do any checks, they would fail with some... | diff --git a/geopandas/base.py b/geopandas/base.py
index 6503ca70..3e971b17 100644
--- a/geopandas/base.py
+++ b/geopandas/base.py
@@ -100,6 +100,17 @@ class GeoPandasBase(object):
_sindex = sindex_cls(self.geometry)
if not _sindex.is_empty:
self._sindex = _sindex
+ ... |
geopandas__geopandas-1448 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/array.py:_isna"
],
"edited_modules": [
"geopandas/array.py:_isna"
]
},
"file": "geopandas/array.py"
}
] | geopandas/geopandas | 25f60648ab56e4f58a1629935c17c4011aee0dc9 | Handle the new pd.NA value as missing value
From https://github.com/geopandas/geopandas/pull/1154/files#r392596021, we have a custom `_isna` function to recognize missing value scalars. We should update this function to also deal with the new `pd.NA` scalar. | diff --git a/geopandas/array.py b/geopandas/array.py
index 19fd4327..4c111f12 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -55,7 +55,7 @@ if compat.PANDAS_GE_024:
def _isna(value):
"""
- Check if scalar value is NA-like (None or np.nan).
+ Check if scalar value is NA-like (None, np.nan or p... |
geopandas__geopandas-1475 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:_to_file"
],
"edited_modules": [
"geopandas/io/file.py:_to_file"
]
},
"file": "geopandas/io/file.py"
}
] | geopandas/geopandas | 0b1e2a1423fd37c96d2049546529e2a081049a7e | Warn when writing to Shapefile will change column names
I used gpd.to_file to save my geo dataframe object into a shapefile. However some of my column names have changed. Does anyone know why that occurred and how to fix that? I can rename the columns back to their original names but it would be good to know why that h... | diff --git a/doc/source/io.rst b/doc/source/io.rst
index 1316d6d2..b22b0dd6 100644
--- a/doc/source/io.rst
+++ b/doc/source/io.rst
@@ -1,24 +1,32 @@
.. _io:
Reading and Writing Files
-=========================================
-
-
+=========================
Reading Spatial Data
---------------------
-*geopanda... |
geopandas__geopandas-1478 | [
{
"changes": {
"added_entities": [
"geopandas/geoseries.py:inherit_doc",
"geopandas/geoseries.py:GeoSeries.apply"
],
"added_modules": [
"geopandas/geoseries.py:inherit_doc"
],
"edited_entities": null,
"edited_modules": [
"geopandas/geoseries.py... | geopandas/geopandas | 81fbc3cf1d6a60f4171e8ace31b1353783ad6f79 | ENH: adapt apply() to handle CRS
Following #1339 and discussion there, we should adapt `apply` to preserve CRS if it is applied on GeometryArrays. Once the CRS on GA level is merged. Currently (within the PR yet) any function applied on any other column than `geometry` drops CRS.
As discussed, it should come with th... | diff --git a/geopandas/geoseries.py b/geopandas/geoseries.py
index 52eea7c1..ba73e695 100644
--- a/geopandas/geoseries.py
+++ b/geopandas/geoseries.py
@@ -42,6 +42,24 @@ def _geoseries_constructor_with_fallback(data=None, index=None, crs=None, **kwar
return Series(data=data, index=index, **kwargs)
+def inh... |
geopandas__geopandas-1483 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:plot_dataframe"
],
"edited_modules": [
"geopandas/plotting.py:plot_dataframe"
]
},
"file": "geopandas/plotting.py"
}
] | geopandas/geopandas | caefd7562a5cfd80cc86b37796a22f4bfa3aa9d2 | Legend of GeoDataFrame does not sort categorical data values
I try to plot a map of temperature with geopandas in Google Colaboratory. This is my dataset:
```
id = '1LOywA8JPP6vOFDP-CBOBgkSmX7zv2pDc'
downloaded = drive.CreateFile({'id':id})
downloaded.GetContentFile('temp_zone.geojson')
print('The files was d... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index 169fe39d..9fef122c 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -619,44 +619,40 @@ def plot_dataframe(
"The dataframe and given column have different number of rows."
)
else:
- values ... |
geopandas__geopandas-1535 | [
{
"changes": {
"added_entities": [
"geopandas/io/file.py:_is_zip"
],
"added_modules": [
"geopandas/io/file.py:_is_zip"
],
"edited_entities": [
"geopandas/io/file.py:_read_file"
],
"edited_modules": [
"geopandas/io/file.py:_read_file"
... | geopandas/geopandas | a17c61f54a3b2ee9409fb34c484b1f0013693e11 | Improving reading from remotes and file-like objects
I'm happy to see progress in the ability to load from file-like objects in #1329. I've been interested in improving the ability for geopandas to load from file-like objects, especially those produced by [`fsspec` ](https://filesystem-spec.readthedocs.io), which shoul... | diff --git a/ci/travis/36-minimal.yaml b/ci/travis/36-minimal.yaml
index c7b37397..3533fc12 100644
--- a/ci/travis/36-minimal.yaml
+++ b/ci/travis/36-minimal.yaml
@@ -14,6 +14,7 @@ dependencies:
- pytest
- pytest-cov
- codecov
+ - fsspec
# optional
- rtree
- matplotlib
diff --git a/ci/travis/36-pd025... |
geopandas__geopandas-1560 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__init__"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
}
] | geopandas/geopandas | 11cfb783a5cd9c600b15603b4d01738fba0d948a | BUG: CRS property is not pyproj.CRS object in empty GeoDataFrame
```python
import geopandas
import pyproj
df = geopandas.geodataframe.GeoDataFrame(crs='epsg:32638')
# this does not work in versions above 0.8.0
assert type(df.crs) is pyproj.crs.crs.CRS
df.crs = 'epsg:32638'
# this works in both versions 0.8... | diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py
index de1ca272..8b2e089a 100644
--- a/geopandas/geodataframe.py
+++ b/geopandas/geodataframe.py
@@ -90,7 +90,7 @@ class GeoDataFrame(GeoPandasBase, DataFrame):
# need to set this before calling self['geometry'], because
# getitem acc... |
geopandas__geopandas-1566 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/tools/clip.py:_clip_line_poly"
],
"edited_modules": [
"geopandas/tools/clip.py:_clip_line_poly"
]
},
"file": "geopandas/tools/clip.py"
}
] | geopandas/geopandas | 0b804ea8afc9cf743643016048c65c8b07818af8 | BUG: the clip function don't take dynamically the geometry column name
Hi, today i noticed that the clip function didn't work for me but then i found which was the problem.
Import geodataframes with geometry called "WKT":
```
field_map = pd.read_csv('./field_map.csv')
field_map['WKT'] = field_map['WKT'].apply(w... | diff --git a/geopandas/tools/clip.py b/geopandas/tools/clip.py
index 8a1d6d1e..da76e0f2 100644
--- a/geopandas/tools/clip.py
+++ b/geopandas/tools/clip.py
@@ -66,7 +66,7 @@ def _clip_line_poly(gdf, poly):
# Clip the data with the polygon
if isinstance(gdf_sub, GeoDataFrame):
clipped = gdf_sub.copy()
... |
geopandas__geopandas-1583 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:plot_series",
"geopandas/plotting.py:plot_dataframe"
],
"edited_modules": [
"geopandas/plotting.py:plot_series",
"geopandas/plotting.py:plot_dat... | geopandas/geopandas | ca7c95e5c39443a63a8bd55a6de3f56a12786dfd | BUG: legend misplaced in subplots
I'm using v0.8.0. When I plot on multiple subplots and pass `legend_kwds` to `gdf.plot`, it draws all the subplot legends on the same subplot.
This works as expected:
```python
import geopandas as gpd
import matplotlib.pyplot as plt
gdf = gpd.read_file(gpd.datasets.get_path('n... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index b827e781..e82c012f 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -313,14 +313,14 @@ def plot_series(
figsize : pair of floats (default None)
Size of the resulting matplotlib.figure.Figure. If the argument
ax is g... |
geopandas__geopandas-1600 | [
{
"changes": {
"added_entities": [
"geopandas/io/file.py:_is_zip"
],
"added_modules": [
"geopandas/io/file.py:_is_zip"
],
"edited_entities": [
"geopandas/io/file.py:_read_file"
],
"edited_modules": [
"geopandas/io/file.py:_read_file"
... | geopandas/geopandas | 3867ad4cda277724bf682c4d9f97201f1caa0559 | Warning when missing_kwds provided but no areas missing data
If `df` is a GeoDataFrame which has no missing data in `column`, then if I do:
```
df.plot(column=column,
missing_kwds={'color': 'lightgrey'},
)
```
...I get:
```
geopandas/plotting.py:332: UserWarning: The GeoSeries you are attemptin... | diff --git a/ci/travis/36-minimal.yaml b/ci/travis/36-minimal.yaml
index c7b37397..3533fc12 100644
--- a/ci/travis/36-minimal.yaml
+++ b/ci/travis/36-minimal.yaml
@@ -14,6 +14,7 @@ dependencies:
- pytest
- pytest-cov
- codecov
+ - fsspec
# optional
- rtree
- matplotlib
diff --git a/ci/travis/36-pd025... |
geopandas__geopandas-1618 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/_vectorized.py:transform"
],
"edited_modules": [
"geopandas/_vectorized.py:transform"
]
},
"file": "geopandas/_vectorized.py"
}
] | geopandas/geopandas | 5616ba40a85e1a168cc8a851eeb035064dc57761 | BUG: to_crs() fails if there's None in geometry
With shapely backend, `to_crs()` fails on `None` in geometry column.
```py
import pandas as pd
import geopandas as gpd
from shapely.geometry import Point
gpd.options.use_pygeos = False
df = pd.DataFrame(
{'City': ['Buenos Aires', 'Brasilia', 'Santiago', '... | diff --git a/geopandas/_vectorized.py b/geopandas/_vectorized.py
index d31cfc9f..673cb393 100644
--- a/geopandas/_vectorized.py
+++ b/geopandas/_vectorized.py
@@ -886,6 +886,9 @@ def transform(data, func):
result = np.empty(n, dtype=object)
for i in range(n):
geom = data[i]
- r... |
geopandas__geopandas-1619 | [
{
"changes": {
"added_entities": [
"geopandas/geodataframe.py:GeoDataFrame.from_dict"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
},
{
... | geopandas/geopandas | 7a6fcbbb0bbf02cc4ae0e97d582dc30a1cfa05a0 | ENH: geopandas.GeoDataFrame.from_dict() could accept crs as parameter
Tested on version 0.8.1, the following command:
```
gpd.GeoDataFrame.from_dict(nodes, columns=["geometry"], orient="index", crs=32637)
```
Returns:
```
TypeError: from_dict() got an unexpected keyword argument 'crs'
```
Is this normal... | diff --git a/doc/source/docs/user_guide/projections.rst b/doc/source/docs/user_guide/projections.rst
index 21d4fc78..4eb15309 100644
--- a/doc/source/docs/user_guide/projections.rst
+++ b/doc/source/docs/user_guide/projections.rst
@@ -240,7 +240,7 @@ For example, instead of:
gdf.crs = "+proj=laea +lat_0=45 +lon_0... |
geopandas__geopandas-1626 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geoseries.py:GeoSeries.__new__"
],
"edited_modules": [
"geopandas/geoseries.py:GeoSeries"
]
},
"file": "geopandas/geoseries.py"
},
{
"changes": {
... | geopandas/geopandas | 0ac33b8c313603cfe5ad43551dda9daaf6928369 | Consistency of predicate argument
I have realised that with changes to sindex in 0.8.0 we have introduced inconsistency in terminology. While in `sjoin`, we have an attribute `op`, in `sindex.query` we use `predicate`. Both mean the same thing and are used for the same purpose.
Not sure what the best option would b... | diff --git a/doc/source/docs/user_guide/mergingdata.rst b/doc/source/docs/user_guide/mergingdata.rst
index 6edc2d7c..2343571f 100644
--- a/doc/source/docs/user_guide/mergingdata.rst
+++ b/doc/source/docs/user_guide/mergingdata.rst
@@ -91,24 +91,24 @@ In a Spatial Join, two geometry objects are merged based on their spa... |
geopandas__geopandas-1631 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/_vectorized.py:is_ring"
],
"edited_modules": [
"geopandas/_vectorized.py:is_ring"
]
},
"file": "geopandas/_vectorized.py"
}
] | geopandas/geopandas | cb4e8cb9873d808b0a8299ea09e3a3edaa5a8326 | BUG: GeoSeries.is_ring returns False even for all LineStrings and LinearRings
Affects both pygeos and shapely backends.
```py
import geopandas
from shapely.geometry import LineString, LinearRing
s = geopandas.GeoSeries(
[
LineString([(0, 0), (1, 1), (1, -1)]),
LineString([(0, 0), (1, 1), (1... | diff --git a/geopandas/_vectorized.py b/geopandas/_vectorized.py
index 673cb393..291a3dfc 100644
--- a/geopandas/_vectorized.py
+++ b/geopandas/_vectorized.py
@@ -474,23 +474,28 @@ def is_simple(data):
def is_ring(data):
- if compat.USE_PYGEOS:
- return pygeos.is_ring(pygeos.get_exterior_ring(data))
- ... |
geopandas__geopandas-1670 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:plot_dataframe"
],
"edited_modules": [
"geopandas/plotting.py:plot_dataframe"
]
},
"file": "geopandas/plotting.py"
}
] | geopandas/geopandas | 9fdeb1474185c8d2edaede428f57d258810d87b7 | BUG: categories passed as a series are not properly sorted
If you pass a series of categories to plot, those are used directly as an array, even though the series might have an index of a different order than df. See the example below.
```python
from shapely.geometry import Point
import pandas as pd
pts = [Poin... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index 8edd02a8..41e5fede 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -636,6 +636,10 @@ def plot_dataframe(
)
else:
values = column
+
+ # Make sure index of a Series matches index of df
+ ... |
geopandas__geopandas-1674 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/sindex.py:SpatialIndex.query"
],
"edited_modules": [
"geopandas/sindex.py:SpatialIndex"
]
},
"file": "geopandas/sindex.py"
}
] | geopandas/geopandas | 8743acfab21d8edbff68c0c27ee30af0f87cca87 | ENH: Check GeoSeries.intersects(GeoSeries) against all geometries, not only pair-wise
edit (20/03/04) by @martinfleis: _See the discussion below for the context._
<hr>
```
def merge_boundry(image_path, vector_path, clip_size):
path_img=os.path.dirname(image_path)
L=os.listdir(image_path)
for i in L:... | diff --git a/.gitignore b/.gitignore
index fa41cb46..435a84f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -73,6 +73,8 @@ doc/source/getting_started/my_file.geojson
.ruff_cache
.env
+doc/test_fiona.gpkg
+doc/test_pyogrio.gpkg
# pixi environments
.pixi
*.egg-info
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9d6... |
geopandas__geopandas-1693 | [
{
"changes": {
"added_entities": [
"benchmarks/geom_methods.py:Bench.time_explode"
],
"added_modules": null,
"edited_entities": [
"benchmarks/geom_methods.py:Bench.setup"
],
"edited_modules": [
"benchmarks/geom_methods.py:Bench"
]
},
"fil... | geopandas/geopandas | 27d07dd15aa24224c9141b2e7e851e7eb9e87319 | ENH: Faster .explode() implementation
Hi guys!
Currently the `gdf.explode()` is quite slow as it relies on a [Python loop](https://github.com/geopandas/geopandas/blob/master/geopandas/base.py#L1212).
@brendan-ward has been working on the [`get_parts()` function](https://github.com/pygeos/pygeos/pull/197) for pyg... | diff --git a/benchmarks/geom_methods.py b/benchmarks/geom_methods.py
index ab6ac612..0da8b4c4 100644
--- a/benchmarks/geom_methods.py
+++ b/benchmarks/geom_methods.py
@@ -2,7 +2,7 @@ import random
import numpy as np
from geopandas import GeoSeries
-from shapely.geometry import Point, LineString, Polygon
+from shape... |
geopandas__geopandas-1694 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:_plot_point_collection"
],
"edited_modules": [
"geopandas/plotting.py:_plot_point_collection"
]
},
"file": "geopandas/plotting.py"
}
] | geopandas/geopandas | 7a6fcbbb0bbf02cc4ae0e97d582dc30a1cfa05a0 | BUG: plotting MultiPoints with values-based coloring not working correctly
Example from the tests:
```
from shapely.affinity import rotate
from shapely.geometry import Point, MultiPoint
N = 10
points = GeoSeries(Point(i, i) for i in range(N))
multipoint1 = MultiPoint(points)
multipoint2 = rotate(multipoint1,... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index ddf6d2e7..c1765695 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -281,8 +281,7 @@ def _plot_point_collection(
raise ValueError("Can only specify one of 'values' and 'color' kwargs")
geoms, multiindex = _flatten_multi_ge... |
geopandas__geopandas-1698 | [
{
"changes": {
"added_entities": [
"geopandas/sindex.py:RTreeIndex.valid_query_predicates",
"geopandas/sindex.py:PyGEOSSTRTreeIndex.valid_query_predicates"
],
"added_modules": null,
"edited_entities": [
"geopandas/sindex.py:RTreeIndex.query"
],
"edited... | geopandas/geopandas | aa687662791863d55d3e27e8d468d9eb2eed82bd | ENH: allow all predicates in sindex.query
We have a hard-coded list of valid predicates for `sindex.query` and `query_bulk`. But pygeos now supports more of them (`contains_properly`, maybe more I did not check). Would be ideal to let pygeos/rtree to raise an error if an unsupported predicate is passed, so we don't hav... | diff --git a/geopandas/sindex.py b/geopandas/sindex.py
index e762782d..0716bc98 100644
--- a/geopandas/sindex.py
+++ b/geopandas/sindex.py
@@ -5,17 +5,6 @@ import numpy as np
from . import _compat as compat
-VALID_QUERY_PREDICATES = {
- None,
- "intersects",
- "within",
- "contains",
- "overlaps",
-... |
geopandas__geopandas-1702 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__init__",
"geopandas/geodataframe.py:GeoDataFrame.dissolve"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
... | geopandas/geopandas | 59d3b2b7260b485e95e06a38f1c3e218b0a40a46 | REGR: plot() no longer working if empty geometries are present
(unfortunately discovered while preparing my course last week .. ;))
It seems that plotting with empty geometries no longer works with 0.8, while this certainly worked before, at least for polygons (following code examples are using geopandas master):
... | diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py
index 25a62e9a..0257919f 100644
--- a/geopandas/geodataframe.py
+++ b/geopandas/geodataframe.py
@@ -84,9 +84,7 @@ class GeoDataFrame(GeoPandasBase, DataFrame):
_geometry_column_name = DEFAULT_GEO_COLUMN_NAME
- def __init__(self, *args, **kwa... |
geopandas__geopandas-1737 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.value_counts"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
},
{
"changes": {
... | geopandas/geopandas | f3d8596727eb27d5a596124a576c9cd0051bdc5b | REF: replace _mapclasssify_choro with mapclassify.classify()
Next release of mapclassify will have new high-level API allowing to call all classifiers from a single function. It replaces our custom `_mapclasssify_choro`.
See https://github.com/pysal/mapclassify/pull/90
Once it is released, we should remove our cu... | diff --git a/ci/envs/37-minimal.yaml b/ci/envs/37-minimal.yaml
index 0b6fd994..9e3e1a01 100644
--- a/ci/envs/37-minimal.yaml
+++ b/ci/envs/37-minimal.yaml
@@ -19,7 +19,7 @@ dependencies:
- rtree
- matplotlib
- matplotlib=3.1
- - mapclassify>=2.2.0
+ # - mapclassify=2.4.0 - doesn't build due to conflicts
-... |
geopandas__geopandas-1744 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_compat.py"
},
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.shift"
],
"added_modules": nul... | geopandas/geopandas | 6e8f6f91cbe0c40ca72efecaed95912beb23548d | BUG: CRS lost after GeoSeries.shift()
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of geopandas.
---
**Note**: Please read [this guide](htt... | diff --git a/.gitignore b/.gitignore
index 8eefebdf..5e9c00e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,6 +34,7 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
+result_images
# Sphinx documentation
doc/_build/
diff --git a/doc/source/docs/user_guide.rst b/doc/source/docs/user_guide.rst
index 02b0210e..1... |
geopandas__geopandas-1747 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.__getstate__",
"geopandas/array.py:GeometryArray.__setstate__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"... | geopandas/geopandas | 1ef924270e950c6e8862335c42ace8d90e5cb3db | REGR: pickling shapely-backed gdf raises TypeError
If you try to pickle geodataframe without pygeos, it raises a `TypeError`. I am not sure why since the condition in `array.py` should not use the line which errors.
```python
import geopandas
geopandas.options.use_pygeos = False
df = geopandas.read_file(geopand... | diff --git a/doc/source/docs/reference/geoseries.rst b/doc/source/docs/reference/geoseries.rst
index a1499d30..a657d21f 100644
--- a/doc/source/docs/reference/geoseries.rst
+++ b/doc/source/docs/reference/geoseries.rst
@@ -96,13 +96,14 @@ Affine transformations
GeoSeries.skew
GeoSeries.translate
-Aggregating ... |
geopandas__geopandas-1826 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_compat.py"
},
{
"changes": {
"added_entities": [
"geopandas/_vectorized.py:_shapely_normalize",
"geopandas/_vectorize... | geopandas/geopandas | efea225166a74404927e81b06a253f3d21ad2c0e | TST: failures with shapely and GEOS 3.9
CI started coming with GEOS 3.9 today which caused a lot of errors if we use shapely backend. Most of them are related to overlay, so I guess it is caused by the new `OverlayNG`, which returns slightly different geometries.
https://github.com/geopandas/geopandas/runs/185407580... | diff --git a/geopandas/_compat.py b/geopandas/_compat.py
index 138cf8ab..ac42f766 100644
--- a/geopandas/_compat.py
+++ b/geopandas/_compat.py
@@ -6,6 +6,8 @@ import warnings
import pandas as pd
import shapely
+import shapely.geos
+
# -----------------------------------------------------------------------------
... |
geopandas__geopandas-1828 | [
{
"changes": {
"added_entities": [
"geopandas/_vectorized.py:get_z"
],
"added_modules": [
"geopandas/_vectorized.py:get_z"
],
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_vectorized.py"
},
{
"changes": {
"added_e... | geopandas/geopandas | 8940d185a8198a16d4762ecdb1dfdfa965f550a0 | BUG: Plotting empty geometries generates a Type Error (shapely only)
I'm not sure if this is a bug or expected behaviour. I've tested this in geopandas 0.7 and 0.8.1.
I have a process which generates some geometry but it may fail. I use that geometry for further operations so it seems prefereable to keep the failed ... | diff --git a/doc/source/docs/reference/geoseries.rst b/doc/source/docs/reference/geoseries.rst
index 44a23fe1..2b4168ed 100644
--- a/doc/source/docs/reference/geoseries.rst
+++ b/doc/source/docs/reference/geoseries.rst
@@ -27,6 +27,7 @@ General methods and attributes
GeoSeries.interiors
GeoSeries.x
GeoSerie... |
geopandas__geopandas-1845 | [
{
"changes": {
"added_entities": [
"geopandas/geodataframe.py:GeoDataFrame.apply"
],
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.dissolve"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
... | geopandas/geopandas | 919a8f26b55b7d30c25803fc4d940f782d941a61 | ENH: Add groupby's observed kwarg to dissolve
Using `dissolve` on a `GeoDataFrame` with categorical and non-categorical columns produces unwanted results.
Consider this `DataFrame`, which currently has no categorical columns.
```
>>> df = pd.DataFrame({"cat": ['a', 'a', 'b', 'b'],
"noncat":... | diff --git a/doc/source/docs/reference/sindex.rst b/doc/source/docs/reference/sindex.rst
index ffed1c98..3201106d 100644
--- a/doc/source/docs/reference/sindex.rst
+++ b/doc/source/docs/reference/sindex.rst
@@ -18,22 +18,13 @@ Constructor
GeoSeries.sindex
-PyGEOS STRtree
---------------
-.. currentmodule:: geo... |
geopandas__geopandas-1876 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/arrow.py:_to_parquet",
"geopandas/io/arrow.py:_to_feather",
"geopandas/io/arrow.py:_read_parquet",
"geopandas/io/arrow.py:_read_feather"
],
"edited_modul... | geopandas/geopandas | 7b109ff10e88cbff8a8b06c1b866bb790d6da298 | ENH: support ~ (home dir) expansion in file paths?
From https://stackoverflow.com/questions/64423707/python-geopandas-unable-to-locate-shapefile, pandas supports passing a file path with a `~`, which gives the expectation that geopandas also supports this.
So we could consider supporting this as well.
But, we als... | diff --git a/geopandas/io/arrow.py b/geopandas/io/arrow.py
index 9d2ebdcd..9aab7c3e 100644
--- a/geopandas/io/arrow.py
+++ b/geopandas/io/arrow.py
@@ -8,7 +8,7 @@ from geopandas._compat import import_optional_dependency
from geopandas.array import from_wkb
from geopandas import GeoDataFrame
import geopandas
-
+from ... |
geopandas__geopandas-1900 | [
{
"changes": {
"added_entities": [
"geopandas/_vectorized.py:isna"
],
"added_modules": [
"geopandas/_vectorized.py:isna"
],
"edited_entities": [
"geopandas/_vectorized.py:_isna",
"geopandas/_vectorized.py:from_shapely",
"geopandas/_vectorized... | geopandas/geopandas | 37ffc35f06eae74e39ae8fa6996eceef93896d41 | BUG: duplicate column names causes wrong geojson output
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of geopandas.
---
**Note**: Please read [t... | diff --git a/doc/source/getting_started/introduction.ipynb b/doc/source/getting_started/introduction.ipynb
index 66ca3b5c..7f13eb04 100644
--- a/doc/source/getting_started/introduction.ipynb
+++ b/doc/source/getting_started/introduction.ipynb
@@ -2,23 +2,25 @@
"cells": [
{
"cell_type": "markdown",
- "metadat... |
geopandas__geopandas-2019 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:plot_dataframe"
],
"edited_modules": [
"geopandas/plotting.py:plot_dataframe"
]
},
"file": "geopandas/plotting.py"
}
] | geopandas/geopandas | abf51d3be6d0dbd56d4d5b5d288e088be0356f1f | Controlling the colors
I'm trying to match the colors of two plots I create with gpd.plot() and plot() respectively.
The problem is that geopandas change the colors according to the length of the series.
I solved the problem by setting `cmap=plt.get_cmap('Set1')` but I think we better change the default behavior.
... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index d705b911..b3b6460c 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -726,26 +726,6 @@ GON (((-122.84000 49.00000, -120.0000...
nan_idx = np.asarray(pd.isna(values), dtype="bool")
- # Define `values` as a Series
- if categor... |
geopandas__geopandas-2046 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__init__",
"geopandas/geodataframe.py:GeoDataFrame.set_geometry",
"geopandas/geodataframe.py:GeoDataFrame.__finalize__"
],
"edited_modu... | geopandas/geopandas | 8547d7fff6522a3499517d35f00c5751d2f05330 | BUG: pd.concat([..], axis=1) fails
This "works":
```
In [86]: geopandas.__version__
Out[86]: '0.5.1'
In [87]: countries = geopandas.read_file(geopandas.datasets.get_path("naturalearth_lowres"))
In [89]: cities = geopandas.read_file(geopandas.datasets.get_path("naturalearth_cities"))
In [90]: pd.concat([ci... | diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py
index bca0d2ba..e513ee68 100644
--- a/geopandas/geodataframe.py
+++ b/geopandas/geodataframe.py
@@ -118,6 +118,15 @@ class GeoDataFrame(GeoPandasBase, DataFrame):
# allowed in that case
# TODO do we want to raise / return normal DataFr... |
geopandas__geopandas-2060 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray.__setstate__"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
},
{
"changes": {
... | geopandas/geopandas | 60552cbff9ea143a7fd455834d93f462401a7a3e | BUG: Losing the geometry column should convert to a DataFrame
Branched out from the discussion in #1653
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [x] (optional) I have confirmed this bug exists on the master... | diff --git a/geopandas/array.py b/geopandas/array.py
index fd7b7fc6..bf3106a9 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -422,13 +422,16 @@ class GeometryArray(ExtensionArray):
return self.__dict__
def __setstate__(self, state):
- if compat.USE_PYGEOS:
- geoms = py... |
geopandas__geopandas-2067 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:_get_common_crs"
],
"added_modules": [
"geopandas/array.py:_get_common_crs"
],
"edited_entities": [
"geopandas/array.py:GeometryArray._concat_same_type"
],
"edited_modules": [
"geopan... | geopandas/geopandas | be7d998001a7cedc47d80879ae00d62f4f25ca16 | BUG: pd.concat(axis=0) can override crs information
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [x] (optional) I have confirmed this bug exists on the master branch of geopandas.
---
Splitting out this issue f... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1af58cc..611c0673 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,7 +28,8 @@ Deprecations and compatibility notes:
Bug fixes:
- Accessing `gdf.geometry` where the active geometry column is missing, and a column named `"geometry"` is present
will now raise an `At... |
geopandas__geopandas-2072 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/_compat.py:ignore_shapely2_warnings"
],
"edited_modules": [
"geopandas/_compat.py:ignore_shapely2_warnings"
]
},
"file": "geopandas/_compat.py"
},
{
"... | geopandas/geopandas | 4e2c8343e58ff78642e8ecedee6f70840bda7a9e | BUG: exception was ignored while fetching the attribute __array_interface__
This issue is essentially described [here](https://gis.stackexchange.com/q/402987).
In a miniconda environment on any OS using a conda-forge channel with geopandas 0.9.0, shapely 1.7.1, pygeos 0.10.1 and numpy 1.21.0, take this example `test... | diff --git a/ci/envs/37-minimal.yaml b/ci/envs/37-minimal.yaml
index 0b6fd994..9e3e1a01 100644
--- a/ci/envs/37-minimal.yaml
+++ b/ci/envs/37-minimal.yaml
@@ -19,7 +19,7 @@ dependencies:
- rtree
- matplotlib
- matplotlib=3.1
- - mapclassify>=2.2.0
+ # - mapclassify=2.4.0 - doesn't build due to conflicts
-... |
geopandas__geopandas-2103 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/tools/overlay.py:overlay"
],
"edited_modules": [
"geopandas/tools/overlay.py:overlay"
]
},
"file": "geopandas/tools/overlay.py"
}
] | geopandas/geopandas | 7b109ff10e88cbff8a8b06c1b866bb790d6da298 | REGR: performance degrading after updating from version 0.8.2 to 0.9, using the "overlay"-method
- [x] I have searched the [geopandas] tag on [StackOverflow](https://stackoverflow.com/questions/tagged/geopandas) and [GIS StackExchange](https://gis.stackexchange.com/questions/tagged/geopandas) for similar questions.
... | diff --git a/geopandas/tools/overlay.py b/geopandas/tools/overlay.py
index ef47fa1e..ca516f81 100644
--- a/geopandas/tools/overlay.py
+++ b/geopandas/tools/overlay.py
@@ -185,8 +185,8 @@ def overlay(df1, df2, how="intersection", keep_geom_type=None, make_valid=True):
1 2.0 1.0 POLYGON ((2.00000 2.0000... |
geopandas__geopandas-2138 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"benchmarks/plotting.py:Bench.setup",
"benchmarks/plotting.py:Bench.time_plot_values"
],
"edited_modules": [
"benchmarks/plotting.py:Bench"
]
},
"file": "benchma... | geopandas/geopandas | 39834890c40fc248a0c355dc4a0d5283b759c10e | API (BUG?): GeoDataFrame(gdf) constructor: preserve geometry column name?
When passing a GeoDataFrame object to the GeoDataFrame object, it currently does not preserve the geometry column name if not "geometry":
```
In [1]: df = geopandas.read_file(geopandas.datasets.get_path("naturalearth_lowres"))
In [2]: df2 ... | diff --git a/benchmarks/plotting.py b/benchmarks/plotting.py
index 3b4132eb..5731bdbd 100644
--- a/benchmarks/plotting.py
+++ b/benchmarks/plotting.py
@@ -7,44 +7,63 @@ import numpy as np
class Bench:
- param_names = ['geom_type']
- params = [('Point', 'LineString', 'Polygon', 'MultiPolygon', 'mixed')]
+ ... |
geopandas__geopandas-2143 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"benchmarks/plotting.py:Bench.setup",
"benchmarks/plotting.py:Bench.time_plot_values"
],
"edited_modules": [
"benchmarks/plotting.py:Bench"
]
},
"file": "benchma... | geopandas/geopandas | 64c5813e8b91231dfeed5268b82c2fced5cc1844 | ENH: support how="inner" in sjoin_nearest
Followup to #1865 .
We should also discuss if `"inner"` should be the default. | diff --git a/benchmarks/plotting.py b/benchmarks/plotting.py
index 3b4132eb..5731bdbd 100644
--- a/benchmarks/plotting.py
+++ b/benchmarks/plotting.py
@@ -7,44 +7,63 @@ import numpy as np
class Bench:
- param_names = ['geom_type']
- params = [('Point', 'LineString', 'Polygon', 'MultiPolygon', 'mixed')]
+ ... |
geopandas__geopandas-2144 | [
{
"changes": {
"added_entities": [
"geopandas/tools/sjoin.py:_reset_index_with_suffix",
"geopandas/tools/sjoin.py:_process_column_names_with_suffix",
"geopandas/tools/sjoin.py:_restore_index"
],
"added_modules": [
"geopandas/tools/sjoin.py:_reset_index_with_suff... | geopandas/geopandas | 3340df2a7abf8ec540408f393cae7a050f06c3e9 | Spatial join loses index names of input
Small example:
```
In [15]: countries = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
In [16]: cities = geopandas.read_file(geopandas.datasets.get_path('naturalearth_cities'))
In [17]: countries = countries.rename(columns={'name': 'country_name... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8ec1052a..b0a18651 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,9 @@ Notes on dependencies:
API changes:
- `unary_union` is now deprecated and replaced by the `union_all` method (#3007).
+- The `sjoin` method will now preserve the name of the index of the ... |
geopandas__geopandas-2150 | [
{
"changes": {
"added_entities": [
"geopandas/geodataframe.py:GeoDataFrame.sjoin_nearest",
"geopandas/geodataframe.py:GeoDataFrame.clip",
"geopandas/geodataframe.py:GeoDataFrame.overlay"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
... | geopandas/geopandas | 087858c12a68b31661da06863eee71aaea951b0e | API: expose tools as GeoDataFrame and GeoSeries methods
GeoPandas currently has a mixture of methods and functions, where some functions could be methods.
We had a discussion about this during the last dev call, concluding that it may be worth exposing existing functions as methods. Filing it here as an issue to ke... | diff --git a/doc/source/docs/reference/geodataframe.rst b/doc/source/docs/reference/geodataframe.rst
index ccfae6dc..dc49c40d 100644
--- a/doc/source/docs/reference/geodataframe.rst
+++ b/doc/source/docs/reference/geodataframe.rst
@@ -59,6 +59,24 @@ Aggregating and exploding
GeoDataFrame.dissolve
GeoDataFrame.e... |
geopandas__geopandas-2151 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.to_json"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
}
] | geopandas/geopandas | ee31fe84c1ff37ea4eef2e818d295497d5d7fc9f | ENH: include CRS in "to_json"
_Note (by @martinfleis): see the discussion below for details on the enhancement proposal._
#### Question about geopandas
gdf.to_json()
> {"type": "FeatureCollection",
> "features": [{**"id": "0500"**, "type": "Feature", **"properties": {}**, "geometry": ...}]
> }
>
gdf.t... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 93aef7b3..1dfa6a61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,7 @@ New features and improvements:
using ``engine="pyogrio"`` (#2788).
- Added a ``to_wgs84`` keyword to ``to_json`` allowing automatic re-projecting to follow
the 2016 GeoJSON specificati... |
geopandas__geopandas-2177 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/tools/overlay.py:overlay"
],
"edited_modules": [
"geopandas/tools/overlay.py:overlay"
]
},
"file": "geopandas/tools/overlay.py"
}
] | geopandas/geopandas | 220a2f75f9fca1eb9913ec21a97a6bb85311128e | BUG: 0.10 overlay fails where 0.9 succeeded
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the master branch of geopandas.
---
#### Code Sample, a copy-pasta... | diff --git a/geopandas/tools/overlay.py b/geopandas/tools/overlay.py
index 78484e35..babb67a5 100644
--- a/geopandas/tools/overlay.py
+++ b/geopandas/tools/overlay.py
@@ -343,16 +343,18 @@ def overlay(df1, df2, how="intersection", keep_geom_type=None, make_valid=True):
orig_num_geoms_exploded = exploded.... |
geopandas__geopandas-2202 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray.__setstate__"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
},
{
"changes": {
... | geopandas/geopandas | 60552cbff9ea143a7fd455834d93f462401a7a3e | ENH: Should round trip I/O of GPKG automatically use schema for non-numeric dtypes?
#### Question about geopandas
I'm surprised that writing to GPKG format, then reloading from disk, does not complete a round trip for all dtypes. This schema information is written to the file, but gpd.read_file() results in `object`... | diff --git a/doc/source/docs/user_guide/interactive_mapping.ipynb b/doc/source/docs/user_guide/interactive_mapping.ipynb
index 65944edc..58fe74dc 100644
--- a/doc/source/docs/user_guide/interactive_mapping.ipynb
+++ b/doc/source/docs/user_guide/interactive_mapping.ipynb
@@ -2,6 +2,8 @@
"cells": [
{
"cell_type"... |
geopandas__geopandas-2219 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray.__getitem__"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
}
] | geopandas/geopandas | 9a1509476a8ce2c0092ca8fae3b1c1f5bc741c67 | TST: tests with invalid values fail with pandas master
We have some recent failures coming from pandas master -
https://github.com/geopandas/geopandas/runs/4059704198?check_suite_focus=true
All seem to be related to the handling of invalid values but I guess that the fix should happen in pandas? I've got no bandwi... | diff --git a/geopandas/array.py b/geopandas/array.py
index 0532c08b..fd7b7fc6 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -363,10 +363,12 @@ class GeometryArray(ExtensionArray):
# for pandas >= 1.0, validate and convert IntegerArray/BooleanArray
# to numpy array, pass-through n... |
geopandas__geopandas-2240 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:infer_schema"
],
"edited_modules": [
"geopandas/io/file.py:infer_schema"
]
},
"file": "geopandas/io/file.py"
},
{
"changes": {
"added... | geopandas/geopandas | 753a7394c550466441f6318e5af2c10d51d52ae3 | BUG: Can't write empty GeoJSON
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [x] (optional) I have confirmed this bug exists on the master branch of geopandas.
---
**Note**: Please read [this guide](https://ma... | diff --git a/geopandas/io/file.py b/geopandas/io/file.py
index 836dc025..d524a80b 100644
--- a/geopandas/io/file.py
+++ b/geopandas/io/file.py
@@ -256,8 +256,6 @@ def _read_file(filename, bbox=None, mask=None, rows=None, **kwargs):
def read_file(*args, **kwargs):
- import warnings
-
warnings.warn(
... |
geopandas__geopandas-2281 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:plot_dataframe"
],
"edited_modules": [
"geopandas/plotting.py:plot_dataframe"
]
},
"file": "geopandas/plotting.py"
}
] | geopandas/geopandas | 8e7133aef9e6c0d2465e07e92d954e95dedd3881 | BUG: UnboundLocalError when missing_kwds is used
I'm afraid the issue isn't completely solved yet. Still (0.9.0, 0.10.2) getting the following error
<img width="709" alt="Bildschirmfoto 2021-11-01 um 18 21 00" src="https://user-images.githubusercontent.com/4449821/139724524-68bd0d0d-ad1c-405e-af3a-cb1f46155371.png... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index e17a4a3a..ba6ef8ae 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -860,7 +860,8 @@ GON (((-122.84000 49.00000, -120.0000...
**style_kwds,
)
- if missing_kwds is not None and not expl_series[nan_idx].empty:
+ ... |
geopandas__geopandas-2289 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_compat.py"
}
] | geopandas/geopandas | 831108dcb369517e311cd0ee3821db1f2fb7122d | TST: test_value_counts breaking against pandas latest
Recent CI builds on 38-dev.yaml are all failing due to geopandas/tests/test_pandas_methods.py::test_value_counts, which fails with the output:
```
______________________________ test_value_counts _______________________________
3536
[gw0] linux -- Python 3.8.12 ... | diff --git a/geopandas/_compat.py b/geopandas/_compat.py
index e5ac045d..000db2a6 100644
--- a/geopandas/_compat.py
+++ b/geopandas/_compat.py
@@ -19,6 +19,7 @@ PANDAS_GE_10 = str(pd.__version__) >= LooseVersion("1.0.0")
PANDAS_GE_11 = str(pd.__version__) >= LooseVersion("1.1.0")
PANDAS_GE_115 = str(pd.__version__) >... |
geopandas__geopandas-2296 | [
{
"changes": {
"added_entities": [
"geopandas/_vectorized.py:clip_by_rect"
],
"added_modules": [
"geopandas/_vectorized.py:clip_by_rect"
],
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_vectorized.py"
},
{
"changes": {
... | geopandas/geopandas | cb0c8b5ee4cf6da8e1fc70ffbd23e486f1919724 | BUG: GeoSeries.to_frame when name is not 'geometry' doesn't set geometry column
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [x] (optional) I have confirmed this bug exists on the master branch of geopandas.
---... | diff --git a/doc/source/docs/reference/geoseries.rst b/doc/source/docs/reference/geoseries.rst
index 0173a8cd..1965d115 100644
--- a/doc/source/docs/reference/geoseries.rst
+++ b/doc/source/docs/reference/geoseries.rst
@@ -69,6 +69,7 @@ Set-theoretic Methods
.. autosummary::
:toctree: api/
+ GeoSeries.clip_by_... |
geopandas__geopandas-2319 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.dissolve",
"geopandas/geodataframe.py:GeoDataFrame.explode"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
... | geopandas/geopandas | ae4fe4d14cb7c0c2afc3b50feda2c96cf3f2b35b | CI: 310-dev.yaml doesn't use numpy main wheel
In having a look at a CI failure I noticed that the dev environment doesn't actually use numpy main, although the yaml suggests it does.
My assumption is we intend to use numpy main and's not working, but if that's wrong, we could just update the yaml for clarity.
Looki... | diff --git a/ci/envs/310-dev.yaml b/ci/envs/310-dev.yaml
index 52575dbd..4274d679 100644
--- a/ci/envs/310-dev.yaml
+++ b/ci/envs/310-dev.yaml
@@ -26,8 +26,9 @@ dependencies:
- geopy
- mapclassify>=2.4.0
# dev versions of packages
- - --pre --extra-index https://pypi.anaconda.org/scipy-wheels-nightly/... |
geopandas__geopandas-2332 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.apply",
"geopandas/geodataframe.py:GeoDataFrame._constructor_sliced",
"geopandas/geodataframe.py:GeoDataFrame.__xor__",
"geopandas/geodataf... | geopandas/geopandas | 460d9403a0942e67b3f4f5e73aa7589febef84b3 | REGR: indexing doesn't return geometry but Series if geometry is only column
One of the recent PRs caused a regression in indexing. If there's a single column in a GeoDataFrame, indexing using `df.loc[0].geometry` returns a Series instead of a shapely geometry (as it did before).
```py
import geopandas
df = geopan... | diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py
index 0f3f780d..e8a1e51a 100644
--- a/geopandas/geodataframe.py
+++ b/geopandas/geodataframe.py
@@ -13,7 +13,7 @@ from pyproj import CRS
from geopandas.array import GeometryArray, GeometryDtype, from_shapely, to_wkb, to_wkt
from geopandas.base impor... |
geopandas__geopandas-2377 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/_config.py:Options.__repr__"
],
"edited_modules": [
"geopandas/_config.py:Options"
]
},
"file": "geopandas/_config.py"
},
{
"changes": {
"added_... | geopandas/geopandas | 51864acf3dd0bcbc74b2a922c6e012d7e57e46b5 | ENH: geopandas explore() ability to customise style_function with geojson attributes
#### Is your feature request related to a problem?
`explore()` provide **style_kwds** to pass constants to **style_function**. There is no ability to change behaviour of **style_function** to use *geojson* properties
#### Des... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0ec40998..22f14602 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,12 +1,12 @@
files: 'geopandas\/'
repos:
-- repo: https://github.com/python/black
- rev: 20.8b1
- hooks:
- - id: black
- language_version:... |
geopandas__geopandas-2479 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.apply"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
},
{
"cha... | geopandas/geopandas | 5c8ae832e030228b5deec02588c4e1b78dee0f18 | BUG: AttributeError about datetimelike values when reading file with Fiona engine
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas (on the date of issue, last version is 0.11.0).
- [ ] (optional) I have confirmed this bug... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a3dc849d..fbe54ce2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,8 @@ Deprecations and compatibility notes:
`schema_version` if `version` is one of 0.1.0 or 0.4.0 (#2496).
Bug fixes:
+- Fix a crash in datetime column reading where the file contains mixe... |
geopandas__geopandas-2482 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__init__",
"geopandas/geodataframe.py:GeoDataFrame.to_parquet",
"geopandas/geodataframe.py:GeoDataFrame.to_feather",
"geopandas/geodatafram... | geopandas/geopandas | 28462f8e7fd893e01be52f444e142a1a00c36f8e | BUG: NaN now None when calling df.apply? (0.10.2 -> 0.11)
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of geopandas.
---
y information for us to reproduce your bug.
#### Code Sample, a copy-pastable example
```python
def tes... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74a277ff..b06756af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,10 +8,28 @@ New features and improvements:
Deprecations and compatibility notes:
+- The `version` parameter for the `to_feather` and `to_parquet` methods has
+ been replaced with `schema_versio... |
geopandas__geopandas-2498 | [
{
"changes": {
"added_entities": [
"geopandas/_vectorized.py:delaunay_triangles"
],
"added_modules": [
"geopandas/_vectorized.py:delaunay_triangles"
],
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_vectorized.py"
},
{
"... | geopandas/geopandas | fed74a685f0fed3960639ab02c30737c20d6d930 | TST: assert_geodataframe_equal checks non active geometry columns twice
https://github.com/geopandas/geopandas/blob/a80081e52ed3bd069a75a4caaed44e45e35c647d/geopandas/testing.py#L318-L333
checks non active geometry columns twice. We should be able to drop all columns of geometrydtype for left2 and right2. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e712a808..8e927e45 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
New methods:
+- Added ``delaunay_triangles`` method from shapely to GeoSeries/GeoDataframe (#2907)
- Added ``concave_hull`` method from shapely to GeoSeries/GeoDataframe. (#2903)
- Added... |
geopandas__geopandas-2503 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.apply",
"geopandas/geodataframe.py:GeoDataFrame.explode"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},... | geopandas/geopandas | 5c8ae832e030228b5deec02588c4e1b78dee0f18 | GeoDataFrame explode with non-default active geometry name
I'm running into an issue when calling explode on a geodataframe with an active geometry named something other than "geometry". After looking through the source code, this seems to be because the active geometry is renamed to "geometry"; however, `_geometry_col... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a3dc849d..45c904fd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,19 +8,32 @@ New features and improvements:
Deprecations and compatibility notes:
-- The `version` parameter for the `to_feather` and `to_parquet` methods has
+- The `version` parameter for the `to... |
geopandas__geopandas-2505 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:_read_file_fiona"
],
"edited_modules": [
"geopandas/io/file.py:_read_file_fiona"
]
},
"file": "geopandas/io/file.py"
}
] | geopandas/geopandas | 1a92db9e9d28daf76e20a27beae25d68af6276ec | BUG: OutOfBoundsDatetime on read of faulty datetimes
- [x ] I have checked that this issue has not already been reported.
- [ x] I have confirmed this bug exists on the latest version of geopandas.
- [x ] (optional) I have confirmed this bug exists on the main branch of geopandas.
---
#### Code Sample, a co... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4d543f3f..2fd3f56a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,8 @@ Small bug-fix release:
casted to GeometryDtype (#2482).
- Fix a crash in datetime column reading where the file contains mixed timezone
offsets (#2479). These will be read as UTC loca... |
geopandas__geopandas-2542 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray._fill",
"geopandas/array.py:GeometryArray.fillna"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopa... | geopandas/geopandas | 8cc02950ac251ed516d9bf66bf5186b12f8e9834 | ENH: `(GeometryArray|GeoSeries).fillna`'s `value` supports array-like type input
#### Is your feature request related to a problem?
pandas's `fillna` has a feature, we could do `fillna` to a Series with another Series.
```python
>>> df = pd.DataFrame({'a': [1, 2], 'b': [1, None]})
>>> df['b'].fillna(df['a'])
0... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 582dabee..90e028b3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ New features and improvements:
of the GeoParquet specification (geoparquet.org) (#2663).
- New ``hilbert_distance()`` method that calculates the distance along a Hilbert curve
for each g... |
geopandas__geopandas-2575 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
}
] | geopandas/geopandas | 581d2599f274b167289712c2b3126250ebb2bb16 | BUG: behaviour of `gdf.geometry` is inconsistent when `"geometry"` is not the active geometry column name
While looking at the above example, I was also wondering, if the geom2 and geometry names are switched (geom2 is active) and then drop geom2, should `.geometry` then raise the error? Currently we then retur... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index adfde9c5..895ea770 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ New features and improvements:
Deprecations and compatibility notes:
Bug fixes:
+- Accessing `gdf.geometry` where the active geometry column is missing, and a column named `"geometry"` is... |
geopandas__geopandas-2595 | [
{
"changes": {
"added_entities": [
"geopandas/_vectorized.py:make_valid"
],
"added_modules": [
"geopandas/_vectorized.py:make_valid"
],
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_vectorized.py"
},
{
"changes": {
... | geopandas/geopandas | be7d998001a7cedc47d80879ae00d62f4f25ca16 | BUG: Clipping with empty shape produces cryptic error
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
---
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detail... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1af58cc..8977f083 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ for more details.
New features and improvements:
- Added ``normalize()`` method from shapely to GeoSeries/GeoDataframe (#2537)
+- Added ``make_valid()`` method from shapely to GeoSeries/G... |
geopandas__geopandas-2619 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__setitem__",
"geopandas/geodataframe.py:GeoDataFrame.apply"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
... | geopandas/geopandas | 35463adda663dfa57c9809865ebbb15448823278 | ENH: Improve error message for attempting to write multiple geometry columns using `to_file`
xref #2565
```python
In [16]: gdf = gpd.GeoDataFrame({"a":[1,2]}, geometry=[Point(1,1), Point(1,2)])
In [17]: gdf['geom2'] = gdf.geometry
In [18]: gdf.to_file("tmp.gpkg")
-----------------------------------
File ...... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8bf10b95..14041dff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,9 +16,12 @@ New features and improvements:
- Added ``exclusive`` parameter to ``sjoin_nearest`` method for Shapely >= 2.0 (#2877)
Bug fixes:
+- Fix ambiguous error when GeoDataFrame is initialised w... |
geopandas__geopandas-2641 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/_vectorized.py:transform"
],
"edited_modules": [
"geopandas/_vectorized.py:transform"
]
},
"file": "geopandas/_vectorized.py"
}
] | geopandas/geopandas | 5ee690dc708d1784c1ac38100ba002a242f94915 | Reprojection: loss of elevation when using pygeos
With https://github.com/geopandas/geopandas/commit/5d1181af6bcca88351d84bb63fc0fbe0e32ce055 and pygeos support enabled, to_crs() transforms all geometries to 2-dimensions.
_vectorized.transform uses pygeos.get_coordinates, and the documentation mentions: Three-dimen... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd6ede1d..f56072dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,11 @@
## Development version
+Bug fixes:
+
+- Correctly handle geometries with Z dimension in ``to_crs()`` when using PyGEOS or
+ Shapely >= 2.0 (previously the z coordinates were lost) (#1345... |
geopandas__geopandas-2658 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/explore.py:_explore"
],
"edited_modules": [
"geopandas/explore.py:_explore"
]
},
"file": "geopandas/explore.py"
}
] | geopandas/geopandas | 20527da2b277ec2051a12d2de0c53ccbb7ee61b0 | Escape special characters to avoid TemplateSyntaxError in explore
The following code has the error `TemplateSyntaxError: expected token ':', got 'a'BUG:`,
```python
import pandas as pd
import geopandas as gpd
data = [{"tweet":"I didnΓΒ’Γ’β¬ÒβΒ’t want to do it. but I did it anyway. I looked at the Town Halls. {{{what... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 04eef7b5..d3b37828 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ Bug fixes:
- Ensure that GeoDataFrame created from DataFrame is a copy, not a view (#2667)
- Fix mismatch between geometries and colors in ``plot()`` if an empty or missing
geometry is p... |
geopandas__geopandas-2680 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_compat.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/_vect... | geopandas/geopandas | 14c7a483432d6a93e13c625df352dec49e931981 | BUG: pd.concat crs warning when geometry column is missing from one of the arguments
@martinfleis thanks for the quick reply, it took me a while but I think I found the problem, it's not directly related I guess but it comes from my use of ``sjoin_nearest`` with saved geometries.
The shortest MWE I could come up wit... | diff --git a/ci/envs/39-pd12-conda-forge.yaml b/ci/envs/39-pd12-conda-forge.yaml
index fc675bf9..73b62ec4 100644
--- a/ci/envs/39-pd12-conda-forge.yaml
+++ b/ci/envs/39-pd12-conda-forge.yaml
@@ -5,6 +5,7 @@ dependencies:
- python=3.9
# required
- pandas=1.2
+ - numpy=1.20 # released 1 month after pandas 1.2
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.