Re: Trying to make custom WKT for a non-Earth projection to spatially reference images taken with microscope

Sean Gillies

Hi Ryan,

On Sun, Feb 9, 2020 at 1:55 PM Ryan Avery <ravery@...> wrote:

I'm working with non spatially-referenced images produced from a laser ablation system. Along with the image, the software produces an "align" file of the same name - an xml file that contains the XY center point of each image (coordinates are in microns) and the XY size (in microns) along with any rotation.

I would like to display the images (we typically generate about 1000 images / day) in their correct relative positions and sizes.

The laser has a stage with a cartesian positive XY coordinate system (in microns), and the origin in the SW corner.

So far I have gotten to the step of generating an affine transform for each scanned image based on it's size and center coordinate in microns and rotation metadata. What I don't have is a definition of a custom CRS in WKT. I don't have any experience with the WKT format but it seems like the way to represent non-Earth CRSs. Once I have this I think I reproject each image and save as a geotiff for later viewing in QGIS.

Are there any resources for defining a custom CRS in WKT or has anyone done something like this before? I know the units are in microns, the center point of my CRS, and the height and width of the coordinate reference system (and that it is planar). Any help is much appreciated, my progress so far is located here:


This sounds like a job for WKT2 EngineeringCRS.

I do not know how to use it with rasterio, but I would love to learn how.

Sean Gillies

Join to automatically receive all group messages.