LandXML Surface file sizes

I’m on a steep learning curve here, so forgive me if the answer to this is obvious.

I’m trying to generate a LandXML surface file to import to Emlid Flow 360. My QGIS workflow is:

  1. Generate vector layer
  2. Create TIN from vector layer
  3. Convert TIN to LandXML

The issue is that even with a modest area and modest point density the resultant LandXML file is 239MB. The limit for import to Flow 360 is 25MB.

I’m wondering if there’s a reason for the 25MB limit, and if there’s any way to “decimate” my LandXML so that it shrinks to 10% of its current size.

1 Like

LandXML can accommodate irregular TINS as well as vector points and lines so it has it’s place, however like any XML it’s a very inefficient vector file format heavily bloated with ascii text which you can’t change. This requires a lot of processing resources to interpret and particularly if your surface points are irregular. So not ideal for mobiles and probably a good reason for the size limitation.

A regular surface matrix only (with no points and lines) in raster binary format is much more efficient but in this case you don’t have the option.

You have a couple of choices, if you want to maintain the current resolution you could split your surface down into a lot of smaller chunks.

Or if you could live with resampling the surface into a coarser resolution the file size will come down considerably.

As a guide here’s an example area I just exported from Global Mapper with a 0.5m interval resulting in 139MB, and then after resampling to 1.0m intervals reducing to 34MB. And as a comparison only you can see the same regular surface at 0.5m interval as a binary GEOTIFF is only 3MB.

I don’t use QGIS but in Global Mapper it’s simple to resample on the way out in the export dialogue:

4 Likes

Thanks Wombo,

I’ve just had a look. QGIS seems to give no options to make the points more sparse - either at the TIN creation step or at the LandXML creation step.

It’s quite frustrating!

1 Like

I guess the functionality is not unexpected given QGIS is free, there is a lot of recalculating that has to occur in the interpolation.

Here’s a random sample area showing a regular TIN at 0.5m:

And the same area & zoom showing the result of the TIN down sampled to 1.0m:

If you want to make the data available I could try attacking it here. You can message me, I’m just down the road from you.

3 Likes

Thanks - message on its way

Hi @MikeH,

@Wombo is correct. We set the limit to 25MB as rendering and processing them on mobile phones would require a huge computational power. Resampling the data and using a smaller resolution would help in this case.

I’ll take note of increasing the file size limit as a feature request. :slight_smile:

3 Likes

Thank you Ruth,

The other and perhaps better alternative for a feature request is for Emlid Flow 360 to conduct the resampling :blush:

The workflow would be to submit a LandXML which is too big - such as my example and for Emlid Flow 360 to resample on import.

Not knowing the file format of LandXML I don’t know whether that’s feasible…or whether Studio is the better place for that re-sampling. However the background conversion features in Studio are so nice, that something similar for LandXML would be perfect.

1 Like

What is your base data? A raster or vector points? I use QGIS daily and if starting from a raster, I would just resample the raster to the final GSD before vectorizing it. If I was going from points, I would rasterize it, resample, then revectorize it.

1 Like

Sounds to me the LandXML file format is HIGHLY inefficient. It’s just a 3D vector mesh file?

Is there another native file format that would be more efficient vs just bloated?

Can you decimate or prepare the surface in Civil3D or use other software to decimate it?

How many acres is that surface? I’ve worked on 100’s of acres and never seen one that big. Sounds like it needs some optimization. Have you thought about breaking it into zones?

2 Likes

Probably the entire continent of Australia. :crazy_face:

Hello Michael

It’s about 3.3ha from memory.

1 Like

I haven’t got a tool like Civil3D unfortunately. I agree about the inefficient file format.

I’ll have another crack at it in a few hours, see if I can shrink the file.

1 Like

Can Flow Surface just not import a pile of exported .csv points and generate the TIN Surface to work from??? Or is it strictly only LandXML currently?

1 Like

What content is in the file? You really only need the perimeter and trimesh. I think they made a change that you may not need the perimeter and it will represent just the triangles present. You don’t really need points, contours, breaklines and etc… If you want to see contours I wonder if that could be pulled through as a shapefile?

1 Like

Thanks Gabriel,

The base data is an orthophoto vectorised to contours then to TIN mesh then to LandXML. This process because mesh creation AFAIK proceeds only from a vector and LandXML creation proceeds only from a mesh…

The issue I think is that the TIN mesh creation involves interpolation as best I understand it and appears not to offer great control of that process. I think it’s in creation of the mesh, and the interpolation process, that the problems begin.

1 Like

My example above was around 20ha, exporting 3.5ha at 0.5m resolution (TIN only, no points, contours or lines) results in an xml of 22.7MB

2 Likes

So I generated data from a new site today. I clipped a very small area of the site (6212 square metres) and generated a TIN - and following @michaelL advice generated only vertices.

Despite several attempts it appears that the “floor” for LandXML file size is 37MB.

1 Like

It’s got to be a QGIS quirk, I just sent you a sample 6212 m2 at 0.5m resolution that exported out of Global Mapper as a LandXML of only 365KB.

These files are ascii text so you can view the contents in any text editor, it might show up some differences between the files.

Otherwise hurl your contours this way and I’ll have a go.

1 Like

When you say 0.5m resolution do you mean the file is basically gridded at 0.5m or is that an average and small grade breaks like swales and curb are preserved? It will be interesting to hear @MikeH resolution requirements because that is way too sparse for what we do. Our models are configured for Survey layout so there can be a lot of fine detail required in areas for accurate cut/fill analysis.

2 Likes