Solved

How to manage converting unclassified XYZ to Minecraft?


I'm trying to convert XYZ point cloud to DEM so I can generate a Minecraft world. After searching and reading "How to make Minecraft worlds" article I saw the Norway example (las2MinecraftFMEpediais workbench) by @dmitribagh similar to what I'm trying to implement, unless it is using classification attribute values (e.g. 2 for ground, or 5 for vegetation), while my XYZ point cloud doesn't have these attribute values.

In the Norway example, the point cloud has another classification attribute values for water (9 or 18), while the one I have has no points for water or spaces under bridge for example. I'm attaching a picture of my dataset in the FME inspector.

How could that XYZ be used to make a Minecraft world out of it?

Appreciate any advice or suggestions. Thanks

icon

Best answer by hanie 10 November 2016, 16:08

View original

4 replies

Userlevel 5
Badge +25

You could try using your entire point cloud as "ground", but that would not give you a true model of your terrain: your point cloud contains vegetation, bridges, buildings etc but there's no way to differentiate them.

So unless you can find a way to classify your point cloud it looks like you're out of luck.

As a quick guess, I would coerce the point cloud to points using the PointCloudCoercer. Create two output connections from there; one goes to a HullReplacer to create a polygon of the outline of the data, the other to a BoundingBoxReplacer to create a polygon of the extents of the data. Then use a Clipper to clip the data outline with the data extents, and what falls 'outside' should be the missing area of your point cloud.

That area you could turn back into a point cloud - with a Z of zero - and write to Minecraft. That way you'd have a complete Minecraft model.

However, as @redgeographics said, it will just be a model of the highest Z values. You won't be able to specify block type in Minecraft unless you can determine which feature a point represents.

The best chance is to look at the number of returns - where there are multiple return values for a point the lowest Z will be the ground level, and it's reasonable to assume the highest represents vegetation. You might also pick out buildings or structures by looking for points with a Z value considerably higher than its neighbor (ie a near vertical slope) - though I'm not really sure how you would do that.

Hope this helps.

As a quick guess, I would coerce the point cloud to points using the PointCloudCoercer. Create two output connections from there; one goes to a HullReplacer to create a polygon of the outline of the data, the other to a BoundingBoxReplacer to create a polygon of the extents of the data. Then use a Clipper to clip the data outline with the data extents, and what falls 'outside' should be the missing area of your point cloud.

That area you could turn back into a point cloud - with a Z of zero - and write to Minecraft. That way you'd have a complete Minecraft model.

However, as @redgeographics said, it will just be a model of the highest Z values. You won't be able to specify block type in Minecraft unless you can determine which feature a point represents.

The best chance is to look at the number of returns - where there are multiple return values for a point the lowest Z will be the ground level, and it's reasonable to assume the highest represents vegetation. You might also pick out buildings or structures by looking for points with a Z value considerably higher than its neighbor (ie a near vertical slope) - though I'm not really sure how you would do that.

Hope this helps.

Ideally you wouldn't have to coerce the source data into points, but I don't think you can use a point cloud as a Clipper feature (only a Clippee).

I managed to classify the point cloud using LasTools custom transformers in FME (lastools.lasnoise, lastools.lasgroud, lastools.lasheight, lastools.lasclassify respectively).

See the article Command Line Tools Integration by @dmitribagh

Having the point cloud classified in Ground, Vegitation and Buildings I splitted them by the PointCloudLASClassifier transformer. This enabled me to transform Class-2 into DEM (using RasterDEMGenerator), Class-5 into high vegetation, and class-6 into 3D buildings (by claculating the difference between Min and Max Z values for extrusion). Then I applied proper block-ID for all point cloud features as well as additional OSM layers (streets, rivers, lakes, railways) to get the final Minecraft world as shown in the attached picture.

Thanks @dmitribagh for the support.

Reply