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 - dcsa

Pages: [1]
1
Python and Java API / Export shapes to gpkg file
« on: February 10, 2024, 07:03:18 PM »
Dear Metashape developers,

We need to export a geometry in a GeoPackage file, but executing code:
Code: [Select]
layer = chunk.shapes.groups[0]
chunk.exportShapes(
     path=os.path.join(output_path, 'roi.gpkg'),
     save_polygons=True,
     groups=[layer.key],
     format=Metashape.ShapesFormatGeoPackage,
     crs=chunk.crs
)

We get error: OSError: SQL logic error (1)

But we do not get any error using the SHP format:

Code: [Select]
layer = chunk.shapes.groups[0]
chunk.exportShapes(
    path=os.path.join(output_path, 'roi.shp'),
    save_polygons=True,
    groups=[layer.key],
    format=Metashape.ShapesFormatSHP,
    crs=chunk.crs
)

Please, what is the solution to get our geometry exported in GPKG format?

Thank you for your time

2
Hi,

We have successfully used the definition of a composed CRS (a horizontal projected CRS and a vertical CRS which respects a specific model of geoid) according to the proj library, in the Metashape API (I mean EPSG::CodeForHorizontalCrs+CodeForVerticalCrs).

We have tried to define this composed CRS in the GUI without success, as the results are different. To do so, we edited the projected CRS from the list of CRSs available in the interface, and selected:
Geographic CS: The one that uses the same datum but not projected.
Vertical CS: The CRS that defines the model of geoid that we want to use (previous download of the file in the metashape geoids folder).
Projection: the same projection used by the original projected CRS.
Units: those used by the original projected CRS .

Based on this experience, we would like to know if there is a way to select a composed CRS in the GUI according to the proj definition, avoiding the need to use the API, and why our definition in the interface does not return an equivalent result.

Thank you for any idea that can help us!

3
Python and Java API / Own preselection pairs in matching
« on: August 16, 2017, 05:53:35 PM »
Hi,

Is it possible to fix the image pairs where PhotoScan will look for matches in the matching process? I mean, Can I give a list of image pairs where I want to find matches?

I have photos taken from an aircraft but their positions are very near between some of them, so i don't want to get matches between this images.

Can I do that?

How it works the parameter "pairs" for the matching process? How is the sintaxis of the list (pairs of images)? Or is it just to fix a list of images, not a image pairs?

Thank you for your time. Any idea will be welcome

Pages: [1]