[leveller] Re: Converting ESRI SHP -> LSL -> heightfield?

  • From: Ray Gardener <rayg@xxxxxxxxxxxxxxxxxx>
  • To: leveller@xxxxxxxxxxxxx
  • Date: Tue, 21 Mar 2006 16:15:50 -0800

You want to export an Illustrator file from Vectre, then open it in Illustrator and assign gray fills to each shape (white = peak, black=valley), and then import into Lev using it's Adobe Illustrator import plug-in.

Some contour plot SHP files have almost enough data, but the lines are sometimes unclosed or have gaps, or just end halfway around the hill's perimeter when their neighbouring lines squeeze them too closely. It would take a nontrivial algorithm to figure out the missing parts.

A trivial but long process I could suggest is:

- Export from Vectre to AI.
- In AI, stroke each contour line with an appropriate gray color
  indicating elevation. Stroke width should be at least 1.0.
- Convert strokes to fills.
- Save.
- Make all fills black*, save to a second AI file.
- Import first file into Leveller using AI import.
  You'll have a weird-looking set of thin irregular walls everywhere.
- Import second file using AI selection import.
- Invert selection to select non-contour-line regions.
- Run the Level Connect filter with lots of iterations.

This will fill in the flat regions to make them interpolate between the contour "walls", hopefully producing the original terrain (well, minus any details that the contour lines couldn't represent).

* or white, one of the two.

Ray


Brian Hay wrote:
Is it possible to convert ESRI SHP files to a Leveller heightfield?

I know you can convert SHP to LSL using Vectre, then import the LSL as
reference shapes into Leveller, but can this then be uused to
automatically generate a heightfield or isn't there enough data in a SHP
file to do this?



Other related posts: