[Qgis-user] Field Calculator Get lon values of points
Leo Kris Palao
lk.palao at gmail.com
Tue Apr 29 17:28:08 PDT 2014
Thanks Alex, it cleared some of my questions. Before I thought that the
width is only for the integer and do not consider the number of decimal
places.
-Leo
On Wed, Apr 30, 2014 at 12:22 AM, Alex Mandel <tech_dev at wildintellect.com>wrote:
> Close, I believe width is total number of characters. And yes precision
> is just the number of characters to the right of the decimal.
> so 12 w 5 p means 7char.5char
> Which is why I suggested 12 w 8 p
> -120.12345678
> 38.12345678
>
> I don't recall if a negative counts as a char, I don't think it does on
> a real. 8 after the decimal is a common amount of precision, the last
> couple of digits take you down to meter/submeter. I'd have to look up
> exactly where it gets you I don't recall right now.
>
> Thanks,
> Alex
>
> On 04/28/2014 10:23 PM, Leo Kris Palao wrote:
> > 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
> >>
> >
> >
> >
> > _______________________________________________
> > Qgis-user mailing list
> > Qgis-user at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-user
> >
>
>
--
*LEO KRIS MARIANO PALAO*
Social Sciences Division
International Rice Research Institute
Website: www.irri.org
Mobile #: 0932-847-6644
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140430/2ead0777/attachment.html>
More information about the Qgis-user
mailing list