Work with shp data in Python

pip install pyshp
import shapefilepath_shp_file = 'LineFeature.shp'path_sf = shapefile.Reader(path_shp_file)
shp = path_sf.shapes()[0]points = shp.pointsprint(points)
[(27.01890117981722, 53.323636127351705), (27.018302950803267, 53.3234231966127),
import numpy as npimport matplotlib.pyplot as plt
x = [p[0] for p in points]y = [p[1] for p in points]plt.scatter(x, y)plt.plot(x, y)




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Stories without structure

Extracting the most frequently occurring words from a wikipedia entry

Liverpool vs FC Midtjylland — (LIVE) UEFA Champions League 2020 [Streamning]® Full Match

Recommendation System for Cookbooks

Covid prevalence post-vaccinations

How to monitor data quality — a detailed guide

Genetic Algorithms: A survey

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Privalov Vladimir

Privalov Vladimir

More from Medium

How to create random data to csv file using Python

Saving Time with Python and Tableau

Searching Text in Multiple Files in Python

Loading CSV Contents in IBM Cloud Object Storage into Pandas DataFrames using Python