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

Leo Kris Palao lk.palao at gmail.com
Mon Apr 28 22:23:55 PDT 2014


Hi Alex,

Thanks for you comment. I have already solved the issue. When I first
created the field I set the width to 3 and precision to 5 - this is where
my values were rounded to whole number. But when I tried it the second
time, I leave the width to its default value of 12 and adjusted the
precision to 5 my value were not rounded (i got the correct values). The
width supposed to be the number of characters for the integer and precision
is the decimal places.

Thanks,
-Leo


On Tue, Apr 29, 2014 at 11:29 AM, Alex Mandel <tech_dev at wildintellect.com>wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140429/406f306e/attachment.html>


More information about the Qgis-user mailing list