mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Allow more flexible GPS coordinates for CSV import
This theoretically allows one to use format like 1°36'11.711"N 124°46'00.368"E for GPS coordinates. However, in practice this is not allowed without properly parsing this format in C/C++ side. This patch changes the export format to UTF8 and improves the location import by allowing either gps or location attributes to be imported. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
18159b6265
commit
54d8cee3d8
1 changed files with 9 additions and 7 deletions
|
@ -19,7 +19,7 @@
|
|||
<xsl:param name="notesField" select="notesField"/>
|
||||
<xsl:param name="weightField" select="weightField"/>
|
||||
<xsl:param name="dateformat" select="dateformat"/>
|
||||
<xsl:output method="xml" indent="yes"/>
|
||||
<xsl:output method="xml" encoding="utf-8" indent="yes"/>
|
||||
|
||||
<xsl:variable name="lf"><xsl:text>
|
||||
</xsl:text></xsl:variable>
|
||||
|
@ -166,9 +166,9 @@
|
|||
|
||||
<divecomputerid deviceid="ffffffff" model="csv" />
|
||||
|
||||
<xsl:if test="$locationField >= 0">
|
||||
<xsl:if test="$locationField != '' or $gpsField != ''">
|
||||
<location>
|
||||
<xsl:if test="$gpsField >= 0">
|
||||
<xsl:if test="$gpsField != ''">
|
||||
<xsl:attribute name="gps">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$gpsField"/>
|
||||
|
@ -176,10 +176,12 @@
|
|||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$locationField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="$locationField != ''">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$locationField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</location>
|
||||
</xsl:if>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue