Skip to content

How to get array indices from geo coordinates? #34

Answered by KipCrossing
MartinKist asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @MartinKist, there are 2 hidden/internal methods that might help.

geo_tiff._get_y_int(lat)
geo_tiff._get_x_int(lon)

These methods round to the nearest int, but if you want a float, changes will have to be made.

Note this will only work if your as_crs code is the same as crs_code.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@MartinKist
Comment options

@MartinKist
Comment options

@KipCrossing
Comment options

@apwebber
Comment options

Answer selected by MartinKist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants