kvos / CoastSat

Global shoreline mapping tool from satellite imagery
http://coastsat.space
GNU General Public License v3.0
696 stars 252 forks source link

Question regarding georeferencing #59

Closed dancaichac closed 4 years ago

dancaichac commented 4 years ago

Hi all, I got a question regarding georeferencing in CoastSat. in Vos et al (2019) it says the following:

"It should be noted that the images are orthorectified by the data provider and no further geometric correction (i.e. co-registration) is applied in CoastSat. The georeferencing accuracy of each image is stored in the output file containing the mapped shorelines. "

Now, when I download some L5 images I can see the following in the .txt file, for example: filename 2003-09-25-14-48-35_L5_Location1.tif acc_georef 4.633 epsg 32618

Now the question: Does this mean that the georeferencing accuracy is 4.63 meters in this image? or is this 4.63 some factor? I saw in some part of the code, file SDS_download.py, the following "_accgeoref.append(12) # default value of accuracy (RMSE = 12m)", so I'm guessing that the 4.63 is also in meters.

Thanks in advance for the help.

Daniel

kvos commented 4 years ago

hey @dancaichac , that's a good point. Landsat images are georeferenced using Ground Control Points (GCPs), the value reported in acc_georef is the root-mean-squared-error in metres calculated using all the GCPs available on the image. Usually there are 200-300 GCPs on the images (the approximate scene size is 200km by 200km), but this varies in different parts of the world. As sometimes there are no GCPs available (for example on a small isolated island in the Pacific), I fill acc_georef with 12m which is the global average georeferencing RMSE for Landsat scenes. You can read more about this on the USGS Landsat portal: https://www.usgs.gov/land-resources/nli/landsat/landsat-geometry
When I am processing Landsat images, I usually discard all the images with georeferencing accurcy > 10 m.

For Sentinel-2 image is a different story. There is no georeferencing accuracy in the images' metadata but just a flag (1 or 0) which tells the users if the images passed or not a geometric quality control test (I'm not sure how much this flag can be trusted). I have read that they are currently working on georeferencing their images with a reference image (instead of GCPs) and then acc_georef should be available also for S2.

Now what would be ideal for CoastSat, as we are mostly interested in relative shoreline changes, would be to co-register (at subpixel resolution) all the images before mapping the shorelines.

dancaichac commented 4 years ago

Hi @kvos , thanks for the quick answer. Right now I had to discard L5 images because they were not good enough in my region of interest, and as you say, the S2 images have a flag (which in my case is either 1 or -1). So, when you say, "to co-register (at subpixel resolution) all the images before mapping the shorelines", do you mean that one needs to Manually (or automatically) georeference the selected images to be used before being used for coastline detection? Or are the S2 images already georeferenced, and you mean something else? Thanks in advance for your comments.

kvos commented 4 years ago

it should be done automatically, co-registration is used to align all the images to a reference image. I believe this should decrease the errors due to georeferencing, but I have never tested it as it is not implemented in coastsat. It would be a great improvement to the toolbox.