Subscribe to this thread
Home - General / All posts - New video - merge images
Dimitri


4,843 post(s)
#07-May-18 10:01

There's a new video on the Gallery page showing how to merge images.

...Amazing to note that there are now 63 videos in the Manifold YouTube channel.

rk
265 post(s)
#07-May-18 10:34

The link to YouTube on Gallery page has a typo - hhttps.

Dimitri


4,843 post(s)
#07-May-18 12:14

Fixed!

artlembo

3,048 post(s)
#07-May-18 12:28

Great tool, but this is a deviation from other tools in 9 - no button to see the SQL query. Will you be adding something like this? That would help from an automation standpoint.

adamw


7,903 post(s)
#07-May-18 12:54

Not right now. Maybe in the future.

The culprit is that the functions performing the merge have to take an unspecified number of components and we don't see a way to do this naturally in current SQL. We can do it in a script easily, but not in SQL. We could do functions that operate on pairs of components and build the merge of N components as N-1 merges of 2 components, but we don't really like that option.

tjhb
8,009 post(s)
#07-May-18 13:27

That is interesting.

Would it be possible conceptually in SQL to first create an output table, then cross join it to a filtered table based on mfd_meta showing only the records naming members of the map, and for each record in the joined table, use the name to look up component properties (including coordinate system, rect) and the properties to retrieve source data?

That is putting aside how to get the name of the active map (which I hope is coming, discussed before).

adamw


7,903 post(s)
#07-May-18 13:32

No. You cannot go from the name of a component expressed as a string to its table, because the SQL engine has to know what fields / indexes it is dealing with without looking at the data. This is not an issue with a script, a script can do everything dynamically.

What we are considering doing is kind of side-stepping all this by allowing functions to take an arbitrary number of arguments at the end and then just passing a big list of components to MergeXxx(...).

tjhb
8,009 post(s)
#07-May-18 13:43

Got it, thanks.

That makes me wonder about adding an SQL function to return a component’s schema as a quasi-table (a bit like the quasi-table returned by CoordConverterMake).

I don’t know if that would allow the compiler to see enough of what it needs.

(The supposed function might have another use—as a help in “agnostically” duplicating a table.)

adamw


7,903 post(s)
#07-May-18 14:20

A function that, say, takes the name of a table / query and returns a table describing its schema is completely doable, and perhaps useful (so we might do one), but it won't help here, unfortunately.

tjhb
8,009 post(s)
#07-May-18 14:35

Thanks again Adam.

artlembo

3,048 post(s)
#07-May-18 13:34

seeing a script would be really useful. I'm just thinking that with GDAL, we can write a simple .bat file and merge things together. It would be nice to do the same thing with 9 - basically write a 'for' loop to merge a list of layers together. Arcpy has this function as well with the Merge Data Management object. A simple API like that would be great, and a short burst of code like ESRI has it in the help manual would be a great assistance.

adamw


7,903 post(s)
#07-May-18 13:37

Understood. We will put it onto the list of things to do. (Or, rather, I will extend an existing item on that list that we already have with a couple of notes.)

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