gmt icon indicating copy to clipboard operation
gmt copied to clipboard

Can't specify continent with full name in -E

Open anbj opened this issue 3 years ago • 2 comments

From coast man:

Append =continent to specify a continent, using either the full names or the abbreviations AG (Africa), AF (Africa), AN (Antarctica), AS (Asia), EU (Europe), OC (Oceania), NA (North America), or SA (South America).

Abbreviations works:

gmt coast -E=EU+gblack -png test

Full name does not:

gmt coast -E=Europe+gblack -png test
coast [WARNING]: Continent code =Europe unrecognized
coast [ERROR]: South is outside -90 to +90 degree range
coast [ERROR]: General map projection error

anbj avatar Mar 14 '22 15:03 anbj

Works:

$ gmt pscoast -EEurope -pdf test
-R-10.4842/66.9097/34.802/71.1838

If you forget the = and try to fill/paint, you get a segfault:

gmt pscoast -EEurope+pred -pdf test
ERROR: Caught signal number 11 (Segmentation fault) at
/usr/local/lib/libgmt.so.6(+0x68989)[0x7f5c5143f989]
[0x61]
Stack backtrace:
/usr/local/lib/libgmt.so.6(sig_handler_unix+0xc0)[0x7f5c51522050]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14140)[0x7f5c51398140]
/usr/local/lib/libgmt.so.6(+0x68989)[0x7f5c5143f989]
/usr/local/lib/libgmt.so.6(GMT_Read_Data+0x11df)[0x7f5c5144c46f]
/usr/local/lib/libgmt.so.6(GMT_psxy+0xa4d7)[0x7f5c51796497]
/usr/local/lib/libgmt.so.6(GMT_Call_Module+0x38e)[0x7f5c5143163e]
/usr/local/lib/libgmt.so.6(gmt_DCW_operation+0x1a70)[0x7f5c5146f1c0]
/usr/local/lib/libgmt.so.6(GMT_pscoast+0x72c0)[0x7f5c5173b360]
/usr/local/lib/libgmt.so.6(GMT_Call_Module+0x38e)[0x7f5c5143163e]
gmt(main+0x546)[0x55a016103736]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea)[0x7f5c511e5d0a]
gmt(_start+0x2a)[0x55a0161045aa]

$ gmt pscoast -EEurope+gred -pdf test
gmt [ERROR]: Cannot run a one-liner modern command within an existing modern mode session

$ gmt clear sessions

$ gmt pscoast -EEurope+gred -pdf test
ERROR: Caught signal number 11 (Segmentation fault) at
/usr/local/lib/libgmt.so.6(+0x68989)[0x7f52691c6989]
[0x61]
Stack backtrace:
/usr/local/lib/libgmt.so.6(sig_handler_unix+0xc0)[0x7f52692a9050]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14140)[0x7f526911f140]
/usr/local/lib/libgmt.so.6(+0x68989)[0x7f52691c6989]
/usr/local/lib/libgmt.so.6(GMT_Read_Data+0x11df)[0x7f52691d346f]
/usr/local/lib/libgmt.so.6(GMT_psxy+0xa4d7)[0x7f526951d497]
/usr/local/lib/libgmt.so.6(GMT_Call_Module+0x38e)[0x7f52691b863e]
/usr/local/lib/libgmt.so.6(gmt_DCW_operation+0x1a70)[0x7f52691f61c0]
/usr/local/lib/libgmt.so.6(GMT_pscoast+0x72c0)[0x7f52694c2360]
/usr/local/lib/libgmt.so.6(GMT_Call_Module+0x38e)[0x7f52691b863e]
gmt(main+0x546)[0x565119a8f736]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea)[0x7f5268f6cd0a]
gmt(_start+0x2a)[0x565119a905aa]

anbj avatar Mar 14 '22 15:03 anbj

I see. If you use the full name, the GMT uses the bounding box region (define in dcw_collections.txt) and breaks because it has no sense.

If you use =EU, then GMT uses the list of countries (defined as part of Europe) and managed to draw its borders.

I wonder if we should make a more clear distinction between regions and list of countries.

Esteban82 avatar Mar 14 '22 16:03 Esteban82