Subscribe to this thread
Home - General / All posts - Transform Toolbar, Fill With. Can I do calculations?
tonyw
736 post(s)
#26-Aug-16 08:05

In my drawings, the intrinsic field Area(I) is in square metres. I need to express area as Hectares where 1 ha = 10,000 m2. Up to now I've used active columns but have discovered "Fill With" in the transform tool bar. My process involves 3 steps

1. In the target table, add a new column of floating pointtype. Name column Hectares

2. Use the Transform Tool Bar, set Target to column "Hectares", function is "Fill With" and third box parameter is "Area(I)"

3. Use the Transform Tool Bar,set Target to column "Hectares", function is "Multiple By" and parameter is "0.0001" (or alternatively, divide by 10,000)

Can I reduce this to two steps? Can I do calculations with Fill With? I tried "=Area(i)/10000" and "Area(i)/10000" but there is no change in the column.

Sergio40 post(s)
#26-Aug-16 10:33

Use Active Column to achieve what you describe.

See: http://www.georeference.org/doc/active_columns.htm

To create a Function that converts Area from square meters to hectares:

Function AreaInHa

AreaInHa = Record.Data("Area (I)")/10000

End Function

Hope this helps.


s

tonyw
736 post(s)
#26-Aug-16 17:11

Thanks Sergio,

I've used Active Columns up to now but came across a reference to using the transform tool bar to work with tables. For me, it's fast as it's driven by drop down menus. I was wondering if I can do calculations with "Fill With" and reduce to one step using the transform tool bar.

tjhb
10,094 post(s)
#26-Aug-16 18:39

It's a great idea for the future.

Does SQL get you close enough? Is that more steps or fewer?!

UPDATE [drawing-name] SET [Hectares] = [Area (I)] / 10000;

tonyw
736 post(s)
#26-Aug-16 22:21

Thanks tjhb

Yes, the SQL does the job too. I fire up the GIS once in awhile in my work but I don't write scripts or queries often enough to be good at it nor to write it error free the first time. It's a process of trial and error and I have to look up the syntax each time so for me it's more steps. The two steps with the Transform Tool Bar is the most efficient option for my situation.

tonyw
736 post(s)
#27-Aug-16 08:28

tjhb

Revelation. Where the SQL is faster is on re-calculating. I had a need today to trace out a likely property line to yield an irregularly shaped area of 40 acres. It was a bit of trial and error to get the size of area correct and re-calculating the area in acres using the transform tool bar took many steps, SQL would have been one click.

dale

630 post(s)
#27-Aug-16 23:47

The simplicity of Tim's suggested SQL update query married with active columns would suit me. Users could learn the one language (SQL), and apply it both queries and active columns. Not yet submitted as a suggestion to sales.

tjhb
10,094 post(s)
#29-Aug-16 04:25

Tony and Dale's suggestions are really, really good.

Can I do calculations with Fill With? I tried "=Area(i)/10000" and "Area(i)/10000" but there is no change in the column.

...

The simplicity of [an] SQL update query married with active columns would suit me. Users could learn the one language (SQL), and apply it both queries and active columns. Not yet submitted as a suggestion to sales.

They would make great suggestions to sales. Except...

Manifold have already implemented them both. I was so struck by the match, that I asked permission to sneak some details from the Radian Studio beta (many thanks to Dimitri).

Radian Studio is heavily focussed on SQL, much of it new, all very fast. But that does not mean human usability has been placed second. A lot of really smart thinking has been poured into user interface design.

In my opinion, one of the coolest new design elements is the Edit > Transform dialog. This is one of two places where Tony and Dale's suggestions come in.

Edit > Transform operates on tables, like the Transform toolbar for tables in Manifold 8. In Manifold 8, the toolbar gives access to many SQL-like functions, without the user having to know or use SQL. The new Transform dialog has a similar intent, but takes the idea further--and, optionally, brings SQL with it.

The dialog updates a target column, with tools under either of two tabs.

