Forum

Author Topic: Bed result after changing Coordinate System for export  (Read 2301 times)

andrey.d

  • Newbie
  • *
  • Posts: 26
    • View Profile
Bed result after changing Coordinate System for export
« on: March 03, 2017, 05:39:28 AM »
Hello,

Could you help me to understand how I have to set Coordinate System?
I have csv with image coordinates file with in EPSG::4326.
I need export map in  EPSG::3857
A did it but stitching quality was terrible.
I use this code to load images and reference (csv) file

Link th the report https://drive.google.com/open?id=0B5NgaXpGOtOUNzhBempTd2lMUXVUaUhLZEpxZElSZ096dkhJ
The csv file in attachment

My code:
Code: [Select]
chunk.addPhotos(images_list)
camera = chunk.cameras[0]
chunk.loadReference(out_csv, format=PhotoScan.ReferenceFormatCSV, columns="nxyzabc", delimiter=",", group_delimiters=False, skip_rows=1)
chunk.crs = PhotoScan.CoordinateSystem("EPSG::4326")
....
And before export orthomap I change CoordinateSystem to EPSG::3857

Code: [Select]
crs = PhotoScan.CoordinateSystem("EPSG::3857")
doc = PhotoScan.app.document

doc.open(project_path)
chunk = doc.chunk
chunk.crs = crs

chunk.buildOrthomosaic(surface=PhotoScan.ModelData, blending=PhotoScan.MosaicBlending, color_correction=False)
chunk.exportOrthomosaic(args.ortho_path, image_format=PhotoScan.ImageFormatTIFF, raster_transform=PhotoScan.RasterTransformNone, write_kml=False, write_world=False, write_alpha=True, tiff_compression=PhotoScan.TiffCompressionDeflate)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14753
    • View Profile
Re: Bed result after changing Coordinate System for export
« Reply #1 on: March 03, 2017, 12:02:53 PM »
Hello andrey.d,

You second code part is not correct. You are changing the coordinate system of the chunk (not converting, but just changing the system name like you can do via Reference pane settings), but after that the orthomosaic is exported with the default coordinate system.

.exportOrthomosaic() function has projection argument, that you can use to export the result in a different coordinate system, without affecting already processed data.

So I can suggest to build orthomosaic in original chunk coordinate system and during the export use projection = crs argument, where crs = PhotoScan.CoordinateSystem("EPSG::3857").
Best regards,
Alexey Pasumansky,
Agisoft LLC