On 2014-02-24 13:07-0800 phil rosenberg wrote: > I just tried to read in a shapefile using plmap and hit some snags. I thought I would check the best route before I submitted a patch.
> The first snag was the fact that the shapefile contains a map projection rather than lats and lons. Unfortunately plmap assumes lats and lons and does a few things to deal with wraparound and the fact that data and plot scales may use either -180 to +180 or 0 to 360 scales for longitude. When dealing with a map projection this all falls apart. > The second snag was that the shapefile contains multiple line items representing different items (some are height contours, some are water boundaries). Of course I would ideally plot these in different colours or styles, however plmap currently just reads every line item from the shapefile and plots it with the current line properties. > When I added the shapefile support we had some discussion about how far to go and whether it was worth supporting more complex shapelib files. The changes to plplot that would be needed to fix the above items would require either a change to plmap or an overload of plmap which provided an option to turn x-direction (longitude) wrapping on or off and a parameter to provide the indices of the shapefile items to draw. The question is whether such a change is worth it if it breaks existing code. Hi Phil: My view is a developer's needs normally trump old API. Therefore, since map support is already one of your areas of PLplot expertise, and you are the one that has discovered additional needs, I would encourage you to develop this as far as you want to go to satisfy your own needs. Of course, Andrew already made the point in the previous discussion that you don't want to go so far that you end up creating a crummy clone of existing complex mapping software. But it doesn't sound like you are anywhere near that level of complexity yet. With regard to API breakage, you should avoid it if you can. (For example, if it turns out to be possible to automatically recognize when a shapefile is a map projection or not, then use that knowledge rather than relying on an extra argument from the user to specify what kind of shapefile it is.) That said, your development of shapefile support for PLplot opens up a whole lot of new possibilities so if API breakage is required to take advantage of some of those possibilities, then so be it. After all, we can always comment in the release notes that shapefile support is being actively worked on, and the subset of the PLplot API that supports maps will therefore likely change in the future. In sum, I believe the PLplot mission statement for maps in shapefile format is quite simple (although also quite far-reaching); PLplot should display shapefile maps properly with the potential to add additional decorations. You have discovered a class of shapefile format which currently does not display properly with PLplot so from this mission statement point of view you should address that issue even if it means the previous mapping API must be broken. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel