[Qgis-user] Field Calculator Get lon values of points

Alex Mandel tech_dev at wildintellect.com
Mon Apr 28 20:29:03 PDT 2014


On 04/28/2014 06:54 PM, Leo Kris Palao wrote:
> Dear QGIS users,
> 
> Good day!
> 
> I want to get the longitude and latitude coordinate values of my points. I
> used Geometry > $x and Geometry > $y to derive longitude and latitude of my
> points. It give me correct values but when I exit editing mode the values
> were rounded to whole number. For instance:
> 
> my Lon values is 95.94592 but when I exit editing mode this value is
> converted to 95.00000
> 
> Thanks in advance for any help.
> 
> -Leo

New field or existing field?
Hopefully with a new field you picked Text, and changed the maximum
width. That is assuming you wanted to get 38.345 95.945 etc
If you wanted to fields, then use Decimal Number(real), and do each one
at a time. Now when you pick real, you have set the Precision. Precision
is the number of values after the decimal (to the right). Typical GIS is 8.

So to store 1 coordinate:
Decimal Field (real)
Width 12
Precision 8

Now if it's an existing field, just make a new field because it sounds
like the old field isn't set right.

If that doesn't help, can you tell use what version of QGIS and what
operating system(including version).

Thanks,
Alex




More information about the Qgis-user mailing list