The Template tab is very like the Transform toolbar in 8. There is a list of pre-built functions--a different list according to the target column type. Select a text column and you get Trim, Lower Case, replacement functions, and so on. Select a numeric column and you get a list of (mostly) math functions. Familiar concept, with a richer of functions than we are used to in 8. The number of parameters available changes depending on the chosen function, currently between 1 and 4 parameters, which are generally pre-populated with defaults.

Beside it, the Expression tab gives us a query builder. That is, instead of a list of pre-built functions, we have the full range of Radian SQL syntax to choose from, which can either be typed in manually, or chosen by mouse from a list of fields (columns), and a structured list of operators and functions. It's a long list! Luckily, there's a search box to restrict the list to (say) functions with "Geom" in their name. Beautiful design. No instructions required.

In both the Template and the Expression tab, you can target all records or just selected records.

Both tabs also have live preview. So whether you choose a template function or build your own, the result of the transformation is previewed live in the table window (open underneath). Changes are only committed when you press Update Field button.

So that's one thing.

The second new feature where Tony and Dale's suggestions have been implemented is Computed Fields. These are the successor both to Active Columns and (largely) to intrinsic fields in Manifold 8.

The contents of a computed field (or column) are produced live from a user expression written in SQL syntax. Again the whole range of Radian SQL is available. The result can take any built-in type (text, numeric, geometry, date-time, boolean, and a few others), and the expression can include other fields from the same table, or a different table (I won't go into the possibilities more for now). Change the expression and the content changes. Content is calculated live--just like an active column in 8 (if set to auto-update), but now at the speed of SQL.

So, you can see why I thought Tony and Dale (and others) might be happy with these new features.

mikedufty

871 post(s)
#29-Aug-16 06:38

Sounds good.

I gave up on active columns because they don't survive copying duplicating or cut and pasting from drawings, meaning they constantly had to be rebuilt, so it was easier just to do manual calculations or queries.

I hope the new features address this. If not at least it looks easier to rebuild each time.

tonyw
736 post(s)
#29-Aug-16 07:23

Thanks tjhb,

The peek sounds great, thanks. The menu driven approach will be really nice. Also I hope there are popup tips that explain what a particular function does. An example is in excel when you begin to type a formula, the syntax appears plus a description of what the function does.

I can see that live computed fields will be extremely handy. At times I'm running the GIS in real time during meetings making changes to drawings taking cues from the flow of discussions around the table. The group can watch the big screen to see me work and they can immediately see the resulting map. The inevitable question is "OK, what are our areas now"? With the coming live computed columns I can see the column updating automatically and my labels updating as i work. Then I can run my query and give them their total area. What would be really neat would be column functions such as sum, average, median, count, etc that would update in real time. But I get ahead of myself, I'm anxious to see what is in Radian Studio and Manifold 9.

Graeme

990 post(s)
#29-Aug-16 08:02

What would be really neat would be column functions such as sum, average, median, count, etc that would update in real time

You can do quite a lot of that already using the ViewBots pane..

tonyw
736 post(s)
#29-Aug-16 08:27

Thanks Graeme,

Just tried it, View > Panes > ViewBots, that's great, I can do subtotals on all objects or a selection. Results are in square metres, I can visually move the decimal 4 places to the left to yield hectares if I don't have time to setup an active column.

tjhb
10,094 post(s)
#29-Aug-16 08:41

ViewBots: possibly the second most neglected feature in Manifold 8.

First: DSS aka fuzzy logic.

(Just one opinion of course.)

mikedufty

871 post(s)
#31-Aug-16 03:59

Results are in square metres, I can visually move the decimal 4 places to the left to yield hectares

I find it also helps quite a lot to go into the table and format the Area(I) column to no decimal places, thousands separator commas, and right aligned. This format is reflected in the viewbot output.

dale

630 post(s)
#30-Aug-16 08:31

Thanks Tim, and thus Dimitri,

how interesting, I quite like the concept of both pre-built functions and Radian SQL query builder, with the live view. For those point and click users, the combination should prove to be powerful. Computed fields ditto.

Happy? Yes.

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