I have created two different point shapefiles which represent towns within a state. However I want to know the distance between both towns, but first I want to draw a line between them. Is this possible or should I merge both shapefiles together first?
I was trying to merge the point shapefiles together as one but I experienced an error.
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}])