Subscribe to this thread
Home - General / All posts - M9 Update pixels overlain by area objects in a drawing

1,697 post(s)
#09-Oct-18 04:28

I am attempting to undertake some grid processing in M9 which so far has been pleasingly fast. I have however now hit a bit of a roadblock.

I now need to update pixels in an image where they are overlain by area objects in a drawing. I have been looking through the available tile functions but have so far failed to identify a way to achieve this.

Failing this, if I can get the vector drawing into a raster of the same dimensions, I believe I could use the tile functions to combine the images this way. With this in mind, is there the equivalent of M8's 'No Interpolation' method for moving objects from vector to raster in SQL?

Any pointers would be much appreciated.

Landsystems Ltd ... Know your land |


8,568 post(s)
#09-Oct-18 14:38

We need to add functions to convert vectors to rasters using what 8 called 'no interpolation'. We are planning to add them as well as functions to capture statistics from pixels under specified geometry.

Until we do so, your best bet is to create script variants of such functions. These script variants will likely not run as fast as optimized built-in functions, but maybe they will run fast enough on your data - even if implementations are naive and wasteful "let's just check for each pixel if it happens to fall into an object".

Right now we are busy with cartography, but functions above are pretty high on the list for right after. If you want to go the script route, I will try to help.


1,697 post(s)
#10-Oct-18 05:59

Thanks very much for the reply and great to hear that the functions are not too distant.

I am attempting to rebuild an existing process which takes 2.5 days to run in ArcMap. The only missing piece is those functions that I have asked about. Anyway, if the performance of this last piece is close to that of the bits already done, I estimate that the entire process will be reduced from 2.5 days to between 4-5 minutes in Manifold 9. Truly remarkable!

Landsystems Ltd ... Know your land |


8,743 post(s)
#10-Oct-18 06:22

This is an example of a tricky situation which we have all discussed before. It has lasted for several years now, and it is not conducive to the uptake of Manifold 9 by third-party developers who would like to build extensions.

Taking the present example, I would love to write a decent add-in to perform the equivalent of Paste as Surface, with no interpolation, for 9. A "naive and wasteful" version (as Adam beautifully put it) would take no time at all--but there would be regret in doing that, when an efficient version (which would do everyone including Manifold much greater credit) is not so much harder.

Not much harder, but just enough extra time that it doesn't feel fair for it to be (necessarily) free, when the time would obviously be deducted from other work.

Some clients might hesitate to pay a fair price for a function that might well appear as a built-in, for free and certainly faster, any day now, or next week, or next month. In three or four months--that might be different.

But we just don't know which month it might be. It is difficult to make a rational investment in this situation, with no roadmap. As I said at the start, the situation has gone on for a some time.

I don't know how to solve it. Having said which, the last time I brought it up the hearing was very sympathetic.


8,743 post(s)
#10-Oct-18 07:26

Let's consider a related issue. Someone writes an add-in doing X quite well, happy for it to be made freely available, and even better, it is checked over by (let's say) Adam's generous expertise, how does he find the time, and it is duly improved, and then... where does it go?

It gets slightly buried in the forum. Not completely, by any means, but it is in no one's immediate view. It's a search.

What I would really really love is for Manifold to publish and expose its specification and format for Transform templates.

So that we could build and publish our own. A transform template, in correct format, validated and loaded at launch, thereafter appearing in the Transform panel. In exactly the same format as Manifold 9 uses internally (whatever that is--clearly it is quite good).

And a curated repository for publishing them. GitHub probably.

Is that confusing financial and voluntary incentives? Not really, because the difference might not be important. What people need is incentives to do things, some rational basis. They need not be money.


8,568 post(s)
#10-Oct-18 10:07

We hear you.

Transform templates are too complex of a starting point. Apart from the simplest templates - where you compute something in the scope of a single record - all transform templates compose their queries using code. Similar transform templates use the same code, but the number of such template families is fairly big (more than ten) and the number is steadily growing. The code that composes a query for a transform in a particular template family is not awfully large, but it is quite tricky. What you can template differs between template families heavily.

I am not saying we won't do custom transforms - we will absolutely do them, but we will likely just let you specify which controls you need and then send you the choices in these controls and ask you to generate your query. And if it is likely going to look like this anyway, let's just not start with transform templates and let's just use standalone scripts - create a script, ask the user for parameters, then generate and run the query. We can absolutely create the infrastructure where we would maintain a repository of scripts on Github, approve whatever is sent to us, put out our own scripts from time to time, and an installation of 9 would be able to automatically get scripts from that repository and run them. If the main culprit would be having to create an UI that asks the user for parameters, we can help with that as well - maybe create a simple function which would let you specify what you want entered (as a JSON?), then create a dynamic dialog, run it, and get the results back to your code. For anything more complex you'd write a form in Visual Studio or in some other tool.

Does that sound good?


6,316 post(s)
#10-Oct-18 10:52

Yes. And in contrast to an Add-in the functions would'nt allow interaction with the UI other than the full automated input controls. Is it useful to discuss Add-in infrastructure in this context?


8,568 post(s)
#10-Oct-18 11:59

If you are talking about events / persistent windows (like panes), then we have all that in mind and the code that we have is designed in the way that is friendly to such things already, but we'd rather start with something smaller - eg, make it easy to have scripts with basic UI, get to the point where such scripts start appearing as answers to questions in forum threads (because they are that easy to write), and then add events and the likes on top of that.


8,743 post(s)
#11-Oct-18 02:57

That sounds really good! And this has been an excellent discussion. I will add something more later but just wanted to say yes, it certainly does, and thanks.

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