Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
Member Avatar for mbh1992

Need help with the following code, The error comes at line 20. import ogr import os, shutil,sys import osr regionShp = "ne_50m_geography_regions_polys.shp" regionFile = ogr.Open(regionShp) regionLayer = regionFile.GetLayer(0) spatRef = regionLayer.GetSpatialRef() countryShp = "ne_50m_admin_0_countries.shp" countryFile = ogr.Open(countryShp) countryLayer = countryFile.GetLayer(0) dstDir = "spatial_analysis_2" if os.path.exists(dstDef): shutil.rmtree(dstDir) os.mddir(dstDir) dstPath = os.path.join(dstDir, …

Member Avatar for ZZucker
0
187
Member Avatar for mbh1992

Trying to write a code that finds out if a random latitude is north of a list of cities. I have the latitudes of the cities as was thinking to use them as the random latitudes. I know this code is wrong, it was the way I could get it …

Member Avatar for richieking
0
136
Member Avatar for mbh1992

#import libraries import random # #create empty list places = [] i = 0 # open file handle myfile = open ('places.csv') # Subsquentially read lines for line in myfile: row = line.strip().split(',') # first line of test if if i == 0: fields = row i = 1 else …

Member Avatar for mbh1992
0
825