testShape.py 525 B

12345678910111213
  1. from shapely.geometry import shape
  2. from shapely import wkt
  3. polygon1 = wkt.loads(
  4. 'POLYGON((119.757825964 29.994700644,119.757759991 29.994631079,119.757664084 29.994699986,119.757689324 29.994726602,119.757730057 29.994769558,119.757768634 29.994741839,119.757825964 29.994700644))')
  5. print(polygon1)
  6. shapely_polygon = shape(polygon1)
  7. print(shapely_polygon, type(shapely_polygon))
  8. print(isinstance(polygon1, type(shapely_polygon)))
  9. print(isinstance(polygon1, type(polygon1)))
  10. print(polygon1.wkt)
  11. import geopandas as gpd