Skip to main content

Formats for coordinates

Contents

Trimble Maps APIs accept coordinates in several formats. Coordinates are passed into APIs as longitude followed by latitude—the reverse of the order typically used in prose, where latitude comes first.

If a route, geocode, or geofence lands in the wrong hemisphere or ocean, coordinate order is the first thing you should verify.

This guide explains how to pass coordinates in each format.

Overview

Pass coordinates with six decimal places for greatest accuracy.

Format Order Example
REST query pair lists (stops, reverse coords, map corners, currentLonLat) longitude, latitude -75.173297,39.942892
Two-element arrays (GeoJSON, geofence ShapePoints, many path arrays) [longitude, latitude] [-75.173297, 39.942892]
Named objects (Lat/Lon or lat/lon) Field names in either order. This is the safest way to ensure the correct order. { "Lat": "39.942892", "Lon": "-75.173297" }

Most common REST mistake: Sending latitude,longitude in stops= or reverse coords=. Those are longitude,latitude.

By format

1. REST query pair lists — lon,lat

Used by PC*Miler Web Services query parameters.

Where Parameter Format
Route Reports (GET) stops lon,lat;lon,lat;…
Classic reverse geocoding coords lon,lat
POI radius / polygon center center lon,lat
Map corners / points pt1, pt2, corner1, corner2 lon,lat
Single Search currentLonLat lon,lat
stops=-75.173297,39.942892;-74.83153,39.61703
coords=-71.227186,46.813427
currentLonLat=-74.600291,40.360869

Multiple stops are separated by ;. Each stop is one lon,lat pair.

2. Arrays — [lon, lat] (GeoJSON order)

Where Field Format
Places geometry.coordinates [lon, lat]
Geofences ShapePoints [[lon, lat], …] (ring: first point = last point)
Multi-Vehicle Routing coordinates [lon, lat]
{
  "ShapePoints": [
    [-75.152955714212, 39.204307443124],
    [-75.129804285788, 39.204307443124],
    [-75.129804285788, 39.18629254291],
    [-75.152955714212, 39.18629254291],
    [-75.152955714212, 39.204307443124]
  ]
}

3. Named Lat / Lon objects

Field names define the values. Prefer this format when the API offers it.

Where Typical shape
Route Reports (POST) "Coords": { "Lat": "39.942892", "Lon": "-75.173297" }
Trip Management "coords": { "lat": "…", "lon": "…" }
Places /contains bulk "coordinates": { "lat": …, "lon": … }
Classic Geocoding responses Lat / Lon
"Coords": {
  "Lat": "39.942892",
  "Lon": "-75.173297"
}

Decimal degrees vs integer microdegrees

Style Example (near Princeton, NJ) Notes
Decimal degrees -74.600291,40.360869 Preferred for new integrations
Integer microdegrees -74600291,40360869 Same point × 10⁶
  • If a coordinate contains a . → treat as decimal degrees, multiply by 1e6
  • If no . → treat as microdegrees

Single Search currentLonLat accepts either both-decimal or both-integer; do not mix one of each.

Freight Rail geocode responses often return integer microdegrees for Latitude / Longitude.

What to use where

API surface Use this
PC*Miler GET stops, reverse coords, map corners lon,lat string
PC*Miler POST Route Reports / Trip Management named Lat/Lon (or lat/lon)
Places geometry / geofence rings / GeoJSON [lon, lat]
Single Search bias point currentLonLat=lon,lat
To avoiding order bugs Always use named lat/lon fields when available

Example

Philadelphia City Hall area ≈ lon -75.163811, lat 39.952211

Context Correct Incorrect
REST stops / coords -75.1638,39.952211 39.9522,-75.163811
GeoJSON / ShapePoints [-75.163811, 39.952211] [39.952211, -75.163811]
Named object { "Lon": "-75.163811", "Lat": "39.952211" } Values swapped between fields
Geocode signed string 39.952211,-75.163811 -75.163811,39.952211
Last updated November 30, 2026.
API Endpoint:

Contents