pscoast coastlines

Added by Kees over 5 years ago

Dear all,

I have an issue with pscoast and specifically the political boundaries. When I invoke pscoast after psbasemap, e.g.,
_
psbasemap -R-80/-40/-55/-15 -JM8 -P -K -G255 -Ba10f5/a10f5:."":wnes -Y1.0 -X1.0 > ./FIGURES/station_config.ps
pscoast -K -O -P -R -Di -J -N2/0.6p,200 -N1/0.45p,0 -A100 -S230 -W0.4p,0 >> ./FIGURES/station_config.ps
(More code is appended later, but this is not of importance).

I end up with two political boundaries plotted on top of each other; each with different resolution. The problem is rather consistent and I don't know how to solve it. Essentially, the very low resolution coastlines and political boundaries are the ones I would like to get rid off. If I change from -Di to -Df, for example, these undesired low resolution boundaries become higher resolution, but still not as high as the resolution of the highest resolution boundaries. The attached file is the result of the command above.

I've installed GMT through the package manager of ubuntu (14.04). The installed version of GMT is 4.5.11-1build1 and, using `sudo gmt-coastline-download all 4.5.11-1build1', I've retrieved the full resolution data.

Any advice/help is highly appreciated...

Best regards,
Kees


Replies (17)

RE: pscoast coastlines - Added by Joaquim over 5 years ago

Are we in presensence of another Ubuntu-ism?
Because it works fine for me (Windows) on both GMT4 & 5

RE: pscoast coastlines - Added by Kees over 5 years ago

That could be...
So what would you recommend. Purge the currently installed GMT version (installed through the package manager) and subsequently install the newest (5.1.1 I belive) GMT version through the install script on the GMT webpage?

RE: pscoast coastlines - Added by Joaquim over 5 years ago

If you are willing to do it, definitively. But note that GMT5 does not build with an install script. Please follow the instructions on the wiki page.

RE: pscoast coastlines - Added by Anonymous over 5 years ago

The command gmt-coastline-download is in package gmt-coast-low which is for old GMT coast files. In the next version (Ubuntu utopic/14.10 and Debian jessie/testing) it will be replaced definitely by gmt-gshhs-low

Please purge package gmt-coast-low and install packages gmt-gshhs-low, gmt-gshhs-high and, gmt-gshhs-full

RE: pscoast coastlines - Added by Joaquim over 5 years ago

Eduardo, but that still wouldn't explain the straight lines that we see also in the other thread currently going on the mail list "Drawing a line resulting a closed polygon".
How do the guys at the Ubuntu factory manage to come out with things like this?

RE: pscoast coastlines - Added by Paul over 5 years ago

We will have to alert the gmt maintainer at the ubuntu factory since it is not very good advertisement having a flawed gmt installation available from them. Does anyone know who it is?

RE: pscoast coastlines - Added by Kristof over 5 years ago

According to ubuntu packages the gmt package recommends the correct gmt-gshhs-* packages starting with Ubuntu raring 13.04 and newer. See the following list:

As maintainer are the "Ubuntu MOTU Developers" listed. You can reach them at ubuntu-motu[at]lists.ubuntu.com

A note from the ubuntu packages site:
Please consider filing a bug or asking a question via Launchpad before contacting the maintainer directly.

Hope this helps.

All the best,
Kristof

RE: pscoast coastlines - Added by Anonymous over 5 years ago

Ubuntu take most of its packages from Debian testing. See http://unix.stackexchange.com/questions/28324/how-is-ubuntu-based-on-debian

So we can speak with Debian GIS people https://wiki.debian.org/DebianGis which are the GMT Debian Maintainers https://packages.debian.org/en/wheezy/gmt and take a look how we can help them to push the latest version into the distro.

RE: pscoast coastlines - Added by Kristof over 5 years ago

According to the ubuntu package description the original (Debian) maintainers are Torsten Landschoff and Francesco Lovergine

RE: pscoast coastlines - Added by Kees over 5 years ago

Hi all,

thanks for your efforts and replies, but after purging gmt-coast-low and installing gmt-gshhs-low, gmt-gshhs-high and gmt-gshhs-full, nothing had changed (the straight lines remain). As Joaquim and Paul note, it seems like ubuntu 14.04 provides a flawed gmt installation.
Since Ubuntu is widely used and 14.04 is an LTS, I think this should be addressed as soon as possible.
I've just purged the package-manager provided installation of gmt altogether and installed gmt 5.1.1 from source: works fine!

Cheers,
kees

RE: pscoast coastlines - Added by Joaquim over 5 years ago

That's what I was going to say. The main problem is not the coastlines files. The main problem is something mysterious they do with their building that results in broken package that we cannot reproduce anywhere else to investigate. And this is not the first time.

RE: pscoast coastlines - Added by Anonymous over 5 years ago

Hi,

the bug (origin) is in Debian, plot attached. I made a diff (attached) between the original sources and theirs and I don't see any big change.

I've made another diff between coastlines and there aren't any differences...

RE: pscoast coastlines - Added by Anonymous over 5 years ago

Here are the patches they apply to 4.5.12

patches.tar.bz2 (3.12 KB)

RE: pscoast coastlines - Added by Joaquim over 5 years ago

But believing in the thread "Drawing a line resulting a closed polygon" currently on the mail list, the problem may strike also with a plain psxy call. So it can't be a coastlines only thing.

RE: pscoast coastlines - Added by Chris over 5 years ago

Was there ever a solution to this problem? I am having the same issue when calling psxy using GMTv4.5.11 on Ubuntu 14.04.

Best regards,
Chris

RE: pscoast coastlines - Added by Paul over 5 years ago

No, we basically concluded the ubuntu package is screwed for whatever reason and for every other platform things work and if you build from source on ubuntu it works.

RE: pscoast coastlines - Added by Chris over 5 years ago

Ok, thanks for that Paul, I'll have to find a workaround.
Cheers.

(1-17/17)