update
This commit is contained in:
@ -315,7 +315,7 @@ def getMappingforModel(tbl, shp):
|
||||
def get_file_path(instance, filename):
|
||||
ext = filename.split('.')[-1]
|
||||
filename = "%s.%s" % (uuid.uuid4(), ext)
|
||||
return os.path.join('uploads/logos', filename)
|
||||
return os.path.join('uploads/geoms', filename)
|
||||
|
||||
|
||||
class ShapeLayers(models.Model):
|
||||
@ -371,6 +371,7 @@ def publish_date(sender, instance, created, **kwargs):
|
||||
|
||||
try:
|
||||
shp = glob.glob(r'{}/**/*.shp'.format(file_path), recursive=True)[0]
|
||||
print(shp)
|
||||
gdf = gpd.read_file(shp)
|
||||
crs_name = str(gdf.crs.srs)
|
||||
print(crs_name, 'crs - name')
|
||||
|
||||
Reference in New Issue
Block a user