I got a DXF file with some height data which I can easly open in QGIS, the problem is when I import it to QGIS is that the "float" is separated from it's Integer. Instead of one point with 4.8 is there two points one with 4 and one with 8. And those points that is 5.0 does not have its "float" and is just "5". Like this:

Visualizing the data

Is there any tool in QGIS that I can use to combine the float and integer? The "float" is approximativ 1.7m south east of the integer.

  • 1
    There's the nearest neighbor join plugin, but I don't think it will distinguish between float points and integer points. So a point pair with values 3 and 7 will combine as 3,7 and 7,3. It looks like the float is always a offset by the same distance in the same direction, so maybe you can use the wedge_buffer() function with the intersects() function to figure out which points are floats and which are integers. – csk Apr 12 at 18:09

Thanks for the comment!

To solve this problem, I first used the NNJoin plugin and joined all nearest neighbor. The "problem" is that also the points without the float got a joined value, to solve this I used the wedge buffer algoritm where I "targeted" the integer part (NW). Img1 Now I used select by location and selected all "integer parts" so in the picture above the 5 close to 2 was selected but not the single 5 bellow. Then I updated the selected features of that layer and created a new column "not_int" and set it to 1.

Now I wanted to remove all "float" points so then I created a new wedged buffer (SE) and select by location with the new buffer. Then I deleted all selected rows.

Finally I updated the remaining point with this case statement CASE WHEN not_int THEN to_real("Height" +'.'+ "join_Height") ELSE to_real("Height") END

With this result: img2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.