type error in doc #3021
Replies: 5 comments 1 reply
-
No, I don't think it's a type of error. It means exactly what it means. eg: from shapely.geometry import Point, Polygon
p1 = Point(1, 2)
p2 = Polygon(((1,2),(2,2),(2,1),(1,2)))
ds = gpd.GeoSeries([p1, p2])
df.plot()
plt.show()
df.to_file('output.shp') A GeoSerie contains a point and a polygon can be created successfully, can be plotted successfully, but can't be exported to a shapefile. Can be exported to some other formats, but it depends. |
Beta Was this translation helpful? Give feedback.
-
@gepcel is right that we do allow multiple geometry types but @DevEatSleep is right that the sentence is not really English. It should be "Note that all entries in a GeoSeries do not need to be of the same geometric type..." If anyone wants to open a PR with a fix, I'll be happy to merge it. |
Beta Was this translation helpful? Give feedback.
-
Haha, I don't know English well enough to tell the difference between "need not to be" and "do not need to be". Sorry. |
Beta Was this translation helpful? Give feedback.
-
Just wanted to add my two cents, but don't have an opinion on whether this
gets changed either way.
"need not be" is a bit of an old or maybe fancy way of saying "does not
need to be," but it is in fact a correct way of saying it.
…On Wed, Sep 20, 2023, 10:19 WANG Aiyong ***@***.***> wrote:
is not really English.
Haha, I don't know English well enough to tell the difference between
"need not to be" and "do not need to be". Sorry.
—
Reply to this email directly, view it on GitHub
<#3021 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQVPBALI35VTAOJIE3IWZTX3L3QRANCNFSM6AAAAAA473URBY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Fixed in #3022 |
Beta Was this translation helpful? Give feedback.
-
In the file https://geopandas.org/en/stable/docs/user_guide/data_structures.html , i think that the sentence "Note that all entries in a GeoSeries need not be of the same geometric type, although certain export operations will fail if this is not the case." is wrong.
It is not "need not be" (which means nothing) but "need to be".
Beta Was this translation helpful? Give feedback.
All reactions