spymicmac.micmac

spymicmac.micmac is a collection of tools for interfacing with MicMac

spymicmac.micmac.apericloud(ori, img_pattern='OIS.*tif')[source]

Run mm3d AperiCloud to create a point cloud layer

Parameters:
  • ori (str) – the input orientation to use

  • img_pattern (str) – the image pattern to pass to AperiCloud (default: OIS.*tif)

spymicmac.micmac.banana(fn_dem, fn_ref, deg=2, dZthresh=200.0, fn_mask=None, spacing=100)[source]

Interface for running mm3d Postproc Banana, for computing a polynomial correction to a “banana” or dome.

Parameters:
  • fn_dem (str) – the filename of the input DEM to correct

  • fn_ref (str) – the filename of the reference DEM to use for the correction

  • deg (int) – the degree of the polynomial correction (0 - 3, default: 2)

  • dZthresh (float) – the threshold elevation difference between the reference and input DEMs (default: 200)

  • fn_mask (str) – an (optional) exclusion mask to use for the reference DEM

  • spacing (int) – the pixel spacing of the DEM to write (default: every 100 pixels)

spymicmac.micmac.bascule(in_gcps, outdir, img_pattern, sub, ori, outori='TerrainRelAuto', fn_gcp='AutoGCPs', fn_meas='AutoMeasures')[source]

Interface for running mm3d GCPBascule and reading the residuals from the resulting xml file.

Parameters:
  • in_gcps (pandas.DataFrame) – a DataFrame with the GCPs that are being input to Campari.

  • outdir (str) – the output directory where the AutoGCPs.xml file is saved.

  • img_pattern (str) – the match pattern for the images being input to Campari (e.g., “OIS.*tif”)

  • sub (str) – the name of the block, if multiple blocks are being used (e.g., ‘_block1’). If not, use ‘’.

  • ori (str) – the name of the orientation directory (e.g., Ori-Relative).

  • outori (str) – the name of the output orientation directory (default: TerrainRelAuto).

  • fn_gcp (str) – the filename pattern for the GCP file. The file that will be loaded will be fn_gcp + sub + ‘.xml’ (e.g., default: AutoGCPs -> AutoGCPs_block0.xml)

  • fn_meas (str) – the filename pattern for the measures file. The file that will be loaded will be fn_meas + sub + ‘-S2D.xml’ (e.g., default: AutoMeasures -> AutoMeasures_block0-S2D.xml)

Returns:

out_gcps (pandas.DataFrame) – the input gcps with the updated Bascule residuals.

spymicmac.micmac.batch_saisie_fids(imlist, flavor='qt', fn_cam=None)[source]

Run SaisieAppuisInit to locate the fiducial markers for a given list of images.

Parameters:
  • imlist (list) – the list of image filenames.

  • flavor (str) – which version of SaisieAppuisInit to run. Must be one of [qt, og] (default: qt)

  • fn_cam (str) – the filename for the MeasuresCamera.xml file (default: Ori-InterneScan/MeasuresCamera.xml)

spymicmac.micmac.block_malt(imlist, nimg=3, ori='Relative', zoomf=8)[source]

Run mm3d Malt Ortho and mm3d Tawny on successive blocks of images.

Parameters:
  • imlist (iterable) – an iterable object of image filenames, or an iterable object of lists of image filenames

  • nimg (int) – the number of images to use in a block (default: 3)

  • ori (str) – the name of the orientation directory (e.g., Ori-Relative). (default: Relative)

  • zoomf (int) – the final Zoom level to use (default: 8)

spymicmac.micmac.campari(in_gcps, outdir, img_pattern, sub, dx, ortho_res, allfree=True, fn_gcp='AutoGCPs', fn_meas='AutoMeasures', inori='TerrainRelAuto', outori='TerrainFinal', homol='Homol')[source]

Interface for running mm3d Campari and reading the residuals from the residual xml file.

Parameters:
  • in_gcps (pandas.DataFrame) – a DataFrame with the GCPs that are being input to Campari.

  • outdir (str) – the output directory where the AutoGCPs.xml file is saved.

  • img_pattern (str) – the match pattern for the images being input to Campari (e.g., “OIS.*tif”)

  • sub (str) – the name of the block, if multiple blocks are being used (e.g., ‘_block1’). If not, use ‘’.

  • dx (int|float) – the pixel resolution of the reference image.

  • ortho_res (int|float) – the pixel resolution of the orthoimage being used.

  • allfree (bool) – run Campari with AllFree=1 (True), or AllFree=0 (False). (default: True)

  • fn_gcp (str) – the filename pattern for the GCP file. The file that will be loaded will be fn_gcp + sub + ‘.xml’ (e.g., default: AutoGCPs -> AutoGCPs_block0.xml)

  • fn_meas (str) – the filename pattern for the measures file. The file that will be loaded will be fn_meas + sub + ‘-S2D.xml’ (e.g., default: AutoMeasures -> AutoMeasures_block0-S2D.xml)

  • inori (str) – the input orientation to Campari (default: Ori-TerrainRelAuto -> TerrainRelAuto)

  • outori (str) – the output orientation from Campari (default: Ori-TerrainFinal -> TerrainFinal)

  • homol (str) – the Homologue directory to use (default: Homol)

Returns:

out_gcps (pandas.DataFrame) – the input gcps with the updated Campari residuals.

spymicmac.micmac.create_localchantier_xml(name='KH9MC', short_name='KH-9 Hexagon Mapping Camera', film_size=(460, 220), pattern='.*', focal=304.8, add_sfs=False)[source]

Create a MicMac-LocalChantierDescripteur.xml file for a given camera. Default is the KH-9 Hexagon Mapping Camera.

Parameters:
  • name (str) – The name to use for the camera [KH9MC]

  • short_name (str) – A short description of the camera [KH-9 Hexagon Mapping Camera]

  • film_size (array-like) – the film size (width, height) in mm [460, 220]

  • pattern (str) – the matching pattern to use for the images [.*]

  • focal (float) – the nominal focal length, in mm [304.8]

  • add_sfs (bool) – use SFS to help find tie points in low-contrast images [False]

spymicmac.micmac.create_measurescamera_xml(fn_csv, ori='InterneScan', translate=False, name='gcp', x='im_col', y='im_row')[source]

Create a MeasuresCamera.xml file from a csv of fiducial marker locations.

Parameters:
  • fn_csv (str) – the filename of the CSV file.

  • ori (str) – the Ori directory to write the MeasuresCamera.xml file to. Defaults to (Ori-)InterneScan.

  • translate (bool) – translate coordinates so that the origin is the upper left corner, rather than the principal point

  • name (str) – the column name in the csv file corresponding to the point name [gcp]

  • x (str) – the column name in the csv file corresponding to the image x location [im_col]

  • y (str) – the column name in the csv file corresponding to the image y location [im_row]

spymicmac.micmac.dem_to_text(fn_dem, fn_out='dem_pts.txt', spacing=100, fn_mask=None)[source]

Write elevations from a DEM raster to a text file for use in mm3d PostProc Banana.

Parameters:
  • fn_dem (str) – the filename of the DEM to read.

  • fn_out (str) – the name of the text file to write out (default: dem_pts.txt)

  • spacing (int) – the pixel spacing of the DEM to write (default: every 100 pixels)

spymicmac.micmac.estimate_measures_camera(ori='InterneScan', scan_res=2.5e-05, how='mean')[source]

Use a set of located fiducial markers to create a MeasuresCamera file using the average location of each fiducial marker.

Parameters:
  • ori (str) – The Ori- directory containing the MeasuresIm files (default: InterneScan)

  • scan_res (float) – the scanning resolution of the images in microns

  • how (str) – what average to use for the output locations. Must be one of [mean, median].

spymicmac.micmac.find_empty_homol(dir_homol='Homol')[source]

Search through a Homol directory to find images without any matches, then move them to a new directory called ‘EmptyMatch’

Parameters:

dir_homol (str) – the Homol directory to search in (default: Homol)

spymicmac.micmac.generate_measures_files(joined=False)[source]

Create id_fiducial.txt, MeasuresCamera.xml, and Tmp-SL-Glob.xml files for KH-9 Hexagon images.

Parameters:

joined (bool) – generate files for joined scene (220x460 mm) instead of half (220x230mm)

spymicmac.micmac.get_autogcp_locations(ori, meas_file, imlist)[source]

Find location of automatically-detected control points in individual images using mm3d XYZ2Im.

Parameters:
  • ori (str) – The orientation directory name (e.g., Ori-Relative)

  • meas_file (str) – The Measures file to find image locations for

  • imlist (list) – a list of image names

spymicmac.micmac.get_bascule_residuals(fn_basc, gcp_df)[source]

Read a given GCPBascule residual file, and add the residuals to a DataFrame with GCP information.

