using spatial module

Added by Chenjian 8 months ago

Hi,
For both 5.3.0 and trunk version, sometimes spatial module can not find a correct intersection. For example, here are two lines (attached),

gmt spatial line1.dat line2.dat -Ie -Fl

It gives
-55.063325012    88.650510388

which is not correct, but close (see the red dot in the attached plot). Also except the intersection it outputs an extra blank line.
Is it possible to have it fixed? Thanks.

line2.dat - half great circle (624 KB)

line1.dat - full great circle (1.22 MB)

plot.png - show the result by spatial (106 KB)


Replies (2)

RE: using spatial module - Added by Paul 8 months ago

Did you try with -fg?

RE: using spatial module - Added by Paul 8 months ago

Also fails with -fg. I traced this down to longitude jumps in the input. The crossover algorithm is Cartesian in nature and we did not protect it against longitude jumps. Now implemented in r19686. However, you will need to use -fg since otherwise the module cannot know it is geographic data.

(1-2/2)