Generate Polylines and Polygons Ready to Use in Your Requests

Draw a route or area on the map and see exactly what it represents.

This free online tool lets you encode, decode, or edit the polyline/polygon and copy it straight into your requests—including Woosmap Static Maps, Store Search, and Datasets.

New

Turn coordinates or encoded strings into shapes you can trust

Encode coordinate lists, decode polyline strings, and visualize complex geometries instantly.


Whether you are building a routing engine, defining a spatial request, searching along a path, or generating static map thumbnails, handling raw coordinates can be tedious.


The Woosmap Polyline Utility allows developers to easily convert between latitude/longitude lists and the standard Encoded Polyline Algorithm format.


Visualize your geometries on a map, edit them in real time, and copy the encoded string or GeoJSON anywhere you need them.

Talk to an Expert
Test the feature live

Encoded Polyline Tool

Scene is yours

Draw: Click on the map to create points.

Edit: Remove created markers to adjust the shape.

Decode: Paste an encoded string to see it on the map.

What can you do with this tool?

Encode String Coordinates

Transform a standard array of Lat/Lng coordinates into a compressed ASCII string.

Decode Strings

 Paste any encoded polyline string (often found in API responses) to visualize the exact path or area on the map.

Draw & Edit

 Manually create zones or custom routes by clicking on the map. Refine the precision of your polylines/polygons.

Transform & Convert

Get URL ready encoded strings or GeoJson format for any drawn or pasted polyline/polygone.

Integrating with the Woosmap Ecosystem

How the Polyline Algorithm Works

The Encoded Polyline Algorithm is a lossy compression algorithm that allows you to store a series of coordinates as a single string. It is widely used because it significantly reduces the size of the payload when transferring geometry data over APIs.


The Logic:

  1. Takes the initial signed value (latitude or longitude).
  2. Multiplies by 10⁵ to convert to an integer.
  3. Converts the value to binary.
  4. Left-shift the binary value by one bit and invert it if the original value was negative.
  5. Chunks the binary value into 5-bit groups and apply ASCII encoding.

Definitions

A polyline is a continuous line composed of one or more line segments. It is used to represent a path, route, or boundary on a map by connecting a specific sequence of GPS coordinates (latitude and longitude).


While a single line connects just two points (Point A to Point B), a polyline connects a series of points (A to B to C to D).

The individual points that define the shape of the line are often called "nodes. Segments linking the nodes are usually called "vertices".

Because a polyline is made of straight segments between points, a polyline approximates curves. The more points you have, the smoother the curve looks (e.g., a winding road).

In digital mapping (like Woosmpa, Google Maps, Mapbox, or OpenStreetMap), polylines are the standard geometry type used to draw:

- Roads

- Rivers

- Transit lines

- Driving or walking directions


If you see a line on a digital map that bends, turns, or follows a specific path, you are looking at a polyline. It is the fundamental geometry used to visualize movement and linear infrastructure in the physical world.

To display your polyline on a static map without listing every single coordinate, you have to pass the encoded string into the polyline parameter. You must prefix the string with enc: so the API knows how to interpret it.


e.g. https://api.woosmap.com/maps/static?...&polylines{"enc":"{YOUR_ENCODED_STRING}","color":"blue",...

Yes. The Woosmap Polyline Utility uses the standard Encoded Polyline Algorithm. This means strings generated here are compatible with any system that supports this standard (often referred to as the "Google Polyline" format). You can freely decode strings from other APIs here or encode geometries to use elsewhere.

While the encoding algorithm is the same for both, the intended usage differs:

- Polylines are open paths (A to B), ideal for visualizing routes, directions, or road networks.

- Polygons are closed loops (the first and last points are connected), representing an area. These are used for defining Isochrones or Zones within the Woosmap platform.

This utility uses the standard precision of 5 decimal places. In the encoding process, latitude and longitude values are multiplied by 10⁵.

This provides a spatial resolution of approximately 1.1 meters at the equator, which is sufficiently precise for most navigation, routing, and geofencing use cases.

Using raw coordinates (e.g., lat,lng|lat,lng...) can quickly result in very long URLs. Most web browsers and servers have a URL character limit (often around 2,048 characters).

Encoding compresses your geometry data, allowing you to pass complex paths with hundreds of points through a URL-based API like Woosmap Static Maps without hitting these limits.

Polyline: An open shape. It has a start point and an end point that do not connect. (Example: A road trip route).

Polygon: A closed shape. The first point and the last point are the same, enclosing an area. (Example: A delivery zone or geofence).

Ready to build location-aware applications?

Let's discuss how you can utilise the Woosmap Platform to drive growth.

Talk to an Expert