Parameters:
  • fn_basc (str) – the GCPBascule xml file to read the residuals from.

  • gcp_df (pandas.DataFrame) – a DataFrame with the GCPs to read the residuals for.

Returns:

gcp_df (pandas.DataFrame) – the input GCPs with the Bascule residuals added.

spymicmac.micmac.get_campari_residuals(fn_resids, gcp_df)[source]

Read a given Campari residual file, and add the residuals to a DataFrame with GCP information.

Parameters:
  • fn_resids – the Campari residual xml file to read.

  • gcp_df (pandas.DataFrame) – a DataFrame with the GCPs to read the residuals for.

Returns:

gcp_df (pandas.DataFrame) – the input GCPs with the Campari residuals added.

spymicmac.micmac.get_gcp_meas(im_name, meas_name, in_dir, E, nodist=None, gcp_name='GCP')[source]

Create an lxml.builder.ElementMaker object with a GCP name and the image (row, pixel) location.

Parameters:
  • im_name (str) – the image name to write the GCP location for.

  • meas_name (str) – the name of the file to read the point locations from.

  • in_dir (str) – the name of the directory where the images and measures files are located.

  • E (lxml.builder.ElementMaker) – an ElementMaker object for writing to the xml file.

  • nodist (str) – the name of the directory

  • gcp_name (str) – the prefix (e.g., GCP0, GCP1, etc.) for the GCP name (default: GCP).

Returns:

this_im_meas (lxml.builder.ElementMaker) – an ElementMaker object with the GCP location in the image.

spymicmac.micmac.get_im_meas(points_df, E, name='gcp', x='im_col', y='im_row')[source]

Populate an lxml.builder.ElementMaker object with GCP image locations, for writing to xml files.

Parameters:
  • points_df (pandas.DataFrame) – a DataFrame with the points to find image locations for.

  • E (lxml.builder.ElementMaker) – an ElementMaker object for writing to the xml file.

  • name (str) – the column name in points_df corresponding to the point name [gcp]

  • x (str) – the column name in points_df corresponding to the image x location [im_col]

  • y (str) – the column name in points_df corresponding to the image y location [im_row]

Returns:

pt_els (list) – a list of ElementMaker objects corresponding to each GCP image location.

spymicmac.micmac.get_match_pattern(imlist)[source]

Given a list of image names, return a match pattern that can be passed to MicMac command line functions.

Parameters:

imlist (list) – a list of image names.

Returns:

pattern (str) – a match pattern (e.g., “OIS.*tif”) that can be passed to MicMac functions.

spymicmac.micmac.get_tapas_residuals(ori)[source]

Read the image residuals output from Tapas.

Parameters:

ori (str) – the name of the Ori directory to read the residuals from (e.g., ‘Relative’ for Ori-Relative)

Returns:

img_df (DataFrame) – a DataFrame with image names and residuals

spymicmac.micmac.get_valid_image_points(shape, pts, pts_nodist)[source]

Find which image points are located within an image based on the size of the image.

Parameters:
  • shape – the shape of the image (rows, columns) to determine valid points for.

  • pts (pandas.DataFrame) – a DataFrame containing point locations (i, j)

  • pts_nodist (pandas.DataFrame) – a DataFrame containing point locations (i, j) calculated using no camera distortion.

Returns:

valid_pts (array-like) – an array of the points that are located within the image shape.

spymicmac.micmac.init_autocal(imsize=(32200, 15400), framesize=(460, 220), foc=304.8, camname='KH9MC')[source]

Create an AutoCal xml file for use in the Tapas step. Default values are for KH-9 Hexagon Mapping Camera.

When calling mm3d Tapas, be sure to use “InCal=Init”:

mm3d Tapas RadialBasic “OIS.*tif” InCal=Init Out=Relative LibFoc=0

The name of the file changes based on the focal length and camera name. Using the default values of foc=304.8 and camname=’KH9MC’ creates the following file in Ori-Init:

AutoCal_Foc-KH9MC_304800.xml

Parameters:
  • imsize (array-like) – the size of the image (width, height) in pixels (default: (32200, 15400))

  • framesize (array-like) – the size of the image (width, height) in mm (default: (460, 220))

  • foc (float) – nominal focal length, in mm (default: 304.8)

  • camname (int) – the camera short name to use (default: KH9MC)

spymicmac.micmac.init_git()[source]

Initialize a git repository in the current working directory.

