GenericMappingTools / GenericMappingTools/gmt

Obtain BoundingBox on truly large maps

Open
#1,553 3 comments 0 reactions 0 assignees View on GitHub
longterm
Dominant language
C
Stars
979
Forks
414
Avg merge
17h 26m
Merged PRs (30d)
54

Description

See #1466 for some context. GMT obtains the bounding box for a plot via the GhostScript bbox device which runs with a resolution of 4000 dpi (-r4000 is thus the default). However, there is a limit on the size of the resulting pixel map (500000x500000) and with that resolution we can only detect bounding boxes up to 500000/4000 = 125 inches ~ 3.17x3.17 meters. Since we actually allow plots up to 32767x32767 points ( 11.55x11.55 meters) we are unable to detect such bounding boxes without reducing the resolution to something like -r1100). The question then becomes how to do this: Do we always run first with -r1100 and then if small redo with -r4000, meaning we always run gs boundingbox twice, or do we run it with -r4000 and only if the plot is over, say, 2 meters do we run a second -r1100 just in case to make sure we are not missing a truly large plot. This second approach would seem to save us from running gs twice every time and only once in a blue moon. However, this is not foolproof since it assumes a plot that is > 3 meters will have markings within the 3.17 m detection limit at -r4000 - otherwise we may fail. To be discussed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.