1

I am using QGIS 2.18 and have plotted shapefile received from surveyor. data displays ok, now im trying to display coords of point, but the data is not in the attributes table. the xyz values appear in something called a derived table and not in the feature attributes table. when i use identify feature. the derived feature id is also different from the attributes table id number. i tried copying the feature attributes, but did not give me the derived data where the coord info resides. how can i either merge these tables or export the derived attributes table.

  • If it's just a coordinate of a point means you can create new fields (x,y,z) with appropriate length and precision. Then you can calculate x and y using the expressions $x and $y. Calculate z using expression z($geometry). Then you can label it easily using Qgis in-built functions. – Sarath SRK May 29 '18 at 4:17
  • @Gis_Boy why not post that as an answer? – lynxlynxlynx May 29 '18 at 5:24
  • I have added it as an answer! – Sarath SRK May 29 '18 at 6:26
0

You do not need to merge the tables, they are no different tables in your case, there is only one, and you do not need to export the coordinates, unless you need them somewhere else.

What you miss to know is that in GIS each vector feature has geometry data, being the point the simplest geometry data type. When you click on a geometry feature, you can have a look to the data in the attribute table and in its geometry (derivate) as in the picture below:

enter image description herein

There are vector data that might have more than a geometry feature for row in the attribute table, but it does not seem to be your case, you probably have only a geometry feature for each row. You are right at noticing that the id (id = 11 in the picture) is not the same as the feature id (feature id = 10), which is essential when you have more than a geometry feature for row.

Once this background is a clear, you can change the question to "how to display the geometry properties of each geometry feature?"

You are probably familiar to display attribute data as in the picture below. Go for the epsilon instead this time, that will lead you to the Expression dialog

enter image description here

You can find the geometry "fields" within the Geometry with a $ prefix enter image description here

Now it is time to build the expression you want on the map. It is a bit tricky, but you will find the right format. In this exampel I have used 'x = ' || round($x,2) || ' y = ' || round($y,2). If it is propery built, you will see the text in the Ouput preview. enter image description here

  • thankyou for your answer, you explain very well the difference between attributes and geometry data and how to display on a map. – michaelZ Jul 16 '18 at 4:06
3

If it's just a coordinate of a point means you can create new fields (x,y,z) with appropriate length and precision. Then you can calculate x and y using the expressions $x and $y. Calculate z using expression z($geometry).

Qgis Attribute table

Then you can label it easily using expression like this 'x = ' || "x" || ' y = ' || "y" || ' z = ' || "z" will result like the image attached below. Hope it helps for you!

enter image description here

  • thankyou for your answer on how to display coords on a map next to each point. – michaelZ Jul 16 '18 at 4:11
0

The coordinates have been converted to Geometry data type which is only machine-understandable. To show the coordinates in the attribute table, follow this process.

  • thankyou for link to other thread that explains how to extract the coords. – michaelZ Jul 16 '18 at 4:07

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.