Giter VIP home page Giter VIP logo

Comments (12)

Esteban82 avatar Esteban82 commented on June 12, 2024

nearneighbor [INFORMATION]: Your distance unit (e) implies geographic data; -fg has been set.

Well, I think explains the different behavior.

from gmt.

anbj avatar anbj commented on June 12, 2024

Ok, but shouldn't this be set with both -S200e and -S200?

from gmt.

Esteban82 avatar Esteban82 commented on June 12, 2024

The first one is for geographic input data (long and lat). The second for Cartesian (X and Y).

from gmt.

anbj avatar anbj commented on June 12, 2024

Alright. Thanks Esteban.

from gmt.

anbj avatar anbj commented on June 12, 2024

Maybe the -S docs should say -Ssearch_radius[unit] to indicate that the unit is optional (relevant if your input is geographic coordinates).

I get confused since it looks like the unit is mandatory. Since my input data is in meters, I use the unit e. But since its already projected, this is wrong.

from gmt.

PaulWessel avatar PaulWessel commented on June 12, 2024

from gmt.

joa-quim avatar joa-quim commented on June 12, 2024

The issue here is that saying -Se is the default is false. That message comes from a generic text that is imported into all modules that use units. The default -S for nearneighbor is the data units, and probably converted to meters when it knows input is geogs but likely not if it doesn't know that. So, yes, a confusing situation.

from gmt.

anbj avatar anbj commented on June 12, 2024

So, yes, a confusing situation.

Appreciate you saying that.

from gmt.

anbj avatar anbj commented on June 12, 2024
  • So for nearneighbor's -S, maybe we could:

    • Change -Ssearch_radius to -Ssearch_radius[unit]. Since the unit is not mandatory, after all. Might even be an error to use a unit, if the data is (already) projected.
    • Change "Append the distance unit (see [Units])." --> "Append the distance unit if input is geographical (see [Units]).", or something like that.

    Both of these to help the user understand that if the data is already projected, no unit is to be appended.

  • It puzzles me that the generic Unit text says meter is [Default unless stated otherwise]. As @joa-quim stated above (and I experienced), -S200 is not at all the same as -S200e. Maybe this is special for nearneighbor.

I can do the changes if you agree.

from gmt.

anbj avatar anbj commented on June 12, 2024

#8374 deals with the docs. I’m not able to make any changes for the cli, since this involves messing with the souce code.

from gmt.

joa-quim avatar joa-quim commented on June 12, 2024

I've committed the C changes directly to master.

from gmt.

anbj avatar anbj commented on June 12, 2024

Thanks!

from gmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.