× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mihael,

unless I completely overlooked something, I don't think there's a
yajl_get_float procedure. I could be mistaken, though.

Peter

--

Peter Colpaert

Peter.Colpaert@xxxxxxxxx


Op wo 19 okt. 2022 om 21:01 schreef Mihael <mihael@xxxxxxxxxxxxxx>:

+1

and this value is obviously a float so why don't you use the float data
type.


On 19.10.22 20:58, Charles Wilt wrote:
Are you sure you really need the 14 decimal places?


- The *ninth decimal place* is worth up to 110 microns: we are
getting
into the range of microscopy. For almost any conceivable application
with
earth positions, this is overkill and will be more precise than the
accuracy of any surveying device.
- *Ten or more decimal places* indicates a computer or calculator was
used and that no attention was paid to the fact that the extra
decimals are
useless. Be careful, because unless you are the one reading these
numbers
off the device, this can indicate low quality processing!


from:

https://gis.stackexchange.com/questions/8650/measuring-accuracy-of-latitude-and-longitude/

Charles

On Wed, Oct 19, 2022 at 7:14 AM Peter Colpaert <peter.colpaert@xxxxxxxxx

wrote:

Hi group,

I've been tasked with refactoring some API calls from our system to
various
websites and am implementing Scott Klement's excellent YAJLR4 service
program (thanks Scott!)

However, I'm a bit at a loss as to how I can extract coordinates from a
JSON file I receive.

More specifically, the latitude and longitude are represented as
follows:

"Location": {
"Lat_WGS84": 51.17456057389046,
"Lon_WGS84": 4.3991863572532086,
"X_Lambert72": 152128.06,
"Y_Lambert72": 207173.33
}

I can successfully find the Lat_WGS84 and Lon_WGS84 nodes, but I cannot
retrieve the full coordinates.

If I use yajl_get_string, it returns nothing (of course), but
yajl_get_number is truncated to 9 decimals whereas I need 14.

I could of course treat the JSON response as a string and simply scan
for
the first occurrence of "Location", but that would defeat the purpose of
having YAJL available.

Any suggestions?

Thanks in advance.

Peter

--

Peter Colpaert

Peter.Colpaert@xxxxxxxxx
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.