Subscribe to this thread
Home - General / All posts - New video: 5 Minute Tutorial - Fast and Easy Contours
Dimitri


6,206 post(s)
#02-Sep-20 14:25

There's a new video on the Videos page, 5 Minute Tutorial - Fast and Easy Contours.

This is basically an update of the well-known video comparing contours in Manifold (11 seconds) to contours in Arc (20 minutes), showing just the Manifold part as re-done to use the new UI in the Transform pane. It is useful as a quick tutorial on doing contours.

You can download the data sets used in those videos, both the Manifold project as well as the original ESRI .grd file used. Those are in the Product Downloads pages either for Release 9 or for Viewer, and there are links in the videos page. The Manifold project is a 3.4 GB zipfile (unzips into a 5.5 GB map) and the .grd zipfile is around 5.5 GB, so these are big downloads and should probably be set to download overnight, to be ready for use the next day.

The Manifold project is handy when doing demos for colleagues who complain about how slow Arc launches and how slow it is to open big projects. It's fun to have a 5.5 GB project that pops open instantly where you can then show how contours can get done on it in seconds. I also like how fast the new Transform UI lets you set up contours as well... much easier than the old way.

Mike Pelletier


1,800 post(s)
#02-Sep-20 15:21

Like the comments as you step through the transform pane options!

Couple thoughts. Could the pane automatically fill in a suggested drawing and table name to save some time. Also, could an orphaned drawing tab (no associated table) on the map have some indicator (color or style) that it is orphaned. That would help when projects get many components and workflow is complex/interrupted and your wondering why this tab isn't working correctly.

adamw


9,415 post(s)
#02-Sep-20 15:38

We'll add means to autofill names for new components to the Transform pane, yes.

As to highlighting orphaned layer tabs, that's a nice idea. (Or we could auto-delete the tab that became orphaned, or make that an option.)

Mike Pelletier


1,800 post(s)
#03-Sep-20 03:26

Not a strong opinion here, but it seems to create more confusion than its worth. The option idea seems good and/or maybe by default new drawings/images created by transforms are automatically displayed in the currently opened map, unless a global option turns that off.

adamw


9,415 post(s)
#03-Sep-20 08:25

That's what we will likely do - add an option to either auto-delete or keep layers (that reference deleted components) and set it to auto-delete by default. Whoever wants to keep them will be able to set the option to do so.

The important thing here is that orphaned layers are unavoidable, there's no way not to keep them sometimes. Example: I create LAYERS.MAP and put some layers there. Then I create MAP.MAP, link LAYERS.MAP to it, create a map in MAP.MAP and reference layers from the linked LAYERS.MAP. So, we have a map in one file referencing layers in a different file. Fine, now I close MAP.MAP, re-open LAYERS.MAP and delete some layers. The map in MAP.MAP now references components that have been deleted and I cannot fix this because MAP.MAP is not even opened, nobody knows it exists. If I save LAYERS.MAP and open MAP.MAP, I have orphaned layers no matter what. Even if there was an option saying that I should have auto-deleted them - I could not. That's why it still makes sense to highlight, etc, orphaned layers regardless of anything.

Mike Pelletier


1,800 post(s)
#03-Sep-20 14:51

Makes sense and ESRI highlights layers that have broken links. One nice thing they do is that if you reconnect one layer, all the other broken links with the similar directory path get connected automatically. Might be nice if the highlighting method was the same in the map tab, as well as layer and project panes.

JPMapas
34 post(s)
#04-Sep-20 14:56

Very nice video!

HMS103 post(s)
#04-Sep-20 18:03

I'm really enjoying the approach with the new transform pane. Wouldn't make sense to enter an additional option in the transform pane for custom contour intervals?

Considering the available space in the transform pane, it could be specified under "step" with an option to select "custom" (or something similar) allowing a connection with the "VALUES clause" that, for now, needs to be specified in the query to achieve this purpose.

adamw


9,415 post(s)
#07-Sep-20 12:10

Maybe. We don't want to overload the template with one more combo for 'do you want to specify contour heights as min-max-step or as a list?', but perhaps we can just have an edit box for the list and a button that would display a dialog to produce the list for min-max-step.

HMS103 post(s)
#07-Sep-20 13:31

Thanks for taking this in consideration Adam. Since this is one of the transforms I use most regularly, my first thought was just using the "step" edit box to specify the custom intervals (with comas between steps, for instance) without much overload for the template. But this would require an additional option for choosing custom contours and would definitely contribute for a more heavy template layout. On the other hand, your suggestion seems to accomplish this "custom" purpose without compromising the template "legibility". Can't wait to see the next builds!

jsperr91 post(s)
#06-Sep-20 15:16

I downloaded the Montana.map contours project and followed along with no problems. My dual XEON had 24 threads fully saturated and generated contours in 13 seconds. However, when I tried to overlay it with either the OpenStreet map or a Google Satellite image, nothing looked right.

Flathead Lake appears in the middle of the Bitteroot Mountains. It seems Combo-start-Imgn47w115_13 2 needs to be moved south perhaps one full degree. Is the corner of the image being set in the wrong location?

