Using pscoast to extract country boundaries

Dear GMTers,

I am trying to obtain the boundaries of the 48 conterminous US states with the following command

gmt pscoast -E US.AL,US.AZ ... -M -Dh > ./tmp/boundary.txt

When I provide the full list of countries I get the following message:

Abort trap: 6

If I reduce the number of countries, the command works but of course I do not achieve my goal.

Any suggestion on how to resolve this (apart from repeating 48 times the command above)?

Thank you very much in advance for your help and for distributing this wonderful software.

Marco

Can you post the full command that lead to the issue?

If you can do it by chunks then you don’t need to repeat 48 times. Just do

gmt pscoast -E first pack > . /tmp/boundary.txt
gmt pscoast -E second pack >> . /tmp/boundary.txt
...

Interestingly, this works:

gmt pscoast -EUS.AL,US.AZ,US.AR,US.CA,US.CO,US.CT,US.DE,US.FL,US.GA,US.ID,US.IL,US.IN,US.IA,US.KS,US.KY,US.LA,US.ME,US.MD,US.MA,US.MI,US.MN,US.MS,US.MO,US.MT,US.NE,US.NV,US.NH,US.NJ,US.NM,US.NY,US.NC,US.ND,US.OH,US.OK,US.OR,US.PA,US.RI,US.SC,US.SD,US.TN,US.TX,US.UT,US.VT,US.VA,US.WA,US.WV,US.WI,US.WY

While this one does not:

gmt pscoast -EUS.AL,US.AZ,US.AR,US.CA,US.CO,US.CT,US.DE,US.FL,US.GA,US.ID,US.IL,US.IN,US.IA,US.KS,US.KY,US.LA,US.ME,US.MD,US.MA,US.MI,US.MN,US.MS,US.MO,US.MT,US.NE,US.NV,US.NH,US.NJ,US.NM,US.NY,US.NC,US.ND,US.OH,US.OK,US.OR,US.PA,US.RI,US.SC,US.SD,US.TN,US.TX,US.UT,US.VT,US.VA,US.WA,US.WV,US.WI,US.WY -M -Dh > ./tmp/boundary.txt

Thank you again Joaquim

I can reproduce the problem. both of your commands crash for me. Note that you should not be using -Dh because DCW has no variable multiple resolutions but it’s the reason of the problem.

Should be fixed by PR #2066
IT was a variable too short. Your command works as long as the total length after -E is not larger than 256

Thanks for catching this.

Thanks a lot Joaquim!