https://github.com/robintw/latlongtowrs
Python code to get a Landsat WRS-2 path and row from a latitude/longitude co-ordinate
https://github.com/robintw/latlongtowrs
landsat location python satellite science
Last synced: 6 months ago
JSON representation
Python code to get a Landsat WRS-2 path and row from a latitude/longitude co-ordinate
- Host: GitHub
- URL: https://github.com/robintw/latlongtowrs
- Owner: robintw
- License: bsd-3-clause
- Created: 2013-03-03T15:20:35.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-01-06T19:16:18.000Z (almost 6 years ago)
- Last Synced: 2025-04-01T15:57:18.528Z (6 months ago)
- Topics: landsat, location, python, satellite, science
- Language: Python
- Size: 5.86 KB
- Stars: 36
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This code finds the Landsat WRS-2 path/row which contains a given latitude/longitude co-ordinate.
# Dependencies #
* [GDAL/ORG](https://pypi.python.org/pypi/GDAL/)
* [Shapely](https://pypi.python.org/pypi/Shapely)
* Landsat WRS-2 Path/Row Shapefiles - download from [USGS site](https://www.usgs.gov/media/files/landsat-wrs-2-descending-path-row-shapefile)# 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).