Question
Given the following data structure for different vector feature types, complete the tasks below. #MultiPoint pts = [(3,4), (8,2), (6,5), (3,9), (7,15)] #MultiLine lines =
Given the following data structure for different vector feature types, complete the tasks below.
#MultiPoint pts = [(3,4), (8,2), (6,5), (3,9), (7,15)]
#MultiLine lines = [[(1,1), (4,5), (1,6)], [(8,2), (2,8)], [(1,3), (5,3), (8,3)]]
#Polygon poly = [[(2,1), (4,1), (3,3), (2,1)]]
#Polygon with holes poly2 = [[(8,1), (5,1), (5,4), (8,4), (8,1)], [(6,2), (7,2), (7,3), (6,2)]]
#MultiPolygon polys = [poly, poly2]
Write a command using python language to extract the main ring from each polygon in polys, and write these main rings to a new Multipolygon structure (that is, remove any holes) as a new variable called newpolys
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started