Kara Matthews
2014-07-21 01:59:38 UTC
Hello All,
I am using GMT 5.1.1 (r12972) on OSX Mavericks and am having a problem with plotting polygons (Im using the Mercator projection). Specifically I am getting banding across my map in instances when a polygon is being cropped by the map border. It seems that the polygon is wrapping the wrong way around the world. Compare test_0-360.pdf (artefact in bottom right) with test_required_plotting.pdf (this is what I want the map to look like). A couple of my other colleagues at work are having the same problem.
To try and get around this issue I used gmtspatial and the C option to close the polygons at the map border using my -R. This sometimes works, but not all the time. In some cases it seems to be inventing some strange polygons that I cant account for. See "test_0-360_gmtspatial.pdf"
So when gmtspatial wasnt working I used gmtconvert to separate my polygons out into separate files to then isolate the problem polygons. It seems that gmtspatial was making up some polygons with strange coordinates, coordinates that werent in the original polygon file. See prob_poly.txt that coincidentally has the same longitudes as my map region.
I was able to get around my problem by working out which polygons werent working (a bit of trial and error with awk and bash if statements) and then not plotting these but my clunky work-around is not ideal for making lots of figures, or plotting lots of polygon files.
I have also attached a test script and the input files in problem_with_psxy.zip. I have currently uncommented the set of lines I needed to make my ideal figure. You should be able to run this script from the folder if needed.
Thanks kindly for any help you can offer!!
Kind regards,
Kara
---
Dr Kara J. Matthews | Postdoctoral Researcher
School of Geosciences | Faculty of Science
THE UNIVERSITY OF SYDNEY
Rm 403 | Madsen Building (F09) | The University of Sydney | NSW | 2006
E: ***@sydney.edu.au
T: +61 2 9351 3625
W: www.earthbyte.org
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
I am using GMT 5.1.1 (r12972) on OSX Mavericks and am having a problem with plotting polygons (Im using the Mercator projection). Specifically I am getting banding across my map in instances when a polygon is being cropped by the map border. It seems that the polygon is wrapping the wrong way around the world. Compare test_0-360.pdf (artefact in bottom right) with test_required_plotting.pdf (this is what I want the map to look like). A couple of my other colleagues at work are having the same problem.
To try and get around this issue I used gmtspatial and the C option to close the polygons at the map border using my -R. This sometimes works, but not all the time. In some cases it seems to be inventing some strange polygons that I cant account for. See "test_0-360_gmtspatial.pdf"
So when gmtspatial wasnt working I used gmtconvert to separate my polygons out into separate files to then isolate the problem polygons. It seems that gmtspatial was making up some polygons with strange coordinates, coordinates that werent in the original polygon file. See prob_poly.txt that coincidentally has the same longitudes as my map region.
I was able to get around my problem by working out which polygons werent working (a bit of trial and error with awk and bash if statements) and then not plotting these but my clunky work-around is not ideal for making lots of figures, or plotting lots of polygon files.
I have also attached a test script and the input files in problem_with_psxy.zip. I have currently uncommented the set of lines I needed to make my ideal figure. You should be able to run this script from the folder if needed.
Thanks kindly for any help you can offer!!
Kind regards,
Kara
---
Dr Kara J. Matthews | Postdoctoral Researcher
School of Geosciences | Faculty of Science
THE UNIVERSITY OF SYDNEY
Rm 403 | Madsen Building (F09) | The University of Sydney | NSW | 2006
E: ***@sydney.edu.au
T: +61 2 9351 3625
W: www.earthbyte.org
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.