SkillAgentSearch skills...

LatLongToWRS

Python code to get a Landsat WRS-2 path and row from a latitude/longitude co-ordinate

Install / Use

/learn @robintw/LatLongToWRS
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

This code finds the Landsat WRS-2 path/row which contains a given latitude/longitude co-ordinate.

Dependencies

How to use

>>> from get_wrs import ConvertToWRS
>>> conv = ConvertToWRS()
>>> conv.get_wrs(50.14, -1.7)
[{'path': 202, 'row': 25}]
>>> conv.get_wrs(50.14, -1.43)
[{'path': 201, 'row': 25}, {'path': 202, 'row': 25}]

If you can't put the shapefile in the same folder as the code, then you can pass the path to the shapefile as an argument - for example: ConvertToWRS(shapefile="\path\to\shapefile.shp").

More details are available in the docstrings (try ConvertToWRS? or conv.get_wrs? in IPython) and in my original blog post.

License

This code is released under the 3-clause BSD license (see the LICENSE file for more information).

View on GitHub
GitHub Stars36
CategoryDevelopment
Updated2y ago
Forks7

Languages

Python

Security Score

80/100

Audited on Feb 21, 2024

No findings