The contents of this legacy page are no longer maintained nor supported, and are made available only for historical purposes.


plot-latlong is a simple tool for plotting points on geographic maps given a list of latitude/longitude pairs.

Downloading plot-latlong

The plot-latlong package, which necessarily includes the source, is distributed under the University of California license, which allows use for academic, research, or non-profit purposes. However, it is not an Open Source license. The latest release is v0.3 (Jun 10, 2005): plot-latlong-0.3.tar.gz


plot-latlong is a small command line tool written in perl for plotting points on geographic maps given a list of latitude/longitude (lat/long) pairs. This is aimed at situations in which

  • a moderate amount of accuracy and precision is sufficient
  • a large number of locations need to be plotted (tens of thousands of locations can be easily handled)
  • the plotting needs to be automatable (from a shell script, for example)
  • a lightweight tool (both small and with few dependencies) that just plots points is sufficient
  • ease of modification is important (so that special requirements can be met)

plot-latlong can handle nonlinear map projections (currently the Alber/Lambert projection) and is intentionally minimalistic so that it can serve as a building block. Users can build upon it in three ways: (1) add new maps, (2) run the output images through packages like NetPBM to add titles, etc., and (3) modify the source to change how points are drawn, to add labels, etc. plot-latlong can also be used to simply compute the mapping from lat/long to pixel coordinates (for a given map). These pixel coordinates can then be fed to other programs to draw more elaborate pictures.


Misc. locations worldwide.

Locations of US zip codes.

Implemented Features

The list of implemented features is intentionally short:

  • drawing points at a user-specified size
  • printing out just the pixel coordinates of input lat/long pairs
  • support for linear projections (the relationship between pixels and lat/long values is linear)
  • support for the Alber/Lambert nonlinear projection

The distribution includes over two dozen maps, covering the continents and several country groups. Users can also supply maps to use, so long as the projection type is supported and the projection parameters are known.


plot-latlong is unsuitable for applications demanding high accuracy. Accuracy is likely no better than 5-10 miles--and even this is merely a shot in the dark, since we're not in a position to rigorously determine the accuracy of the generated plots. The following factors contribute to increased inaccuracy:

  • the relative coarseness of the supplied maps
  • unverified projection parameters for the supplied maps
  • the USA maps, which use the Alber/Lambert projection, have parameters calibrated by eye
  • the geodetic datum assumed by the supplied maps is unknown to us
    • lat/long coordinate values are not universal; values are always specified in some system, the datum, and mismatches in the assumed datum can lead to the specification of physical locations that are separated by as much as 1km
    • to assess whether plot-latlong will be sufficient for your needs, you might try comparing the results with those from the Tiger Map Server and MapQuest


The requirements for running plot-latlong are:

  • UNIX-like operating system
  • perl
  •, which in turn requires (see the README of
    • the gd graphics library
    • the PNG graphics library
    • the zlib compression library

Change Log

  • v0.3 released Jun 10, 2005
    • added -i option to specify location of mapinfo file
  • v0.2 released Apr 6, 2004
    • added test-gd script for testing the GD installation
  • v0.1 released Oct 3, 2003 -- initial release


The code for handling the Alber/Lambert map projection is derived from GTrace v1.0.0beta, which was written by Ram Periakaruppan. The included set of maps are also derived from the GTrace distribution. GTrace redistributed these maps with the permission of VisualRoute, the original source of the maps.

Support for this work is provided by the National Communications System (NCS) via NSF grant ANI-0221172, entitled "Routing and Peering Analysis for Enhancing Internet Performance and Security."

Related Objects

See to explore related objects to this document in the CAIDA Resource Catalog.
Last Modified