Generic Mapping Tools
From SoestWiki
This page is used to assist in the collaboration among the GMT Team in their quest to improve GMT version 5. Discussions about things to implement and to-do lists will be set up
Contents |
TASK LIST
The following needs review and revision of who and when.
| What? | Who? | When? | How? |
| Move to subversion | PW | 2/20/11 | Use cvs2svn tool |
| Install trac | PW | 3/1/11 | Set up to integrate with subversion |
| Experiment with cmake | ALL | 4/1/11 | Try on small, non-GMT projects |
| Move to cmake | ALL | 7/1/11 | Initial implementation for GMT 5 project |
| Finalize cmake | ALL | 10/1/11 | Fully functioning GMT 5 project |
| GPL License for GMT 5 | ALL | 10/1/11 | Solicit more advice on LGPL2.1+ option |
| FFT | ALL | 7/1/11 | Implement GMT_fft wrappers to various platform-specific solutions |
| Geospatial libraries | JL+PW | 7/1/11 | Determine viable options for geospatial operators library |
| Polygons and Holes | PW | 7/1/11 | Proper handling of polygon holes in plotting and grdmasking |
| OpenMP parallellization | ALL | 3/1/11 | Request help from GMT 5 community to help do the mains |
| OpenMP parallellization | ALL | 3/1/11 | First: grd2rgb, grdclip, grdgradient, grdmath, grdimage, grdmask (per pol) |
| OpenMP parallellization | ALL | 3/1/11 | Cannot reuse input grids for output if parallel! |
| PS Character Sets | PW | 4/1/11 | Explore protected character set for map annotations only |
| PS Character Sets | PW | 4/1/11 | Enhance the ISO-8859-x tables with missing things like degree symbols |
| PS Character Sets | PW | 4/1/11 | Add additional character sets, e.g., KOI8 |
| PS Character Sets | PW | 4/1/11 | Expand Appendix G, fix example 31 |
| Non-uniform grids with x = f(col), y = g(row), nx, ny constants | RS | 7/1/11 | Allow reading of COARDS grids with f(col), g(row) arrays into GMT header arrays |
| Non-uniform grids with x = f(col), y = g(row), nx, ny constants | RS | 7/1/11 | Get grd2xyz and xyz2grd working; -Ivar/var syntax? |
| Non-uniform grids with x = f(col), y = g(row, nx, ny constants) | WS | 3/1/11 | Demo of 1-D bcr in case of such grids |
| CUSTOM_font_info.d | RS | 4/1/11 | Eliminate but backwards comp. Use --FONT=[-]CrazyFont. Check pslegend's and other use of font height |
| GMT 4 compatibility | RS/PW | 7/1/11 | Compile list of changed syntax etc, Intro chapter on 4 vs 5 changes |
| Custom symbol, macro languate | PW/JL | 7/1/11 | Develop a windbarb symbol by working with the community - email the list. |
| GuruNotes at Google Docs | PW | 4/1/11 | Development items, e.g., regarding why READONLY grids means we must allocate new grid in grdgradient etc. |
| Google Docs | RS/PW | 4/1/11 | Hosting Guru Notes for, say, proj4 plans and experiments etc. |
| Extend -p option for y and x faces | RS/PW | 7/1/11 | Explore how a 3-D cube may be plotted, e.g., limited to certain viewpoints. |
| Mirone | JL/PW | DONE | Add to list of useful tools/GUIs. |
| Convex Hull and Nearest Neighbor | JL/PW | 4/1/11 | Get good algorithms, possibly for gmtspatial. |
| Gridding Decision guidance | WS | 4/1/11 | Develop flowchart for gridding decision making. |
| GMT 5 apps | PW | 4/1/11 | Develop gmtmapper, gmt**?. |
| redo dir structure (src vs libsrc), include in gmt/*.h | PW/RS | 4/1/11 | Move stuff along AFTER subversion. |
| Spherical harmonics | PW | 4/1/11 | Port the skeletons grd2sph.c/sph2grd.c to GMT 5 syntax. |
| Spherical harmonics | ALL | 4/1/11 | Implement Remko's version of Featherstone code. |
| Spherical harmonics | ALL | 4/1/11 | Implement various Fortran codes after translating. |
| Spherical harmonics | ALL | 4/1/11 | Test and document, compare algorithms at high order. |
| Module/tool renaming | ALL | 4/1/11 | Explore different paradigms for renaming, e.g. geo2xy via mapproject. |
| kriging | PW/WS | 4/1/11 | Build simple version that offers choice of c(r) first, then explore modeling c(r). |
| g??math.c memory saves | PW | 4/1/11 | Implement STORE# and RECALL# operators.. |
| grdfilter new filter options | PW | 4/1/11 | Support -F?xwidth/ywidth, convolution -Fckernel.nc (-D0), custum w(r) isotropic profile. |
| surface: transpose grid | JL | DROPED | Use in-space transpose from JL. |
| gmtselect is point processor | PW | 4/1/11 | Processing of lines and polygons goes in gmtspatial instead |
| Supplements | PW | 4/1/11 | Write appendix (or add to A) on how to contribute supplements |
| -f -: | PW | DONE | Giving -: and -f0x,1y is inconsistent. Also fix explain files/includes |
| -B auto | RS | DONE | Create automatic annotation intervals |
| meca | PW | DONE | Talk to IRIS/Simpson about meca ownership and maintenance |
| FFT | WS | DONE | Summarize questions/topics for Paul to take to GMTSAR people |
| Linear Algebra | WS | DONE | 1st cut at what LA capabilities the GMT wrappers should have |
| CPT 1.2 | RS | DONE | Implement categorical <value> <fill> [;label] format. Remove GMT_CPT2 stuff |
| Pixel reg | RS/PW | DONE | Introduce -r as new -F. |
| Data type GMT_IMAGE | RS/PW | DONE | Allow grdimage etc to read GDAL images natively |
| Interpolation of grids | RS/PW | DONE | Introduce -n to replace the various -S -Q options in grd*. |
| Grid BC | RS/PW | DONE | Allow filling in any side with data BC, not all or nothing. |
| Grid BC | RS/PW | DONE | If geographic grid then use -Lg as default. |
| Grid BCs | RS/PW | DONE | Set default BC according to input file (e.g., geo, natural). |
| Non-Sun rasters | JL/PW | DONE | Use GDAL, or Imagemagick, to read JPGs etc. |
| gmt.conf | RS | DONE | Rename .gmtdefaults and adjust man pages, manual accordingly. |
| surface: -F pixel grid | PW | DONE | Add row/col instead of shrinking. |
| colmath | RS | DONE | New tools derived from gmtconvert and RS code |
SUMMIT AGENDA ITEMS
This is a rough outline; items are not all in useful categories. For now I just want to get things down on paper; we can shuffle and reorganize the list once we finish the brain dump.
GMT 4 issues
Complete code-freeze except for bug fixing. Continue to release new version 4.5.? periodically until GMT 5 reaches maturity (~2 years). Release GMT 4.5.6 on Feb. 21, 2011.
GMT 5 issues
TIME TABLE FOR ACTIONS
GMT 4
- Release 4.5.6 on Feb 21, 2001!
GMT 5
- Planned release Oct 8, 2011 to coincide with 20th anniversary.
- Decide on new GMT article content, format, most suitable journal and submission timeline to ensure publication around Oct 8th.
- Paul's TGIF talk content, published via GMT website, iTunes?
- Decide on GMT logo contest rules, timelines, and use.
- Timeline for GMT 5.0.0beta release.
GMT 6
- Start GMT 6 work in 2012; Key items are proj4 and GSHHS 3
- GSHHS 3 beta by end of 2012
- GMT 6 alpha by 2013
ENVIRONMENT
Development and build tools
- Port from CVS to git
- Install trac for bug tracking purposes
- Use libtools? Or CMake?
- Forcing GNUmake?
- Further compartmentalise the directory tree. Library separate from utilities.
- Place all gmt includes under a gmt subdir (#include <gmt/gmt.h>)
- Configure file for each directory?
- Share experience with Mac GUIs for development. Editors, XCode, SmartCVS, etc.
Legal issues
- GNU License 2 vs 3 vs library vs ???
Consider adding external libraries
- Adopt PolygonClip library into gmtspatial? http://www.cs.man.ac.uk/~toby/alan/software
- What about FFTW if we do grd2sph and sph2grd?
- FFTs in GMT -- how to structure them so people can get highest efficiency / exploit native structure / etc.
- Read LIDAR data through LibLAS?
- Proj4 (see below).
GMT LIB LEVEL
API
- Any PSL issues?
- Remove superfluous code?
- Update API documentation and add or refer to demo codes.
- MatLab API: Status and further plans
- Python API: Status and further plans
- Fortan API: Status and further plans
Custom fonts
- Improve use and documentation of custom fonts, character sets
Files and formats
- What is the status and plans for CPT 2 format?
- Make grids CF-1.0 (or better) compliant; may require some higher level code rewriting
- What to do with 3-D gridsupport (e.g., xyz2grd, stack of 2-D grids to one 3-D grid). See greenspline need to write a 3-D grid. Sampling of 3-D grids (e.g., grdtrack)?
- Will we consider non-equi-spaced grids, i.e. z(i,j) is at location y(i), x(j), with y and x samples specified in header?
- With -m gone, multiseg is the format. Should there be a way to suppress segment headers for 1-segment files? Of all modules that read rec-by-rec, only gmtselect, mapproject, and project has this issue. Solution: If no segment headers were read, then do not issue the header on output.
- Need good examples of new macro language for symbols. Bit the bullet and work up wind barbs?
Internal storage
- Need to consider read-only grids being passed to GMT_modules that cannot be overwritten (see grdgradient for example).
- Internal storage of data types other than float (e.g. 'char' for images)
Projections
- The problem of alphabet letters shortage. Going to -/+<blabla>? We have to address this with Proj4. Should we start already enforcing new naming conventions?
- Are we going to install Proj4. How? Or wait till GMT 6? [GMT 6].
- Store projection/reference info in grid's headers as proj4 strings. ps2raster already does some GMT->proj4 string conversion.
- Look at Karney's paper on geodesics and try to improve how GMT does this.
- Should GMT support EPSG codes?
New global options
- Use a lower-case global option to set 2-D grid interpolation/bc mode? [-n?]
- Consider if -F (pixel reg) should be a global option, e.g. -r
- Shall we add survey foot as a valid unit (unit "u")?
- How to project plot onto other planes than x-y (e.g. x-z)?
Graphics input/output
- Use GDAL or image lib to allow other formats that Sun rasterfiles?
- Other figures output than PS? Use cairo? What are the coding implications?
- Any PS Level 3 features we should embrace?
GUIs
- The Mirone liaison. How 'official' do we want it to be? Two examples on how others see it
http://www.perrygeo.net/wordpress/?p=79 http://freegeographytools.com/2009/gui-for-generic-mapping-tools-gmt-plus-added-geophysics-tools
GMT MODULE LEVEL
Renaming programs and files
- Bundle modules into applications. For example: gmtgridder vs surface/nearneighbor/greenspline/triangulate/xyz2grd amd gmtaverage vs block*
- Discuss pros/cons or renaming main GMT programs (e.g., surface -> grdsurface)
- Change ~/.gmt/.gmtdefaults to gmtdefaults.conf? Change all .gmtdefaults to gmtdefaults.conf? Or gmt.conf? Reason: consistency in file naming throughout. No more hidden files.
Possible new modules
- Time to add grd2sph & sph2grd? [WS: The question of GMT to SPH and vice-versa may depend on the FFTs in #1, depending on how implemented. My issues with spherical harmonics are: (a) What is best/most robust computational scheme (should work to high degree and order, such as are used by seismologists doing normal mode synthesis of high-frequency body waves) -- must be numerically accurate and avoid over/under-flow. (b), how can we support the various conventions on spheres and ellipsoids (geodesy, geomagnetism, numerical weather prediction, etc.) (c), perhaps a special case of b: some in the NWP community think they need latitude sampled at the zeros of Legendre polynomials, to facilitate quadratures in spherical harmonics. I think this is wrong but haven't been able to prove it. Can our four minds put together come up with a proof, or nearly?]
- Others?
Possible new module options
- grdfft: Ability to write 2-D spectra?
- project: Simplify creation of oblique meridians and parallels via new option.
- nearneighbor: Allow for different w(r) functions.
- grdvector: Introduce curved arrows.
- grdblend: Use GMT_grdsample to handle different grid intervals. Allow a syntax without a blend file, e.g. grdblend *.nc -Rg -I5m -Gnew.nc
- pshistogram: Add a log(bin width) option, e.g. log2 grain sizes.
- fitcircle: Option to write coordinates of circle by specifying increment, possible limits.
- pscoast: Add option to plot cities?
- sample1d: Let -I also allow for resampling of Cartesian x,y tracks.
- grd/gmtmath: Add MEM storage option. This would be a way to save the current stack value internally and give it a name. Then, you can later on the command line reference this name to place that content back on the stack.
- gmtdp: Add spherical mode.
- grdimage: Add red/blue 1950s glasses 3-D option.
- gmtvector: Add spherical median option.
- gmtwhich: Let -C take optional conformation string [Y/N].
- grdfilter: Allow for custom filter coefficient (radial) like filter1d. What about non-isotropic filters?
- pswiggle: Should -G<dist> give way to -g option?
- triangulate: Add bicubic triangulation?
- pslegend.: Add fancy frame(s).
- surface: Break-lines? Shall we transpose the surface code and add more BC options?
- mapproject: Needs more testing and examples for coordinates transformations (use of -C -F, --ELLIPSOID, etc).
- grdtrack: Split -D and -C. Add a stacking modifier to -C.
- grdview: Ability to use the general perspective projection to enable true Fledermaus capabilities via movie scripting.
- gmtselect: Need option for selection-by-segment. I.e., if one point in segment passes selection, shouldn't the whole segment pass?
- grdedit: Enhance toggle option to only toggle x or y dimension [default is both]
- gmtspatial: Add convex hull, all nearest neighbors (ANN), polygon intersections/unions, buffer.
- grdmask: Make grids with polygon IDs. Get IDs from segment header (e.g., -L45) or input order [Default]
- Expand gmt_shell_functions.sh
Supplements
- Any major changes to supplements?
- New supplements (potential), what about flexure, grav, mag, thermal, etc?
- Merge some supplements in main?
- Status of psmeca?
- Addition of tests and examples.
- Guidelines for adding to supplements.
- Should we look at GMTSAR package and see what it will take to make it a fully functioning supplement of GMT5 ?
PACKAGING & DISTRIBUTION
Testing of programs
- Hunt for bugs introduced during recoding.
- Run valgrind on all examples to detect subtle memory issues.
- Revise examples to use all latest options and syntax; simplify as much as possible [avoid lots of awk coding].
- Add example for new grdtrack cross-track modes.
- Add tests or examples for supplements [solicit from users]
Documentation
- Status and plans for GMT website.
- Replace the GMT help mailing list by a forum? (easier for occasional users)
- Document lower level functions?
- Use Doxygen?
- Rewrite tutorial?
- Add more color to examples and documentation.
- Add new mugshots/groupd photos with T-shirt of guru team.
- How to format tables in man pages (e.g., gmtmath operators)
- Add more examples to man pages, but integrated with the test suite
- Refer from man pages to GMT main examples
ftp and Mirrors
- Tracking ftp traffic from all mirrors.
- Allow other gurus to run the release process [e.g., a permission issue].
MISC LOW-LEVEL DETAIL
Coding cleanup
- Rename constants like GMT_TXT_LEN to GMT_TXT_LEN_64 etc
- What are the rules for using GMT_LONG_TEXT, GMT_TXT_LEN and BUFSIZ?
- Under #DEBUG, or always, use enum instead of #define for constants so that ddd etc understand the values.
- Rename more variables and functions to be more meaningful
- Improve/standardize on code-snippets to create blank grids in progs.
- Check that distances are given and interpreted uniformly in options.
- Ensure uniform handling of header records on in/output.
- Place all include files in a gmt subdirectory, then use include <gmt/gmt.h>?
- Eliminate tiny or empty include files (e.g., gmt_stat.h, gmt_vector.h)
- Automate how gmt_prototypes.h and gmt_internals.h are maintained, perhaps by flagging the functions in the source and use a script to build these, otherwise they quickly get out of sync.
- Currently, things like segment and file headers are stored with "\n" at the end. Probably better to strip those off and add when writing.
- Use gmtdefaults.conf and not a hidden .gmtdefaults file
- At least warn of collision between -: and -fg. Should -: -fg mean -f0y,1x?
- Settle on terminal width of 120 chars and make all prog usage fit that width or less.
Various known bugs
- psbasemap.c Looks like the magnetic rose needs some alignment work(?)
- pshistogram.c: Bug using -W with time data
- psxy[z]: -Sb -So etc with time data; what is size; how to specify months etc. If cpt uses date-clock z-values then automatically set -f2T or -f3T.
- GMT_time_array: Should be able to handle phase shift passed from -B
- Should GMT programs run without any options, e.g. echo "2 3" | gmtconvert -fg ?
GMT 6 issues
Proposal promises:
- Improve GIS interoperability (OGR & GDAL)
- Improve KML and Gplates interoperability
- Supplements: Update and add new ones
- Move to proj4 for projections
- Use SRTM data in GSHHS (see separate GSHHS item)
- Improve/rewrite GMT tutorial
- GMT podcasts on programs or tasks
GSHHS issues
- Plans for GSHHS 2.* maintenance and release
- Plans for GSHHS 3, using SRTM.
- Accept data from users? Legal concerns?
- How to support country polygons, e.g., handling topology better
- Add support for city/country names?
GMT and Fink on Mac OS X Lion
If you have just transitioned from Snow Leopard to Lion, you will notice that you will have to restart the installation of Fink from scratch.
Installing GMT through Fink on Mac OS X Lion
Here are some helpful tips to get you up and running quickly with at least GMT.
These are the steps to do the initial setup:
- Make a list of currently installed packages
dpkg --get-selections | cut -f1 > fink_packages.txt
- Before getting started with the initialisation, it is wise to rename /sw to /sw.bak instead of simply wiping it away. This will allow you to look back on past configurations.
- Download the tarball fink-0.31.0 from [1]
- Unpack the tarball
- Start the bootstrap process.
- While configuring, respond to the question about an alternative location for source files: /sw.bak/src (this will avoid needing to download a lot of tarballs again)
- When done bootstrapping, edit /sw/etc/fink.conf:
Trees: stable/main local/main (this will give the local tree precedence over the stable tree, which I like)
Now go ahead and install GMT. You may also like to add gv (ghostview). So now do:
- fink install gmt gv
This will install:
- gmt
- netcdf
- gshhs
- ghostscript
- gv
- and a few others.
Working with GMT Subversion Version and Fink on Mac OS X Lion
In order to run all programs, test all the results and compile the documentation on Mac OS X Lion, a number of additional packages from the Fink distribution need to be installed. To get started, first do the steps above.
Now we are going to add some packages to the local tree that are not yet in the Fink 10.7 stable distribution.
- Download this tarball: [2]
- Go to /sw/fink/10.7 and unpack the tarball
- Now we can install all the important stuff
For a full installation, testing and creation of the documentation you will need to fink install the following packages:
- netcdf (or netcdf7). When using netcdf7, you need to configure GMT with the option --with-netcdf=/sw/opt/netcdf7
- graphicsmagick
- texlive
- man2html
- tex4ht
The latter two come from the tarball.
Finally, to include the optional GDAL and PCRE in your GMT installation you will also need to install these two packages:
- gdal
- pcre
If pcre is not installed you must pass --disable-pcre when configuring GMT.
The mex supplement will either require a Matlab installation or you can install octave via fink.
