scipy2018-geospatial-data icon indicating copy to clipboard operation
scipy2018-geospatial-data copied to clipboard

Why my geometry has nothing to plot

Open xigrug opened this issue 5 years ago • 4 comments

I have download the scipy2018-geospatial-data-master/scipy2018-geospatial-data-master/08-clustering.ipynb

but thre is something wrong, POLYGON ((inf ...inf): district = gpd.read_file('./data/berlin-districts.geojson').to_crs(epsg=3857) district.head(10)

district	district_group	median_price	geometry
0	Blankenfelde/Niederschönhausen	Pankow	37.5	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
1	Helmholtzplatz	Pankow	58.0	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
2	Wiesbadener Straße	Charlottenburg-Wilm.	50.0	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
3	Schmöckwitz/Karolinenhof/Rauchfangswerder	Treptow - Köpenick	99.0	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
4	Müggelheim	Treptow - Köpenick	25.0	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
5	Biesdorf	Marzahn - Hellersdorf	35.0	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
6	Nord 1	Reinickendorf	31.0	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
7	West 5	Reinickendorf	50.0	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
8	Frankfurter Allee Nord	Friedrichshain-Kreuzberg	42.0	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...
9	Buch	Pankow	57.5	(POLYGON ((inf inf, inf inf, inf inf, inf inf,...

and the plot is nothing

xigrug avatar Mar 18 '19 03:03 xigrug

What version of geopandas and fiona are you using?

jorisvandenbossche avatar Mar 18 '19 08:03 jorisvandenbossche

geopandas 0.4.1 py_0 conda-forge geopandas-osm 0.0.1 pypi_0 pypi

fiona 1.8.4 py36h1c6dbfb_1002 conda-forge python 3.6.7 hd21baee_1002 conda-forge

At 2019-03-18 16:14:09, "Joris Van den Bossche" [email protected] wrote:

What version of geopandas and fiona are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

xigrug avatar Mar 18 '19 08:03 xigrug

Hmm, with exactly the same versions (on linux), I see:

In [4]: geopandas.read_file("scipy2018-geospatial-data/data/berlin-districts.geojson").to_crs(epsg=3857).head()                                                                                                     
Out[4]: 
                                    district        district_group  median_price                                           geometry
0             Blankenfelde/Niederschönhausen                Pankow          37.5  (POLYGON ((1493006.880445722 6912074.798336806...
1                             Helmholtzplatz                Pankow          58.0  (POLYGON ((1493245.549433984 6900059.69597819,...
2                         Wiesbadener Straße  Charlottenburg-Wilm.          50.0  (POLYGON ((1481381.45206371 6885170.697768607,...
3  Schmöckwitz/Karolinenhof/Rauchfangswerder    Treptow - Köpenick          99.0  (POLYGON ((1526159.828554794 6872101.043604896...
4                                 Müggelheim    Treptow - Köpenick          25.0  (POLYGON ((1529265.085750472 6874326.842288786...

What version of pyproj do you have? (I have 1.9.6)

jorisvandenbossche avatar Mar 18 '19 15:03 jorisvandenbossche

It works on linux, but not for win10. Both with the same versions (pyproj is 1.9.6)

在 2019-03-18 23:59:37,"Joris Van den Bossche" [email protected] 写道:

Hmm, with exactly the same versions (on linux), I see:

In [4]: geopandas.read_file("scipy2018-geospatial-data/data/berlin-districts.geojson").to_crs(epsg=3857).head()

Out[4]:

                                district        district_group  median_price                                           geometry

0 Blankenfelde/Niederschönhausen Pankow 37.5 (POLYGON ((1493006.880445722 6912074.798336806...

1 Helmholtzplatz Pankow 58.0 (POLYGON ((1493245.549433984 6900059.69597819,...

2 Wiesbadener Straße Charlottenburg-Wilm. 50.0 (POLYGON ((1481381.45206371 6885170.697768607,...

3 Schmöckwitz/Karolinenhof/Rauchfangswerder Treptow - Köpenick 99.0 (POLYGON ((1526159.828554794 6872101.043604896...

4 Müggelheim Treptow - Köpenick 25.0 (POLYGON ((1529265.085750472 6874326.842288786...

What version of pyproj do you have? (I have 1.9.6)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

xigrug avatar Mar 19 '19 00:03 xigrug