GeospatialPython / pyshp

This library reads and writes ESRI Shapefiles in pure Python.
MIT License
1.09k stars 259 forks source link

Expected a three-dimensional coordinate (x,y,z) but only got the first two (x,y). #236

Closed haobo-autra closed 2 years ago

haobo-autra commented 2 years ago

Hey,here is my shpfile data in json format. image But in my teminal I can only get the (x,y) coordinate image Here is my usage. image Is there any one can tell me why, what's wrong with the code. Thanks.

haobo-autra commented 2 years ago

Oh, I got it. I can use shape(0).z to get the z coordinate! image

karimbahgat commented 2 years ago

Glad you were able to find the solution. Documentation for handling 3d and elevation shapefiles can be found in the readme: https://github.com/GeospatialPython/pyshp#3d-and-other-geometry-types. I hope to add more useful 3d examples in the future.

haobo-autra commented 2 years ago

Thanks for your patient explanation!
I get it.