Small bug, how should we store GPS coordinates?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Small bug, how should we store GPS coordinates?

prculley
At the moment, Gramps stores the GPS coordinates as strings, as the user typed them.

Gramps has a parser which is used to validate and convert several possible source formats to that needed for the application (like in Maps view).  The Place views always get converted to Degrees/Minutes/Seconds with leading N, S, E, W characters (which are translated to language specific characters).

The parser accepts several formats, and will accept the NSEW characters for either the local language, or the English characters.

Which leads to the problem (bug).  If the user enters the non-English characters, they get stored that way, and are also exported in the XML format.  If the XML is imported into Gramps running in another language, the coordinates are not recognized.  We currently have no way to correct this if it happens.

Should we fix this?
a) no, not likely to occur, XML is rarely shared to a foreign language user.

b) yes, we should store and export a single fixed format, possibly Floating point Degrees with '-' as necessary.

If 'b', we could use the Enhanced places GEPS opportunity to also upgrade users GPS data to match the chosen format.

Is there any reason to have a GPS coordinate 'Displayer' to allow users to chose how to look at the coordinates?

Paul C.


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Small bug, how should we store GPS coordinates?

StoltHD
I always use Gramps in Both Native and English version on the same (or different) computers (Windows 10), I Mostly just copy the database if needed to move it to another computer, but I think an universal value when stored would be the best way to do it.

I often also have one or two VM with databases and Gramps (or other software) installed, using the xml for other purposes than importing to Gramps might be something other than me do... i.e. importing to or from research databases for mapping purposes og knowledge graphs... until you decide if you are going to change the Blobs to json object or extra tables, there are no easy way to get structured Gramps data than the xml, the csv must be edited to be used in most software (multiple tables in same file is not something many software support)...

Just my opinion...

Jaran

tir. 1. okt. 2019 kl. 19:18 skrev Paul Culley <[hidden email]>:
At the moment, Gramps stores the GPS coordinates as strings, as the user typed them.

Gramps has a parser which is used to validate and convert several possible source formats to that needed for the application (like in Maps view).  The Place views always get converted to Degrees/Minutes/Seconds with leading N, S, E, W characters (which are translated to language specific characters).

The parser accepts several formats, and will accept the NSEW characters for either the local language, or the English characters.

Which leads to the problem (bug).  If the user enters the non-English characters, they get stored that way, and are also exported in the XML format.  If the XML is imported into Gramps running in another language, the coordinates are not recognized.  We currently have no way to correct this if it happens.

Should we fix this?
a) no, not likely to occur, XML is rarely shared to a foreign language user.

b) yes, we should store and export a single fixed format, possibly Floating point Degrees with '-' as necessary.

If 'b', we could use the Enhanced places GEPS opportunity to also upgrade users GPS data to match the chosen format.

Is there any reason to have a GPS coordinate 'Displayer' to allow users to chose how to look at the coordinates?

Paul C.
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Small bug, how should we store GPS coordinate

GRAMPS - Dev mailing list
In reply to this post by prculley
There is an extra idiosyncracy. Since the format is stored with each set of coordinates, the format varies from place to place... or even within string itself.

As an extreme example, use the Place Editor to parse Lat/Long string:
40°48'44.25"N,-79.4645390988655

Format is parsed with results mixed having Degree format in the Latitude & decimal in the Longitude. And the next time the user returns to that place, it will be the same.  

Fortunately (!?), the Place Category View & Details Gramplet parse the string and arbitrarily override with the Degrees format.

But the PersonEverything report just regurgitates the stored mixed format. (Albeit with the line labeled "Latitude,Longitude" yet the ordered pair values printed in the inverse order of longitude, latitude !) 

-Brian

On Tue, Oct 1, 2019 at 12:18, Paul Culley
At the moment, Gramps stores the GPS coordinates as strings, as the user typed them.

Gramps has a parser which is used to validate and convert several possible source formats to that needed for the application (like in Maps view).  The Place views always get converted to Degrees/Minutes/Seconds with leading N, S, E, W characters (which are translated to language specific characters).

The parser accepts several formats, and will accept the NSEW characters for either the local language, or the English characters.

Which leads to the problem (bug).  If the user enters the non-English characters, they get stored that way, and are also exported in the XML format.  If the XML is imported into Gramps running in another language, the coordinates are not recognized.  We currently have no way to correct this if it happens.

Should we fix this?
a) no, not likely to occur, XML is rarely shared to a foreign language user.

b) yes, we should store and export a single fixed format, possibly Floating point Degrees with '-' as necessary.

If 'b', we could use the Enhanced places GEPS opportunity to also upgrade users GPS data to match the chosen format.

Is there any reason to have a GPS coordinate 'Displayer' to allow users to chose how to look at the coordinates?

Paul C.
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel

Untitled Download Attachment
Untitled (230 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Small bug, how should we store GPS coordinates?

Nick Hall
In reply to this post by prculley
On 01/10/2019 18:18, Paul Culley wrote:
> b) yes, we should store and export a single fixed format, possibly
> Floating point Degrees with '-' as necessary.
>
> If 'b', we could use the Enhanced places GEPS opportunity to also
> upgrade users GPS data to match the chosen format.
>
> Is there any reason to have a GPS coordinate 'Displayer' to allow
> users to chose how to look at the coordinates?
>
Using signed decimal values for latitude and longitude seems like a good
option to me.

It probably isn't necessary to offer different display formats.

The place editor would only need one validated input field accepting all
current input formats.  It could be populated using the display format.

I'm not sure how we would handle invalid data during the upgrade.


Nick.




_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel