Forum

Show Posts

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.


Topics - Midkhat

Pages: [1]
1
Bug Reports / failed: error 1286
« on: January 24, 2022, 03:31:57 AM »
I get bunch of following two errors since switched to 1.8:

2022-01-24 11:13:01 OpenGL Vendor: Apple
2022-01-24 11:13:01 OpenGL Renderer: Apple M1
2022-01-24 11:13:01 OpenGL Version: 2.1 Metal - 76.3
2022-01-24 11:13:01 Maximum Texture Size: 16384
2022-01-24 11:13:01 Quad Buffered Stereo: not enabled
2022-01-24 11:13:01 ARB_vertex_buffer_object: supported
2022-01-24 11:13:01 ARB_texture_non_power_of_two: supported
2022-01-24 11:13:01 Agisoft Metashape Professional Version: 1.8.0 build 13794 (64 bit)
2022-01-24 11:13:01 Platform: Mac OS
2022-01-24 11:13:01 RAM: 16.0 GB
2022-01-24 11:13:02 LoadProject: path =
2022-01-24 11:13:02 loaded project in 0.008163 sec
2022-01-24 11:13:02 Finished processing in 0.008331 sec (exit code 1)
2022-01-24 11:13:02 renderer_qgl.cpp line 659: blitFramebuffer(0, 0, width, height, 0, 0, width, height, 0x00000100, 0x2600) failed: error 1286
2022-01-24 11:13:02 renderer_qgl.cpp line 674: glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, 0x00000100, 0x2600) failed: error 1286
....
2022-01-24 11:13:05 renderer_qgl.cpp line 659: blitFramebuffer(0, 0, width, height, 0, 0, width, height, 0x00000100, 0x2600) failed: error 1286
2022-01-24 11:13:05 renderer_qgl.cpp line 674: glBlitFramebuffer(0, 0, width, height, 0, 0, width, height, 0x00000100, 0x2600) failed: error 1286

They only appear when I create a shape, or import a kml (in both cases - from GUI or API), save and reopen the project.
The errors keep streaming in even when I only move a mouse (or Pan, Zoom, click) in Model view. They stop coming in when switch to Ortho view.

2
Python and Java API / Compound CS transformation
« on: December 15, 2021, 02:00:40 AM »
Hi

I am involved in a drone data processing. The photos may come in GDA94 or GDA2020 and the output has to be in MGA94 with AHD geoid height.
I have figured out how to do that in Agisoft UI with the help of the manual and it works fine, but I am having trouble automating that process in API.
This is the WKT I am using when transforming GDA2020 to MGA94:
Code: [Select]
COMPD_CS["GDA94 / MGA zone 55 + AHD",
    PROJCS["GDA94 / MGA zone 55 + AHD",
        GEOGCS["GDA94",
            DATUM["Geocentric Datum of Australia 1994",
                SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],
                TOWGS84[0.06155,-0.01087,-0.04019,0.0394924,0.0327221,0.0328979,-0.009993999999999999],AUTHORITY["EPSG","9688"]],
                PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
                UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9102"]],
            AUTHORITY["EPSG","4283"]
            ],
            PROJECTION["Transverse_Mercator",AUTHORITY["EPSG","9807"]],
            PARAMETER["latitude_of_origin",0],
            PARAMETER["central_meridian",147],
            PARAMETER["scale_factor",0.9996],
            PARAMETER["false_easting",500000],
            PARAMETER["false_northing",10000000],
            UNIT["metre",1,AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","28355"]
    ],
    VERT_CS["AHD height",
        VERT_DATUM["Australian Height Datum",2005,AUTHORITY["EPSG","5111"]],
        UNIT["metre",1,AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","5711"]
    ]
]

When I try to apply this transformation to all cameras I get an error:
RuntimeError: Vertical datum missing

I have added the geoid tiff to the "C:/Program Files/Agisoft/Metashape Pro/geoids" folder, trying to add it to the Metashape.CoordinateSystem as well. Have also tried to add it to the script folder.

This is related piece of code:
Code: [Select]
   
wgs = Metashape.CoordinateSystem("EPSG::4326")

geoid_file = "C:/Program Files/Agisoft/Metashape Pro/geoids/au_ga_AUSGeoid09_V1.01.tif"
if not os.path.exists(geoid_file):           
    print(f"file {geoid_file} doesn't exist!!!!!")
mga_file = "./mine-sites/MGA55_AHD.prj"   
with open(mga_file) as f:
    wkt = f.read()
mga = Metashape.CoordinateSystem(wkt)
mga.addGeoid(geoid_file)   

for camera in cameras:
    camera.reference.location = Metashape.CoordinateSystem.transform(camera.reference.location, wgs, mga)
chunk.crs = mga
doc.save()

Best regards

Pages: [1]