【问题标题】:Can anyone tell how to georeference a tiff image when the coordinates are given in a json file?当坐标在 json 文件中给出时,谁能告诉如何对 tiff 图像进行地理配准?
【发布时间】:2021-12-02 09:12:18
【问题描述】:

我想使用深度学习方法进行作物分类。我收集了加纳作物类型的数据集。我的数据集包含 tiff 图像和 json 文件。 tiff 文件没有地理参考。 json 文件如下所示:

{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-2,8],[1,8],[1,11],[-2,11],[-2,8]]]},"properties":{"anon:size":3,"anon:warning":"WARNING: The item geometries in this collection have been anonymized such that they exist somewhere within the bounding box listed within that item's geometry.","datetime":"2017-01-02T00:00:00","id":"su_african_crops_ghana_source_planet_000000_2017_01_02"}}
]}```

How to make the tiff image georeferenced using this json file for my deep learning project. I want to do pixel-wise classification. Can anyone help to make the tiff image georeferenced? Is there any way to do it in python? 
Thank you.

【问题讨论】:

    标签: json deep-learning tiff


    【解决方案1】:

    您需要遵循以下步骤:

    Open GeoJson with list of areas to crop
    - Iterate over the the list of area
    -- Find the raster that contains the crop area  
    -- Create a new raster dataset using metadata from raster you found
    -- Get the bounding box from an area to crop from geojson 
    -- Read the 3 color bands using the bounding box into numpy array
    -- Write the numpy array to the newly created raster
    

    【讨论】:

      猜你喜欢
      • 2021-11-27
      • 1970-01-01
      • 2023-03-20
      • 2020-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-03
      • 1970-01-01
      相关资源
      最近更新 更多