Forum

Author Topic: ortho mosaic export raster projection, remaining unprojected in GIS  (Read 1178 times)

spatialdigger

  • Newbie
  • *
  • Posts: 17
    • View Profile
I'm trying to assign a projection to build the orthomosaic and then export the orthomosaic as a GIS raster, currently the projection is not being picked up by the GIS.
Where am I going wrong?

Code: [Select]
    doc.save(filepath)
    chunk = doc.chunk
    espgCode = 27700
    projectCRS = Metashape.CoordinateSystem("EPSG::" + str(espgCode))
    proj = Metashape.OrthoProjection()
    proj.crs = projectCRS

    chunk.buildOrthomosaic(surface_data=Metashape.DataSource.ModelData, blending_mode=Metashape.MosaicBlending, projection=proj)

    chunk.exportRaster(path=ortho_path, image_format=Metashape.ImageFormatJPEG, save_world=True, projection=proj)

spatialdigger

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: ortho mosaic export raster projection, remaining unprojected in GIS
« Reply #1 on: July 28, 2021, 08:08:12 PM »
I think this is a GIS issue, the jpgs are displayed correctly, but require a spatial reference to be set in the GIS.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13222
    • View Profile
Re: ortho mosaic export raster projection, remaining unprojected in GIS
« Reply #2 on: July 29, 2021, 05:34:19 PM »
Hello spatialdigger,

JPEG format doesn't support embedded georeferencing information. Instead a separate .jgw file is used to store coordinates of the orthomosaic corners. Unfortunately this file contains only the coordinate values, and not the definition of the coordinate system. When importing .jpg/.jgw orthomosaic into QGIS the coordinate system needs to be specified manually.

You may consider using TIFF format (with JPEG compression, if you need smaller file size) or JPEG2000 format.
Best regards,
Alexey Pasumansky,
Agisoft LLC