spymicmac.micmac.iterate_campari(gcps, out_dir, match_pattern, subscript, dx, ortho_res, fn_gcp='AutoGCPs', fn_meas='AutoMeasures', rel_ori='Relative', inori='TerrainRelAuto', outori='TerrainFinal', homol='Homol', allfree=True, max_iter=5)[source]

Run Campari iteratively, refining the orientation by removing outlier GCPs and Measures, based on their fit to the estimated camera model.

Parameters:
  • gcps (pandas.DataFrame) – a DataFrame with the GCPs that are being input to Campari.

  • out_dir (str) – the output directory where the GCP and Measures files are located.

  • match_pattern (str) – the match pattern for the images being input to Campari (e.g., “OIS.*tif”)

  • subscript (str) – the name of the block, if multiple blocks are being used (e.g., ‘_block1’). If not, use ‘’.

  • dx (int|float) – the pixel resolution of the reference image.

  • ortho_res (int|float) – the pixel resolution of the orthoimage being used.

  • fn_gcp (str) – the filename pattern for the GCP file. The file that will be loaded will be fn_gcp + sub + ‘.xml’ (e.g., default: AutoGCPs -> AutoGCPs_block0.xml)

  • fn_meas (str) – the filename pattern for the measures file. The file that will be loaded will be fn_meas + sub + ‘-S2D.xml’ (e.g., default: AutoMeasures -> AutoMeasures_block0-S2D.xml)

  • rel_ori (str) – the name of the relative orientation to input to GCPBascule (default: Relative -> Ori-Relative + sub)

  • inori (str) – the input orientation to Campari (default: Ori-TerrainRelAuto -> TerrainRelAuto)

  • outori (str) – the output orientation from Campari (default: Ori-TerrainFinal -> TerrainFinal)

  • homol (str) – the Homologue directory to use (default: Homol)

  • allfree (bool) – run Campari with AllFree=1 (True), or AllFree=0 (False). (default: True)

  • max_iter (int) – the maximum number of iterations to run. (default: 5)

Returns:

gcps (pandas.DataFrame) – the gcps with updated residuals after the iterative process.

spymicmac.micmac.malt(imlist, ori, zoomf=1, zoomi=None, dirmec='MEC-Malt', seed_img=None, seed_xml=None)[source]

Run mm3d Malt Ortho.

Parameters:
  • imlist (str|iterable) – either a match pattern (e.g., OIS.*tif) or an iterable object of image filenames.

  • ori (str) – the orientation directory to use for Malt.

  • zoomf (int) – the final Zoom level to use (default: 1)

  • zoomi (int) – the initial Zoom level to use (default: not set)

  • dirmec (str) – the output MEC directory to create (default: MEC-Malt)

  • seed_img (str) – a DEM to pass to Malt as DEMInitImg. Note that if seed_img is set, seed_xml must also be set. (default: not used)

  • seed_xml (str) – an XML file corresponding to the seed_img (default: not used)

spymicmac.micmac.mask_invalid_els(dir_mec, fn_dem, fn_mask, ori, match_pattern='OIS.*tif', zoomf=1)[source]

Mask invalid elevations (e.g., water) in a DEM, then re-run the final step of mm3d Malt Ortho to make nicer orthophotos.

Parameters:
  • dir_mec (str) – the MEC directory (e.g., MEC-Malt) to use

  • fn_dem (str) – the filename of the reference DEM

  • fn_mask (str) – filename for the mask vector file

  • ori (str) – the orientation directory used to run Malt

  • match_pattern (str) – the match pattern used to

  • zoomf (int) – the final zoom level to run Malt at (default: ZoomF=1)

spymicmac.micmac.meas_to_asp_gcp(fn_gcp, fn_meas, imlist, outname=None, scale=1)[source]

Convert image measures stored in a micmac xml file to an ASP .gcp file format.

Parameters:
  • fn_gcp (str) – the filename of the shapefile with the GCP coordinates

  • fn_meas (str) – the filename of the xml file with the image measures

  • imlist (list) – the image(s) to write point locations for

  • outname (str) – the name of the output filename to create

  • scale (int) – the factor by which to scale the image point locations

spymicmac.micmac.mosaic_micmac_tiles(filename, dirname='.')[source]

Re-stitch images tiled by MicMac.

Parameters:
  • filename (str) – MicMac filename to mosaic together

  • dirname (str) – Directory containing images to Mosaic (default: .)

