In many respects I agree. Plplot isn't a mapping tool and I could just get some outline data and plot it as a series of lines. As you say, when zoomed in the map projections make little difference.

The stuff I'm doing at the moment is zoomed right in on Southern UK so projections aren't an issue, but if I were looking at northern Europe for example then I think I'd want something more detailed than the current maps and the projections would probably be useful then. I imagine that also there would be many lines needed to simply plot the outlines as a line chart.

If we wanted to adopt an existing file format then shapefiles seem quite common and have essentially an open specification. The format is relatively straightforward, having a file header followed by a number of records each with a header followed by data. See There is a C library for reading/writing them at - this does add an extra dependency though with the extra complexity in the build stage or some relatively straightforward code could be added to Plplot to read basic shapefiles.

Or if this is overkill for the needs of plplot a map file could begin with a header something like

    char newversionflag; //always zero to identify new versions vs current version
    char versionnumber; //for future proofing
    char datatypeflag; //flag whether the data is big/little endian integers or ieee floats
    char nbytesperpoint; //number of bytes for each lat/lon value
followed by a series of records each beginning with a number which specifies the number of lat/lon values in the record like the current version.

This would give most users the flexibility to generate the maps or any additional surface features they want in a pretty straightforward way or a number of different maps at different resolutions could be provided with plplot.

Like Andrew says - just my random thoughts


From: Andrew Ross <>
To: phil rosenberg <>
Cc: "" <>
Sent: Friday, 21 September 2012, 10:24
Subject: Re: [Plplot-devel] map resolution


I appreciate your problems Phil. The mapping functions are a bit of a
half way house. Plplot doesn't (and I think shouldn't) provide full
mapping tools. That's a different job. Get a GIS package if that is
what you need. On the other hand, basic outline maps are very useful
for scientific applications. You can do all this yourself with the
generic API, but the mapping functions have some useful additional
functionality in terms of projections / transforms etc.

As a non-US resident I've always been slightly irked that we only have
global and US maps. For this reason (as well as for getting better
resolution maps) it would also be good to allow users to easily add
their own map data. Currently the format is undocumented so any change
in format would be best implemented before we write the documentation
and make it a public API!

I would also think carefully about data format. Better resolution
would be beneficial as you say. Might also be worth considering some
standard format to make obtaining new maps easier.

Of course one might argue that high resolution only really matters
when you are looking at a small area zoomed in, at which point many of
the benefits of the mapping functions in terms of projections /
transformations don't really matter so much anyway as it is close to
being a flat cartesian surface.

Just my random thoughts.


On Thu, Sep 13, 2012 at 02:31:27PM -0700, phil rosenberg wrote:
> Hi again
> I've just been through the source code to work out the file format. It actually turned out to be rather simple - just a series of segments made up of?2 byte numbers. Each starts with the number of points in the segment followed by the lons then the lats for that segment. I've generated high res binary files based on the coastline files from the ascii CIA files. If anyone else would like the files then let me know.
> Andrew - I think that although the data may have come from the CIA files, I don't think plPlot uses the original format. The ascii files have a much higher resolution than the two byte plPlot files?which results in some rather unpleasant aliasing. I've put an example at showing the SE of the UK.?It is still much better than the previous results, but maybe if the devs would consider allowing a 3 or 4 byte per point format the results would be much improved.
> Phil

> ________________________________
>  From: phil rosenberg <>
> To: Andrew Roach <>
> Sent: Thursday, 13 September 2012, 16:04
> Subject: Re: [Plplot-devel] map resolution

> Unfortunately after a significant amount of searching i've only been able to find ascii versions of the CIA maps (which were on the page you suggested Andrew). The maps with plPlot are binary so these don't work.
> ?
> If anyone has copies of more detailed maps then I'd appreciate it if you'd let me know. At the moment I'm going to have to read in and plot the ascii maps as a line plot, but I won't end up with the useful features of the plmaps routine.
> ?
> Cheers
> ?
> Phil

> ________________________________
>  From: Andrew Roach <>
> To: phil rosenberg <>
> Sent: Thursday, 13 September 2012, 12:13
> Subject: Re: [Plplot-devel] map resolution

> At 03:53 AM 13/09/2012 -0700, you wrote:
> > Hi all
> > I was just wondering what the format of the plPlot map files is? The maps included in plPlot are rather low resolution so wondered if it was possible for me to download more detailed ones form somewhere?
> >
> > Phil
> It was the CIA World DataBank map format. Many years ago I did use higher res versions for something or other - they are out there if you look. might be some from what I can see.
> -Andrew

> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats.

> _______________________________________________
> Plplot-devel mailing list