On Fri, Sep 21, 2012 at 05:14:30AM -0700, phil rosenberg wrote:
> 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 http://en.wikipedia.org/wiki/Shapefile. 
> There is a C library for reading/writing them at 
> http://shapelib.maptools.org/ - 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

Phil,

I took a look at the shapefile format. My personal take is that this
might be a little over the top. Strictly it requires 3 files including
information like projections etc. Seems more than we need.

I think a simple binary format such as you suggest may suffice and
could easily be made backwards compatible with the current file
format. Not sure I'd bother with supporting both big and little endian
formats. 

Would you be willing to try this out and produce a patch +
documentation? If so, I think it could be a useful addition,
particularly if we can also generate some better data files as
examples. 

Regards

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. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to