spymicmac.micmac.move_bad_tapas(ori)[source]

Read residual files output from Tapas (or Campari, GCPBascule), and move images with a NaN residual.

Parameters:

ori (str) – the orientation directory to read the residuals file from (e.g., ‘Ori-Relative’).

spymicmac.micmac.parse_im_meas(fn_meas)[source]

Read an xml file with image locations into a pandas DataFrame.

Parameters:

fn_meas – the name of the measures file to read.

Returns:

gcp_df (pandas.DataFrame) – a DataFrame with gcp names and image locations.

spymicmac.micmac.post_process(projstr, out_name, dirmec, do_ortho=True)[source]

Apply georeferencing and masking to the final DEM and Correlation images (optionally, the orthomosaic as well).

Output files are written as follows:
  • DEM: post_processed/{out_name}_Z.tif

  • Hillshade: post_processed/{out_name}_HS.tif

  • Correlation: post_processed/{out_name}_CORR.tif

  • Orthomosaic: post_processed/{out_name}_Ortho.tif

Parameters:
  • projstr (str) – A string corresponding to the DEM’s CRS that GDAL can use to georeference the rasters.

  • out_name (str) – The name that the output files should have.

  • dirmec (str) – The MEC directory to process files from (e.g., MEC-Malt)

  • do_ortho (bool) – Post-process the orthomosaic in Ortho-{dirmec}, as well. Assumes that you have run mm3d Tawny with Out=Orthophotomosaic first.

spymicmac.micmac.remove_measure(fn_meas, name)[source]

Remove all instances of a given measure from an xml file.

Parameters:
  • fn_meas (str) – the xml file (e.g., AutoMeasures-S2D.xml)

  • name (str) – the measurement name (e.g., GCP0)

spymicmac.micmac.remove_worst_mesures(fn_meas, ori)[source]

Remove outlier measures from an xml file, given the output from Campari.

Parameters:
  • fn_meas (str) – the filename for the measures file.

  • ori (str) – the orientation directory output from Campari (e.g., Ori-TerrainFinal -> TerrainFinal)

spymicmac.micmac.rename_gcps(root, ngcp=0)[source]

Rename all GCPs in order of their appearance in an (opened) xml file.

Parameters:
  • root (xml.etree.ElementTree.Element) – the root element of an xml tree

  • ngcp (int) – the number to start counting from (defaults to 0)

Returns:

  • mes_dict (dict) – a dict containing image, gcp key/value pairs

  • gcp_dict (dict) – a dict containing old/new gcp name key/value pairs

spymicmac.micmac.save_gcps(in_gcps, outdir, utmstr, sub, fn_gcp='AutoGCPs', fn_meas='AutoMeasures')[source]

Save a GeoDataFrame of GCP information to shapefile, txt, and xml formats.

After running, the following new files will be created:

  • outdir/fn_gcp.shp (+ associated files)

  • outdir/fn_gcp.txt

  • outdir/fn_gcp.xml (output from mm3d GCPConvert)

  • outdir/fn_meas.xml (a file with image locations for each GCP)

Parameters:
  • in_gcps (GeoDataFrame) – the gcps GeoDataFrame to save

  • outdir (str) – the output directory to save the files to

  • utmstr (str) – a UTM string generated by register.get_utm_str()

  • sub (str) – the name of the block, if multiple blocks are being used (e.g., ‘_block1’). If not, use ‘’.

  • fn_gcp (str) – the filename pattern for the GCP file. The file that will be loaded will be fn_gcp + sub + ‘.xml’ (e.g., default: AutoGCPs -> AutoGCPs_block0.xml)

  • fn_meas (str) – the filename pattern for the measures file. The file that will be loaded will be fn_meas + sub + ‘-S2D.xml’ (e.g., default: AutoMeasures -> AutoMeasures_block0-S2D.xml)

spymicmac.micmac.tapas(cam_model, ori_out, img_pattern='OIS.*tif', in_cal=None, lib_foc=True, lib_pp=True, lib_cd=True)[source]

Run mm3d Tapas with a given camera calibration model.

Some basic camera calibration models for air photos:
  • RadialBasic

  • RadialStd

  • RadialExtended

  • FraserBasic

  • Fraser

See MicMac docs for a full list/explanation of the camera models.

