Forum

Author Topic: Export Points in 1.6 with different output Coord System  (Read 2371 times)

benton

  • Newbie
  • *
  • Posts: 29
    • View Profile
Export Points in 1.6 with different output Coord System
« on: February 05, 2020, 07:53:04 AM »
Hello

Metashape Version 1.6

I have a script that I ran in 1.5 but has stopped working.

The problem is related to projection.

Previously I had the following;

Code: [Select]
v_projection=Metashape.CoordinateSystem('EPSG::28350')
and when I wanted to export a component of my project I could do this;

Code: [Select]
chunk.exportRaster(output_path +'/DEM/'+ project_name + "_DEM_EPSG" + v_to_epsg + "_ver_" + version + ".tif",image_format=Metashape.ImageFormatTIFF, [b]projection=v_projection[/b], source_data=Metashape.ElevationData)
or

Code: [Select]
chunk.exportPoints(output_path + "/RGB_POINT_CLOUD/input.laz", [b]projection=v_projection[/b], source_data=Metashape.DenseCloudData, format=Metashape.PointsFormatLAZ)
But it no longer works.

I was advised to look at an example at
https://www.agisoft.com/forum/index.php?topic=11767.msg52733#msg52733

But I donot know how to apply the EPSG to the example;

Code: [Select]
projection = Metashape.OrthoProjection()
projection.type = Metashape.OrthoProjection.Type.Planar
#projection.matrix = proj #the matrix that is calculated based on markers
projection=Metashape.CoordinateSystem('EPSG::28350')

Previous Version
Code: [Select]
exportPoints(path[, source ], binary=True, precision=6, normals=True, colors=True,
raster_transform=RasterTransformNone, colors_rgb_8bit=True[, comment ][,
format ][, image_format ][, projection][, shift ][, region ][, blockw ][, blockh ][,
classes ][, progress ])

Current Version 1.6
Code: [Select]
exportPoints(path=’‘, source_data=DenseCloudData, binary=True, save_normals=True,
save_colors=True, save_classes=True, save_confidence=True,
raster_transform=RasterTransformNone, colors_rgb_8bit=True, comment=’‘,
save_comment=True, format=PointsFormatNone, image_
format=ImageFormatJPEG[, crs ][, shift ][, region ], block_width=1000,
block_height=1000, split_in_blocks=False[, classes ], save_images=False[, viewpoint
], subdivide_task=True[, progress ])
Regards
Ben
« Last Edit: February 05, 2020, 08:02:39 AM by benton »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Export Points in 1.6 with different output Coord System
« Reply #1 on: February 05, 2020, 07:09:27 PM »
Hello Ben,

can you please try the following:
Code: [Select]
v_projection=Metashape.CoordinateSystem('EPSG::28350')
projection = Metashape.OrthoProjection()
projection.crs=v_projection

chunk.exportRaster(..., projection = projection, ...)
chunk.exportPoints(..., crs = v_projection, ...)
Best regards,
Alexey Pasumansky,
Agisoft LLC

benton

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Export Points in 1.6 with different output Coord System
« Reply #2 on: February 10, 2020, 05:59:44 AM »
Hi Alexey,

Problem solved.

Thank You
Ben