[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #HCW-753528]: GridCoordSystem. findXYindexFromLatLon()



Hi Nihat,

GridCoordSystem.findXYindexFromLatLon() returns a 2-element array, ret[0] for x 
index and ret[1] for y index. As you say, one index can be valid (>= 0) and one 
can be invalid (-1). Therefore, you shouldn't conclude that a given lat/lon is 
contained within the grid unless both indices are >0. I can see your point that 
it may be risky to convey the information that way, but sometimes it can be 
useful to know when a lat is valid and a lon is not, or vice versa.

If necessary, the lat/lon is converted into projection coordinates of the grid. 
Apart from that, there is no interpolation.

The documentation for the method isn't as detailed as it could be, but you can 
follow the code to see what's happening. It's not too complex. The latest 
source for NetCDF-Java 4.6 can be found on the master branch of our GitHub repo 
[1].

Cheers,
Christian

[1] https://github.com/Unidata/thredds/tree/master

Ticket Details
===================
Ticket ID: HCW-753528
Department: Support netCDF Java
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.