I will download the ESRI .grd file and explore it further.

Attachments:
Montana Map Flathead Lake.jpg

Dimitri


6,206 post(s)
#06-Sep-20 17:59

Yes, it definitely looks off. I've reported it.

Dimitri


6,206 post(s)
#07-Sep-20 19:30

Been fixed. Download the new montana_map_v2.zip file. The image in the project is now called Combo-start-Imgn47w115_13 4.

There's a new grid file that should appear tomorrow on the site.

jsperr91 post(s)
#07-Sep-20 20:45

Excellent -- I feel it's important that these details all work to perfection when we are holding Manifold 9 up as the new gold standard that can seriously trounce ArcGIS Pro in performance.

I like it that data sets are being published for the videos so everyone can follow along and experiment with proven code and data on their own computer with a minimum of fuss.

Dimitri


6,206 post(s)
#08-Sep-20 07:48

A zip file with the new .grd has been published as well.

jsperr91 post(s)
#08-Sep-20 11:50

Thank you -- looking fine now -- found both files on the downloads page.

Just one little detail left -- the download link needs fixing on the web page in the 5 MINUTE TUTORIAL - FAST AND EASY CONTOURS.

Dimitri


6,206 post(s)
#08-Sep-20 15:06

Great eyes! It's been fixed.

StanNWT
179 post(s)
#08-Sep-20 18:50

Question on contours, specifically smoothing. I am not sure what I'm doing wrong, but I can't seem to see any difference with when smoothing is applied. Changing the tolerance value doesn't do anything and there doesn't seem to be any parameters to control the amount of smoothing. I'm comparing the smoothing options with ET GeoWizards 12. I can provide screen grabs of that interface. But it uses Beziere, B-Spline or T-Spline as different ways to smooth and you can provide values to control whether to goes through the source points or central points of a grid, or how loosely and smoothly it will make the curves. It also allows for densifying before and generalizing after the smoothing operation. I doubt the smoothing operation in Manifold does this, but there doesn't seem to be any options in the transform to control smoothing. Contouring my International Bathymetric Chart of the Arctic Ocean version 3 grid is very quick (-5500m - 0m, 5m interval), but if I can't smooth it it's not useful.

StanNWT
179 post(s)
#08-Sep-20 20:30

I just read the documentation topic: Start > Examples > Transform > Example: Smooth Lines with a Transform Expression - "Example: Smooth Lines with a Transform Expression".

Apparently "smoothing" is akin to generalizing the geometry of the line, i.e. removing vertices based on a formula. This isn't what I'm looking for, and dare I say what many may be after, perhaps not. In any event, is there a way to create a more curved version of a polyline (isoline), than what is generated from a raster grid (image)? If the user wants a more curvy line, whether that be a user defined bezier curve or a spline, or whatever, is there a way to generate this?

tjhb

9,409 post(s)
#08-Sep-20 20:42

Smooth the source raster first. (Either destructively, or making a copy.) This gives much better control than trying to smooth away detail in geometry afterwards. (Given CUDA, it's also faster and more efficient.)

Try applying a Gaussian Blur at a radius of 3, as a starting point or rough suggestion. If your data is quite noisy, perhaps add a Median filter, radius 1, before the blur.

Then make contours.

(In the Northwest Territories it may make sense to experiment on a subset of pixels first!)

StanNWT
179 post(s)
#08-Sep-20 21:13

The attached image is a screen grab from ArcGIS Desktop, showing the International Bathymetric Chart of the Arctic Ocean v3 grid. It's 30 arc seconds. in North Polar Stereographic coordinate system with a central meridian of 134W. However, the data is a custom Lambert Conformal Conic coordinate system with a central meridian of 134W. I'm contouring everything from 0 m down to -5500 m. ET Geowizards 12 is 64-bit, so it doesn't have the memory limitations of the 32-bit ArcGIS Desktop and it can create "smooth" polylines, but the iterative process to find the right balance does take time. The contour intervals I chose were: -1m, -2m, -3m, -4m, -5m, -6m, -7m, -8m, -9m, -10m, -11m, -12m, -13m, -14m, -15m, -16m, -17m, -18m, -19m, -20m, -22m, -24m, -26m, -28m, -30m, -32m, -34m, -36m, -38m, -40m, -42m, -44m, -46m, -48m, -50m, -55m, -60m, -65m, -70m, -75m, -80m, -85m, -90m, -95m, -100m, -110m, -120m, -130m, -140m, -150m, -160m, -170m, -180m, -190m, -225m, -250m, -275m, -300m, -325m, -350m, -375m, -400m, -425m, -450m, -475m, -500m, -550m, -600m, -650m, -700m, -750m, -800m, -850m, -900m, -950m, -1000m, -1100m, -1200m, -1300m, -1400m, -1500m, -1600m, -1700m, -1800m, -1900m, -2000m, -2250m, -2500m, -2750m, -3000m, -3250m, -3500m, -3750m, -4000m, -4250m, -4500m, -4750m, -5000m, -5250m, -5500m.

Yes a long contour list, and at 30arc seconds it's not a quantitatively rigorous product, but I don't have IHO bathymetric S-57 or S-2000 vector charts, nor are these charts useful across the arctic as a fused product because the individual charts isobaths don't perfectly match between charts. Therefore I'm trying to create a relatively visually pleasing product that I can use to give a reference for "visual display only", that can assist in depictions of the bathymetry especially in the near shore, hence the 1 m interval range in part of the data set.

Attachments:
IBCAO_v3_30arc_seconds_bathy_only_colouring.jpg

Dimitri


6,206 post(s)
#09-Sep-20 07:33

Do you have a link to your original data, that is, a download link for International Bathymetric Chart of the Arctic Ocean v3 grid?

Also, given that you're not discussing the video per se, it would be best to start a new thread for such topics. That way, people who are looking at the top level thread names in the forum and who are interested in "smoothing" contour lines are more likely to participate.

Also, long lists of custom contours are no problem. Two quick uses of search and replace in Notepad and you can take your list and put it into a VALUES clause for use in a query, as illustrated in this topic.

Here it is...

(VALUES (-1), (-2), (-3), (-4), (-5), (-6), (-7), (-8), (-9), (-10), (-11), (-12), (-13), (-14), (-15), (-16), (-17), (-18), (-19), (-20), (-22), (-24), (-26), (-28), (-30), (-32), (-34), (-36), (-38), (-40), (-42), (-44), (-46), (-48), (-50), (-55), (-60), (-65), (-70), (-75), (-80), (-85), (-90), (-95), (-100), (-110), (-120), (-130), (-140), (-150), (-160), (-170), (-180), (-190), (-225), (-250), (-275), (-300), (-325), (-350), (-375), (-400), (-425), (-450), (-475), (-500), (-550), (-600), (-650), (-700), (-750), (-800), (-850), (-900), (-950), (-1000), (-1100), (-1200), (-1300), (-1400), (-1500), (-1600), (-1700), (-1800), (-1900), (-2000), (-2250), (-2500), (-2750), (-3000), (-3250), (-3500), (-3750), (-4000), (-4250), (-4500), (-4750), (-5000), (-5250), (-5500))

Dimitri


6,206 post(s)
#09-Sep-20 08:02

Apparently "smoothing" is akin to generalizing the geometry of the line, i.e. removing vertices

Yes. It's really a "simplify" more than a smooth. See the entry for Reshape : smooth in the transform reference topic, Transform - Geometry : Reshape

Given the huge rearrangement of templates incident to the new UI, the topics that need to be re-written are being steadily updated, but with hundreds of topics and thousands of illustrations to be updated, that's still going to be in progress for the next few weeks, with a need to mentally translate older topics into the new UI until those topics get updated.

If the user wants a more curvy line, whether that be a user defined bezier curve or a spline, or whatever, is there a way to generate this?

Although Manifold supports curvilinear segments (circle arcs, ellipse arcs, and splines), for a variety of reasons touched on in the documentation those are generally a bad idea to use in any GIS package.

There's also nothing to stop you from using linear segments to achieve the visual effect you want. Use enough linear segments and you can get the visual appearance of any curve you want. After all, what you see on a monitor is linear segments anyway, since the display can't get any more "curved" than the size of pixels on the monitor.

What contours currently show is what your data shows. Like it or not, your data is pixelated, probably quantized to some fairly large pixel size, like 30 meters per pixel. If you're unhappy with contours that don't seem to be smoothly analog, that just means your data isn't detailed enough or smooth enough to show real world analog effects.

A smoother look is not the actual data look, because smoothing those contours means removing features that the actual data implies. If that's OK, may as well do as Tim suggests, modify the source raster, where there are very many tools to resample and to replace crisp transitions with more blurry transitions.

I think I'd start with resampling the data to, say, 1/8th the pixel size, so you have many more pixels representing the same thing. You can then play with filters like Tim suggestions to smooth out transitions. After that you can do contours, and those should end up with more vertices (since you're working with many more pixels) and will likely be "smoother" as well given the more gradual transitions between depth changes induced by the Gaussian or other filters.

adamw


9,415 post(s)
#09-Sep-20 10:07

For the future, just to be sure:

Are you looking to create contour lines that would (a) properly enclose the exact same pixels straight-line contour lines do, but (b) be curved? If so, do you want (b) for presentation or for analysis? If you want (b) for presentation - perhaps because smooth lines look better than pointy ones, correct? - would a render-time only option work? If you want (b) for analysis, what is the analysis and why smooth lines are better for it?

StanNWT
179 post(s)
#09-Sep-20 19:05

Hi Adam,

Attached is the Bezier curve smoothing result with a smoothing factor of 3 in ET GeoWizards 12. This is the thick pink isolines compared to the thinner black original contours.

Attachments:
Example_of_Bezier_Curve_Smoothing_of_Contours_ETGeoWizards12_Spet9_2020.jpg

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