Coordinate Converter 

Extension key

byt_coordconverter

Package name

brotkrueml/coordconverter

Version

main

Language

en

Author

Chris Müller

License

This document is published under the Creative Commons BY 4.0 license.

Rendered

Tue, 03 Mar 2026 18:05:57 +0000


This TYPO3 extension converts geospatial coordinates from the degree notation into other formats via a Fluid view helper.


Table of Contents:

Introduction 

What does it do? 

The extension converts spatial geo coordinates (latitude and longitude) from the degree notation to other output formats with the help of a Fluid view helper.

Example:

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   outputFormat="degreeMinutesSeconds"
 />
Copied!

The result is:

N 49° 29' 13.59960", E 8° 27' 58.60080"
Copied!

Currently supported are the formats:

  • Degree
  • Degree with minutes
  • Degree with minutes and seconds
  • UTM (Universal Transverse Mercator)

Installation 

Target group: Administrators

The recommended way to install this extension is by using Composer. In your Composer-based TYPO3 project root, just type

composer req brotkrueml/coordconverter
Copied!

and the latest stable release will be installed.

In a classic installation, you can also install the extension from the TYPO3 Extension Repository (TER).

Usage 

Target group: Integrators, Developers

General 

After installation you can use the coordinate converter view helper in every Fluid template. The namespace is set to cc, the basic usage:

<cc:coordinateConverter latitude="49.487113" longitude="8.466284"/>
Copied!

The output is:

N 49.48711°, E 8.46628°
Copied!

The view helper arguments 

The following arguments are available:

latitude

latitude
Type
float
Required

true

Possible values
+90.0 to -90.0

The latitude: a positive value is north, a negative value is south.

longitude

longitude
Type
float
Required

true

Possible values
+180.0 to -180.0

The longitude: a positive value is east, a negative value is west.

outputFormat

outputFormat
Type
string
Possible values
degree, degreeMinutes, degreeMinutesSeconds, UTM
Default
degree

The output format of the coordinates.

Example: Degree/minutes notation

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   outputFormat="degreeMinutes"
/>
Copied!

The output is:

N 49° 29.22666', E 8° 27.97668'
Copied!

Example: Degree/minutes/seconds notation

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   outputFormat="degreeMinutesSeconds"
/>
Copied!

The result is:

N 49° 29' 13.59960", E 8° 27' 58.60080"
Copied!

Example: UTM (Universal Transverse Mercator) notation

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   outputFormat="UTM"
/>
Copied!

The result is:

32U 461344 5481745
Copied!

cardinalPoints

cardinalPoints
Type
string
Default
N|S|E|W

Results for the cardinal points, separated by |. The argument has no effect in output format UTM.

Example: Use full cardinal point name

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   cardinalPoints="North|South|East|West"
/>
Copied!

The result is:

North 49.48711° / East 8.46628°
Copied!

Example: Use German abbreviations

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   cardinalPoints="N|S|O|W"
/>
Copied!

The result is:

N 49.48711° / O 8.46628°
Copied!

cardinalPointsPosition

cardinalPointsPosition
Type
string
Possible values
before, after
Default
before

Position for the cardinal points. The argument has no effect in output format UTM.

Example: Move cardinal point position to the end

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   cardinalPointsPosition="after"
/>
Copied!

The result is:

49.48711° N, 8.46628° E
Copied!

numberOfDecimals

numberOfDecimals
Type
int
Possible values
>= 0
Default
5

Number of decimals for the result. The argument has no effect in output format UTM.

Example: Show three decimals

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   numberOfDecimals="3"
/>
Copied!

The result is:

N 49.487°, E 8.466°
Copied!

removeTrailingZeros

removeTrailingZeros
Type
bool
Default
0

Set to 1 to remove trailing zeros in a coordinate. The argument has no effect in output format UTM.

New in version TYPO3 v13.3

The boolean variables {true} and {false} can also be used instead of 0 and 1.

Example: Show trailing zeros (the default)

<cc:coordinateConverter
   latitude="49.48710"
   longitude="8.46600"
   removeTrailingZeros="1"
