Forum

Author Topic: Build DEM with planar top XY  (Read 2933 times)

ankit.chaurasia

  • Newbie
  • *
  • Posts: 8
    • View Profile
Build DEM with planar top XY
« on: August 25, 2017, 02:17:28 PM »
Hi,

I am trying to build DEM for images and marker file has been added in local coordinate system i.e EPSG::9001

I have to build DEM in planar topXY. I tried using Alexey Pasumansky code with modification for version Photoscan 1.3.2.
link to forum post: http://www.agisoft.com/forum/index.php?topic=1322.msg15758#msg15758
For DEM:

Code: [Select]
if not chunk.transform:
chunk.transform = PhotoScan.Matrix ([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])

proj = PhotoScan.Matrix ([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])  #Top XY

chunk.buildDem(source=PhotoScan.DenseCloudData , interpolation=EnabledInterpolation,projection=proj)

But i am getting this error:
Code: [Select]
TypeError: argument 3 must be PhotoScan.CoordinateSystem, not PhotoScan.Matrix
But documentation for photoscan api says:
Quote
buildDem(source=DenseCloudData, interpolation=EnabledInterpolation [ , projection ][ , region ][ ,
classes ][ , progress ] )
Build elevation model for the chunk.
Parameters
• source (PhotoScan.DataSource) – Selects between dense point cloud and sparse
point cloud. If not specified, uses dense cloud if available.
• interpolation (PhotoScan.Interpolation) – Interpolation mode.
• projection (Matrix or CoordinateSystem) – Sets output projection.
• region (tuple of 4 floats) – Region to be exported in the (x0, y0, x1, y1) for-
mat.
• classes (list of PhotoScan.PointClass) – List of dense point classes to be used
for surface extraction.
• progress (Callable[[float], None]) – Progress callback.

Please do help me with this.
« Last Edit: August 25, 2017, 02:23:07 PM by ankit.chaurasia »

ankit.chaurasia

  • Newbie
  • *
  • Posts: 8
    • View Profile
Build DEM with planar top XY
« Reply #1 on: August 25, 2017, 02:21:32 PM »
Hi,

I am trying to build DEM for images and marker file has been added in local coordinate system i.e EPSG::9001

I have to build DEM in planar topXY. I tried using Alexey Pasumansky code with modification for version Photoscan 1.3.2.
link to forum post: http://www.agisoft.com/forum/index.php?topic=1322.msg15758#msg15758
For DEM:

Code: [Select]
if not chunk.transform:
chunk.transform = PhotoScan.Matrix ([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])

proj = PhotoScan.Matrix ([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])  #Top XY

chunk.buildDem(source=PhotoScan.DenseCloudData , interpolation=EnabledInterpolation,projection=proj)

But i am getting this error:
Code: [Select]
TypeError: argument 3 must be PhotoScan.CoordinateSystem, not PhotoScan.Matrix
But documentation for photoscan api says:
Quote
buildDem(source=DenseCloudData, interpolation=EnabledInterpolation [ , projection ][ , region ][ ,
classes ][ , progress ] )
Build elevation model for the chunk.
Parameters
• source (PhotoScan.DataSource) – Selects between dense point cloud and sparse
point cloud. If not specified, uses dense cloud if available.
• interpolation (PhotoScan.Interpolation) – Interpolation mode.
• projection (Matrix or CoordinateSystem) – Sets output projection.
• region (tuple of 4 floats) – Region to be exported in the (x0, y0, x1, y1) for-
mat.
• classes (list of PhotoScan.PointClass) – List of dense point classes to be used
for surface extraction.
• progress (Callable[[float], None]) – Progress callback.

Please do help me with this.

ankit.chaurasia

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Build DEM with planar top XY
« Reply #2 on: August 25, 2017, 02:22:46 PM »
Hi,

I am trying to build DEM for images and marker file has been added in local coordinate system i.e EPSG::9001

I have to build DEM in planar topXY. I tried using Alexey Pasumansky code with modification for version Photoscan 1.3.2.
link to forum post: http://www.agisoft.com/forum/index.php?topic=1322.msg15758#msg15758
For DEM:

Code: [Select]
if not chunk.transform:
chunk.transform = PhotoScan.Matrix ([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])

proj = PhotoScan.Matrix ([[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]])  #Top XY

chunk.buildDem(source=PhotoScan.DenseCloudData , interpolation=EnabledInterpolation,projection=proj)

But i am getting this error:
Code: [Select]
TypeError: argument 3 must be PhotoScan.CoordinateSystem, not PhotoScan.Matrix
But documentation for photoscan api says:
Quote
buildDem(source=DenseCloudData, interpolation=EnabledInterpolation [ , projection ][ , region ][ ,
classes ][ , progress ] )
Build elevation model for the chunk.
Parameters
• source (PhotoScan.DataSource) – Selects between dense point cloud and sparse
point cloud. If not specified, uses dense cloud if available.
• interpolation (PhotoScan.Interpolation) – Interpolation mode.
• projection (Matrix or CoordinateSystem) – Sets output projection.
• region (tuple of 4 floats) – Region to be exported in the (x0, y0, x1, y1) for-
mat.
• classes (list of PhotoScan.PointClass) – List of dense point classes to be used
for surface extraction.
• progress (Callable[[float], None]) – Progress callback.

Please do help me with this.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14854
    • View Profile
Re: Build DEM with planar top XY
« Reply #3 on: August 28, 2017, 07:22:58 PM »
Hello ankit.chaurasia,

Currently DEM generation via Python doesn't support planar projection option defined by the 3x3 matrix. We will fix it in the next update.
Best regards,
Alexey Pasumansky,
Agisoft LLC