Repository navigation
fix a bug in coupe ( -A+wwidth is useless when using -N ) - #8804
Conversation
|
If we choose to keep Lines 1331 to 1333 in 58850df The description of
|
|
Here is a example explaining this bug data: nichong.txt I want to plot data points inside the width=4km on each side of a vertical plane ( This figure is wrong, because the data points outside the width=4km are also plotted. If we use following script without
So this bug makes me can not plot data points inside the width=4km ( |
|
Hi @CovMat. I'm not quite sure what behavior you consider to be a bug. Could you tell me specifically what problem you want to solve? |
@Esteban82, sorry I updated the example in above comment to explain this bug. Thank you for reading it |
joa-quim
left a comment
There was a problem hiding this comment.
It took me a little while to fully understand this issue. We certainly do not want to change the -N meaning/description, which is transversal to several GMT modules and means simply - clip by map borders.


gmt/src/seis/pscoupe.c
Lines 1331 to 1333 in 58850df
if
-Nis used,!Ctrl->N.activeis always 0, so the whole condition is always 0 too.However, if user wants to use -A+wwidth to choose data points only in the range of the
, although the data points outside the range let
pscoupe_dans_coupereturns 0 and!pscoupe_dans_coupeequal to 1:gmt/src/seis/pscoupe.c
Lines 353 to 371 in 58850df
these data points will not be skipped because
!Ctrl->N.activeis always 0.Actually, in docs: https://docs.generic-mapping-tools.org/6.6/supplements/seis/coupe.html#n , -N means
it is well done in lines:
gmt/src/seis/pscoupe.c
Line 1259 in 58850df
gmt/src/seis/pscoupe.c
Line 1265 in 58850df
gmt/src/seis/pscoupe.c
Lines 1338 to 1341 in 58850df
gmt/src/seis/pscoupe.c
Line 1684 in 58850df
It makes no sense to use
!Ctrl->N.activein