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