Given a jp2
file from Sentinel 2-A
data and a set of coordinates for a polygon, I need to cut out that polygon from the JP2
file so that I can then convert it to NDVI
and run a colour table on it. I have managed to transform it to NDVI
and colourise it, but I fail to see which method using GDAL
I can using to crop out the polygon.
I would prefer to cut out the polygon before running the other processes as these would be easier on a smaller map, rather than the 100km/sq map from Sentinel
in the original JP2
file, but if not possible, then cutting out the polygon from the colourised TIFF
file will have to do.
Say I have a list of coordinates, such:
"geo_json": {
"coordinates": [
[
[
-80.54314497367054,
26.56162862015057
],
[
-80.54328137634315,
26.54771269306852
],
[
-80.53577924313589,
26.547773732873694
],
[
-80.53568830955277,
26.561669308646813
],
[
-80.54314497367054,
26.56162862015057
]
]
],
How would I get that polygon from the jp2
file or the resulting colourised ndvi
tif
file?