Skip to main content
title case; English usage; tyop
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

errors Errors relating to merging point shapefiles

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}])

errors relating to merging point shapefiles

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 merged both shapefiles together first.

i was trying to merge the point shapefies 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}])

Errors relating to merging point shapefiles

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}])
edited title
Link
rachel
  • 153
  • 1
  • 3
  • 10

errors relatiingrelating to merging point shapefiles

Source Link
rachel
  • 153
  • 1
  • 3
  • 10

errors relatiing to merging point shapefiles

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 merged both shapefiles together first.

i was trying to merge the point shapefies 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}])