Parameters:
  • cam_model (str) – the camera calibration model to use.

  • ori_out (str) – the output orientation. Will create a directory, Ori-{ori_out}, with camera parameter files.

  • img_pattern (str) – the image pattern to pass to Tapas (default: OIS.*tif)

  • in_cal (str) – an input calibration model to refine (default: None)

  • lib_foc (bool) – allow the focal length to be calibrated (default: True)

  • lib_pp (bool) – allow the principal point to be calibrated (default: True)

  • lib_cd (bool) – allow the center of distortion to be calibrated (default: True)

spymicmac.micmac.tapioca(img_pattern='OIS.*tif', res_low=400, res_high=1200)[source]

Run mm3d Tapioca MulScale

Parameters:
  • img_pattern (str) – The image pattern to pass to Tapioca (default: OIS.*tif)

  • res_low (int) – the size of the largest image axis, in pixels, for low-resolution matching (default: 400)

  • res_high (int) – the size of the largest image axis, in pixels, for high-resolution matching (default: 1200)

spymicmac.micmac.tawny(dirmec, radiomegal=False)[source]

Run mm3d Tawny to create an orthomosaic.

Parameters:
  • dirmec (str) – the MEC directory to use

  • radiomegal (bool) – run Tawny with RadiomEgal=1 (default: False)

spymicmac.micmac.write_auto_gcps(gcp_df, sub, outdir, utm_zone, outname='AutoGCPs')[source]

Write GCP name, x, y, and z information to a text file to use with mm3d GCPConvert.

Parameters:
  • gcp_df (pandas.DataFrame) – a DataFrame with the GCPs to save.

  • sub (str) – the name of the block, if multiple blocks are being used (e.g., ‘_block1’). If not, use ‘’.

  • outdir (str) – the output directory to save the files to.

  • utm_zone (str) – the UTM zone name (e.g., 8N).

  • outname (str) – the name to use for the GCPs file (default: AutoGCPs.txt)

spymicmac.micmac.write_auto_mesures(gcps, sub, outdir, outname='AutoMeasures')[source]

Write a file with GCP locations in relaive space (x, y, z) to use with get_autogcp_locations.sh

Parameters:
  • gcps (pandas.DataFrame) – a DataFrame with the GCPs to save.

  • sub (str) – the name of the block, if multiple blocks are being used (e.g., ‘_block1’). If not, use ‘’.

  • outdir (str) – the output directory to save the files to.

  • outname (str) – the base name of the file to create (default: AutoMeasures).

spymicmac.micmac.write_image_mesures(imlist, gcps, outdir='.', sub='', ort_dir='Ortho-MEC-Relative')[source]

Create a Measures-S2D.xml file (row, pixel) for each GCP in each image from a list of image names.

Parameters:
  • imlist (list) – a list of image names.

  • gcps (pandas.DataFrame) – a DataFrame of GCPs.

  • outdir (str) – the output directory to save the files to.

  • sub (str) – the name of the block, if multiple blocks are being used (e.g., ‘_block1’).

  • ort_dir (str) – the Ortho-MEC directory where the images are located.

spymicmac.micmac.write_neighbour_images(imlist, fprints=None, nameField='ID', prefix='OIS-Reech_', fileExt='.tif', dataset='AERIAL_COMBIN')[source]

Using a list of images and a collection of image footprints, return a list of potential image pairs for processing with Tapioca.

Parameters:
  • imlist (list) – a list of (original) image names to use (e.g., without ‘OIS-Reech_’)

  • fprints (GeoDataFrame) – a vector dataset of footprint polygons. If not provided, will attempt to download metadata from USGS for the images.

  • nameField (str) – the field in fprints table that contains the image name

  • prefix (str) – the prefix attached to the image name read by Tapioca (default: ‘OIS-Reech_’)

  • fileExt (str) – the file extension for the images read by Tapioca (default: .tif)

  • dataset – the USGS dataset name to search if no footprints are provided (default: AERIAL_COMBIN)

spymicmac.micmac.write_xml(fn_img, fn_mask='./MEC-Malt/Masq_STD-MALT_DeZoom1.tif', fn_xml=None, geomname='eGeomMNTEuclid')[source]

Given a GDAL dataset, create a MicMac xml worldfile.

Parameters:
  • fn_img (str) – the filename of the image.

  • fn_mask (str) – the filename of the mask file (default: ./MEC-Malt/Masq_STD-MALT_DeZoom1.tif)

  • fn_xml (str) – the filename of the xml file to create (default: fn_img + ‘.xml’)

  • geomname (str) – the MicMac Geometry name to use (default: eGeomMNTEuclid)