Jump to content
GMS, SMS, and WMS User Forum

Different Ways to Generate map -> 2dmesh

Recommended Posts

Hello All,

Short Version:

Am currently trying out the different in SMS included automatic mesh generators. Is there a method which does take polygons, points & 'dangling' arcs and then, given min and max size for vertex length, generates a mesh (if necessary, also interpolates vertices on arcs)?

Long version:

I'm currently using SMS 10.1.11 to generate a mesh and have a couple of days to compare different ways of generating the mesh.


SMS 10.1.11 64bit


Want to generate a mesh from lines given in a resp. several shapefile(s). This includes a closed line around the whole area (polygon) and a combination of 'dangleing' (line starts on some polygon border and ends somewhere inside) and closed (forming sub-polygons) lines (resp. feature arcs, once they are converted to Map Data).

The 'classic' way is to dot the lines in GIS and combine it with a background raster of a premediated node distance. It works, but does easily result in 'ugly' structures next to given lines.

So I tried the different auto-meshing algorithms SMS offers:

- none

Only useful in the 'classic' case.

- patch

Fails with "overlapping elements". Seems to be connected to difficulties in generating the polygons from feature arcs (need to run 'generate polygons' several times to convert all areas).

- paving

Works, put does not offer the ability to set min or max size of elements. Which results in a rather 'ugly' mesh when run on the given feature arcs. When nodes get uniformly respaced along feature arcs, SMS either generates a mesh of uniformly sized elements (which do get computationally expensive) or crashes.

- scalar paving density

Does not work unless anything 'dangling' is removed beforehand. Then it does construct rather nice meshes of (a predetermined) variable element-size.

- existing nodes

not tried, but does not sound useful in this case.

Is there an algorithm included in SMS which generates meshes like scalar paving density, but takes into account any 'dangleing' arcs and any given points?

Thanks for your help,

S. Berendsen

Link to post
Share on other sites

There are a couple of issues related to this mapping. The first is internal arcs/nodes and the second is the dangling arcs you mention.

As you observed, version 10.1 does not always honor all of these internal features. Nodes could be included as refine points, and internal arcs would just be forced into the mesh after the generation. Admittedly, this results in some poorly shaped elements.

In version 11.0 and the soon to be released 11.1, SMS now honors internal features as starting points for paving and scalar paving. This means that as long as the internal features (or dangling arcs) are not interfering with each other, the spacing specified at these locations are based on either the spacing on the arc (paving) or the size function being used (scalar paving).

There may still be some cases where dangling arcs are not handled as cleanly as they should be. This is an area that will continue to be evaluated and improved.

If you have suggestions for how a min/max size specification could be implemented other than the two approaches SMS uses now (spacing on arcs and size function), I would welcome additional discussion.

If you have test cases that you are using to evaluate these features I would be interested in looking at them with you.

Link to post
Share on other sites

Thanks for the quick answer.

It does sound like I'll have to take 11.1beta2 for a testdrive ... as the company I'm with is in the EU, is it better to contact a local reseller for a 30 day trail licence or can I just use the form on your webpage?

Unluckily I cannot provide you a test case as the data is owned by one of our customers.

Using GIS, I basically digitised or adjusted lines to features that I want included in the model. You can easily construct yourself a similar case:

  1. Download OpenStreetMap Vector data for an area
  2. Create a polygon around the area you want to mesh
  3. Try the different mesh creation options
  4. (you might have to add some DEM data)

A suggestion: The UI in 10.1 for these options is too hidden - it took a good half hour+ from finding references to "scalar paving" in the online help to finding the options dialog for them. I expected to find links for it in the menu-bar or in one of the toolboxes, but apparently you can only reach them via right- or double-click on polygons in the map dialog (nice thinking of being able to set them for each polygon indivually, though).

The only suggestion for improvement I can think of currently seems to be a slightly modified paving method:

- give a line-shapefile with a table filled with the 'dotting'-distance along a line

- given a min and max element size, start dotting:

  • start on the line with the least dotting-distance
  • redistribute resp. create nodes along the line in such a way that the nodes already present are included (it is, I guess, adaptive interpolation)
  • go on to the next-least-distance line and repeat, but with the added restriction that no existing points should be any nearer than the ones already present
  • continue until every line has been dotted
  • ...
  • compute for each point the nearest distance to each neighbour
  • now generate the rest of the points - new distance to old points always about nearest distance of existing points * max. relax factor (sounds like scalar paving)
  • generate mesh elements
  • identify long and thin triangles
  • see whether any added points inside the long & thin triangles can create more regular ones. If so, insert them into the mesh and remesh the addected triangles

Hope this can help a wee bit.


S. Berendsen

Link to post
Share on other sites

Thanks for the eval licence. I've played around a wee bit with both 11.0 and 11.1.beta2:

- As you stated, both version do try and take extra nodes and dangling arc into account.

- Scalar Density Paving forces a vertex redistribution along polygon arcs. Is it possible to switch this off?

- The max element size in Paving is determined by the max vertex distance of the surrounding polygon. Short of putting a couple of nodes with a certain relax factor in each polygon, is it possible to set another max. element size?


- As the statusbar displays the currently worked on polygon id when generating a mesh, how can I determine the corresponding polygon?

Didn't notice that SMS displays the polygon id in the status bar, duh.


If I manage to create a decent test case, I'll send it over.

Thanks again.

Edited by berendsen
Link to post
Share on other sites
  • 2 weeks later...

There is currently no way to turn off the vertex redistribution along polygon arcs when scalar paving is specified. This could be added, but if the original distribution is not compatible with the size function, poor elements could result. That would put more responsiblity on the shoulders of the modeler.

The max element size in paving is limited to the maximum spacing of vertices. You could create a scatter set from the boundary points and use the spacing along the edges as a size function, but that seems convoluted. If you can describe the feature you are requesting in more detail, it may not be too dificult to add.

You can also select a polygon by id to see where it is.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...