gmtselect issue (a different one!)

Added by Russ 12 months ago

I'm getting some weird returns from gmtselect.

I have a simple polygon file (poly.txt):
>
149. -50.
150. -50.
150. -40.
149. -40.

gmtspatial <<END -Fpoly.txt
149.4 -35
149.5 -45
149.6 -55
END

gives:
149.4 -35
149.5 -45
149.6 -55
149.4 -35

Two questions
  1. Why is first point repeated at end?
  2. Why do all points get listed despite only the second point being inside polygon?

I then tried the inverse filter:
gmtspatial <<END -Fpoly.txt -If
149.4 -35
149.5 -45
149.6 -55
END

This gave:
149.55 -50 1.5 1.5 <stdin> <stdin>
149.55 -50 1.5 2.5 <stdin> <stdin>
149.55 -50 2.5 1.5 <stdin> <stdin>
149.5 -45 2.5 2.5 <stdin> <stdin>
149.45 -40 2.5 0.5 <stdin> <stdin>
149.45 -40 0.5 2.5 <stdin> <stdin>
149.45 -40 0.5 0.5 <stdin> <stdin>

As I said, weird! Is it me?


Replies (2)

RE: gmtselect issue (a different one!) - Added by Paul 12 months ago

You talk about select but are running spatial?

RE: gmtselect issue (a different one!) - Added by Russ 12 months ago

Yep, using the correct command helps!
Sorry for the inconvenience.

(1-2/2)