Plotting using psxy

Added by Bob 3 months ago

I am new to GMT and am attempting to create a simple map of Lake Michigan shipwrecks based on existing GPS coordinates. I can create the map correctly but the shipwrecks do not plot where expected. I am running GMT 5.4.2 under windows 10. Here are the base commands I have run:

- create Lake Michigan coastline
gmt pscoast -Rg-88.2/-84/41.3/46.2 -JM15i -Df -P -Ia1 -Ba -Wthinnest -Glightgray -Slightblue -TdjRB+o2i/2i+w1i+f3+lW,E,S,N >

- map 4 test shipwreck locations
gmt psxy -R -J shipwrecks1.txt -Sa0.1 -Gred −B -V>

This creates 2 separate .ps files that I open using CorelDraw v8. I then copy the shipwreck file over the shoreline file. But the shipwrecks are showing up not in the expected locations (over dry land). The grid on the shipwreck page is correct but the locations don't match what is in the shipwrecks1.txt file. I'm sure I'm missing some basic knowledge item but after 2 days of trying various options I'm needing some more expert advice.
The larger Shipwrecks.txt is the full list of shipwrecks to be mapped but they are in GPS coordinates, the Shipwrecks1.txt file I used a conversion application to get the Long/Lat shown in the file. I picked 4 wreck locations that I know where they should be mapping to test out the conversion process.
Thanks for any help available!

Shipwrecks1.txt Magnifier (302 Bytes)

Shipwrecks.txt Magnifier (2.65 KB)

Replies (3)

RE: Plotting using psxy - Added by Bob 3 months ago

I forgot to add some of the setup items I used for this map:

- set the parameter default to inches
gmtset PROJ_LENGTH_UNIT inch

-set the default page size
gmtset PS_MEDIA Custom_1500x2000

- set page orientation
gmtset PS_PAGE_ORIENTATION portrait15

RE: Plotting using psxy - Added by Paul 3 months ago

Your data file is badly formatted. Looks like it is using periods instead of colons to indicate ddd:mm:ss data. Numbers cannot have more than one period.
So you need to replace 84.13.46W with 84:13:46W so that all but specially informed programs can understand it.
Probably something like

tr '.:' < shipwrecks1.txt > data.txt

might work

RE: Plotting using psxy - Added by Bob 3 months ago

That fixed it! Thanks for the advice!