Message Boards Message Boards

Increase GeoPosition precision from WDF Location Interpreter?

Posted 5 years ago

I have been using Mathematica V12 to plot breadcrumb coordinates from a GPS tracker. I convert these to GeoPositions using the Interpreter function, as shown in the code snippet. However, the Location Interpreter seems to have a fixed precision which is too coarse: I need 4-5 digits after the decimal point, and the returned GeoPosition has a precision of 1-2 digits.

I don't see an option or other handle to change the precision here. Anyone run into this?

Interpreter["Location"]["(36.3322280727381,-108.913240371752)"]

GeoPosition[{36.4167, -108.901}]

Attachments:
POSTED BY: Steve Rector
4 Replies

Nice, even better than dealing with the arrays.

POSTED BY: Estevao Teixeira
Posted 5 years ago

So here's how to do this for arrays of coordinates:

SetPrecision[ Interpreter[ "GeoCoordinates"][{"(36.3322280727381,-108.913240371752)", "(37.332280727381,-106.91320371752)"}], 9]

{GeoPosition[{36.3322281, -108.913240}], GeoPosition[{37.3322807, -106.913204}]}

Attachments:
POSTED BY: Steve Rector
Posted 5 years ago

Hello Estevao:

Thank You! - Yes that does the job, and I was unaware of a precision operator of that form. Strangely, the same operator does not work when I use it for "Location".

With breadcrumbs, I'll have a large array of coordinates, for which I'll need to append this operator to each element. However I'm sure Mathematica has a way to handle such an array operation.

Thanks again,

Steve

POSTED BY: Steve Rector

Hey Steve, how are you? I tried some things here.. and I found that you can change the interpreter to GeoCoordinates and set the precision using `x (x = the precision number) after the latitude and longitude. Look the example:

Interpreter["GeoCoordinates"]["(36.3322280727381`11,-108.913240371752`11)"]

enter image description here

POSTED BY: Estevao Teixeira
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract