16
Feature Requests / Re: Show progress in taskbar
« on: April 28, 2017, 03:52:28 PM »
+1 !
Very convenient when multitasking indeed.
Very convenient when multitasking indeed.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
box_x = chunk.region.size.x
box_y = chunk.region.size.y
box_z = chunk.region.size.z
for chunk in doc.chunks
region = chunk.region
box_x = chunk.region.size.x
box_y = chunk.region.size.y
box_z = chunk.region.size.z
Box_surf = box_x * box_y
while Box_surf < 500: #m²
region.size = 1.1 * region.size
chunk.region = region
box_x = chunk.region.size.x
box_y = chunk.region.size.y
box_z = chunk.region.size.z
Box_surf = box_x * box_y
# Densify
# Mesh etc.
for chunk in doc.chunks:
Delete all layers but one based on layer labels
Export layer
Reopen project
Export next layer the same way
Loop through chunks
import os, PhotoScan
doc = PhotoScan.app.document
chunk = doc.chunk
shapes = chunk.shapes
path = "C:\\PFE_CAPRA\\Essais_Shapes\\Shapes"
for chunk in doc.chunks:
for layer in chunk.shapes.groups:
chunk.exportShapes(path, groups = layer)
Code: [Select]for layer in chunk.shapes.layers:
chunk.exportShapes(path, groups = layer)
import os, PhotoScan
doc = PhotoScan.app.document
chunk = doc.chunk
shapes = chunk.shapes
source = shapes.crs
out = PhotoScan.CoordinateSystem("EPSG::3948")
type_chunk = ['Green']
for chunk in doc.chunks:
if not any(type_chunk[0] in chunk.label for type_chunk in type_chunk):
for shape in chunk.shapes:
shape.vertices = [PhotoScan.CoordinateSystem.transform(v, source, out) for v in shape.vertices]
shapes.crs = out
print("""Les SHP de """ + chunk.label + """ ont été transformées avec succès !""")
for chunk in doc.chunks:
for shape in chunk.shapes:
if not any(type_chunk[0] in chunk.label for type_chunk in type_chunk):
chunk.exportShapes(path = "C:\\PFE_CAPRA\\Essais_Shapes\\Green.shp", groups = ShapeGroup(key = 1))
chunk.exportShapes(path = "C:\\PFE_CAPRA\\Essais_Shapes\\Approche.shp", groups = ShapeGroup(key = 2))
PhotoScan.Shapes.crs.transform(EPSG::4326, EPSG::3948)
PhotoScan.Shapes.crs.update