/>
Copied!

The result is:

N 49.4871°, E 008.466°
Copied!

delimiter

delimiter
Type
string
Default
,

The delimiter between latitude and longitude. The argument has no effect in output format UTM.

Example:

<cc:coordinateConverter
   latitude="49.487111"
   longitude="8.466278"
   delimiter=" / "
/>
Copied!

The result is:

N 49.48711° / E 8.46628°
Copied!

Using the XML Schema (XSD) for validation in your template 

It is possible to assist your code editor on suggesting the tag name and the possible attributes. Just add the cc namespace to the root of your Fluid template:

<html
   xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
   xmlns:cc="http://typo3.org/ns/Brotkrueml/Coordconverter/ViewHelpers"
   cc:schemaLocation="https://brotkrueml.dev/schemas/byt_coordconverter-3.0.0.xsd"
   data-namespace-typo3-fluid="true"
>
   ...
</html>
Copied!

The relevant part is the namespace declaration ( xmlns:cc="http://typo3.org/ns/Brotkrueml/Coordconverter/ViewHelpers"). The content of the cc:schemaLocation attribute points to the recent XSD definition.

You can also import the XSD file into your favorite IDE, it is shipped with the extension. You can find the file in the folder Resources/Private/Schemas/.

Upgrading 

From version 2 to version 3 

The support for PHP 7.0-7.3 and TYPO3 v8 LTS was removed. No other breaking changes.

From version 1 to version 2 

Version 1.0 is available for TYPO3 v7 LTS, version 2.x works with TYPO3 v8+. The following breaking changes were made:

  • The declaration of the cc namespace in the Fluid template to use the view helper is not needed anymore as it is bound to the extension.
  • The namespace of the PHP classes changed to \Brotkrueml\BytCoordconverter. This shouldn't harm you as the declaration of the Fluid namespace is not needed anymore.

Changelog 

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased 

3.4.0 - 2025-12-01 

Added 

  • Compatibility with TYPO3 v14

Removed 

  • Compatibility with TYPO3 v11

3.3.0 - 2024-09-17 

Added 

  • Compatibility with Fluid 4

3.2.0 - 2024-02-11 

Added 

  • Compatibility with TYPO3 v13

Removed 

  • Compatibility with TYPO3 v10

3.1.0 - 2022-10-08 

Added 

  • Compatibility with TYPO3 v12

Removed 

  • Compatibility with TYPO3 v9

3.0.0 - 2020-12-26 

Added 

  • Compatibility with TYPO3 v11

Removed 

  • Compatibility with TYPO3 v8
  • Compatibility with PHP < 7.4

2.1.3 - 2019-10-02 

Added 

  • Compatibility with TYPO3 v10

2.1.2 - 2019-07-27 

Added 

  • Compatibility with TYPO3 v10.0

2.1.1 - 2019-07-09 

Fixed 

  • Missing composer.json

2.1.0 - 2019-07-09 

Added 

  • Documentation reStructuredText format

2.0.0 - 2018-11-10 

Added 

  • Compatibility with TYPO3 v8 LTS and TYPO3 v9 LTS
  • XSD schema for view helper

Changed 

  • PHP namespace
  • Manual declaration of Fluid namespace "cc" not needed anymore
  • View helper parameter "showErrors" removed

Removed 

  • Compatibility with TYPO3 v6 LTS and TYPO3 v7 LTS

1.0.5 - 2015-11-11 

Added 

  • Compatibility with TYPO3 v7.6 LTS

1.0.4 - 2015-05-02 

Added 

  • Compatibility with TYPO3 v7.2

1.0.3 - 2015-04-06 

Added 

  • Compatibility with TYPO3 v7.1

1.0.2 - 2014-04-18 

Added 

  • Compatibility with TYPO3 v6.2

Fixed 

  • Add space between degree and minutes

1.0.1 - 2013-12-28 

Fixed 

  • Respect removeTrailingSpaces correctly
  • Remove double htmlspecialchars()

1.0.0 - 2013-12-14 

Initial release