iI have created two different point shapefiles which represent towns within a state.however i However I want to know the distance between both towns, but first iI want to draw a line between them. isIs this possible or should i mergedI merge both shapefiles together first.?
iI was trying to merge the point shapefiesshapefiles together as one but iI experienced an error.
TypeError: list indices must be integers or slices, not str
TypeError: list indices must be integers or slices, not str
vicksent = ".vick.shp"
towncent= ".town.shp"
from shapely.geometry import MultiPoint, point, shape, mapping
schema = {'geometry': 'Point',
'properties': {}, }
with fiona.open('mew.shp', 'w', 'ESRI Shapefile', schema, crs=from_epsg(29900)) as output:
prop = {}
centriod1= vicksent
centriod2 = towncent
output.write([centriod1,{'geometry': point, 'properties': prop}])
output.write([centriod2, {'geometry': point, 'properties': prop}])