Subscribe to this thread
Home - General / All posts - Create image based on size of other layers?
JoeyD21 post(s)
#12-Nov-20 22:49

I want to create a new empty image with certain coordinate system metrics. Is there a way to have the bounds and size of the new image be calculated automatically based on size/form information from another layer, e.g. a drawing or image?

I believe there could be 3 options for this

1. change the preset metrics slightly so the new image fits the template layer exactly (if same projection and maybe some other conditions)

2. maintain the exact manually preset metrics and opt for the new image a minuscule bit larger than the template layer, average half a pixel size

3. maintain the exact manually preset metrics and opt for the new image to be a minuscule bit smaller than the template layer, average half a pixel size

I would be very happy with e.g. option 2. Can you think of a way to do this?

Dimitri


6,276 post(s)
#13-Nov-20 07:25

Use a query. For some ideas on how to create images in a query, launch the File - Create - New Image dialog, enter parameters similar to what you might want in a new image, and then press the Edit Query button to see what SQL is used.

Anything you want to know about other layers is fully discoverable or easily calculated via SQL, so you can figure out what parameters you want to use when you create your new image.

adamw


9,445 post(s)
#30-Nov-20 15:06

Suppose you have a drawing and you want to create an image with a specific coordinate system and pixel size covering that drawing entirely. You don't know what rectangle the image should have (you can compute it manually, but that's error-prone, etc).

Here's what you can do: create a blank image with the desired coordinate system and pixel size (coordinate system metrics). Open the image. Drag and drop the drawing into the window with the image. Make the image layer active. Invoke Edit - Join, select drawing as a source component, specify any join rule for channel 0 (eg, set it to 'count'), click 'Resize image', then click Join Component. This should transfer the drawing onto the image and resize the image to the extents of the drawing. You can delete the resulting tiles if you don't want them.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.