Hello,
I am using since one week ODM (Windows, with docker) to process drone images. Today I am trying to work with the --boundary option to be able to crop only the area I want using a Geojson file.
While trying to do it, I encounter the following error :
C:\Users\npaillou>docker run -ti --rm -v X/XXXX/XXXX/XXXX/20221221:/20221221 opendronemap/odm --project-path /20221221 DJI_202212201001_009_fcmapping70m_ignore_resolution_geojson --end-with odm_orthophoto --fast-orthophoto --skip-3dmodel --ignore-gsd --orthophoto-resolution 1 --boundary X/XXXX/XXXX/XXXX/20221221/map.geojson
usage: run.sh [options]
run.py: error: argument --boundary: X/XXXX/XXXX/XXXX/20221221/map.geojson is not a valid JSON file or string.
This is my map.geojson file, created with geojson.io | powered by Mapbox
{“type”:“FeatureCollection”,“features”:[{“type”:“Feature”,“properties”:{},“geometry”:{“coordinates”:[[[2.4476579507160636,49.19238769721264],[2.447587842352192,49.19223304984405],[2.447480444151978,49.1918442954327],[2.447909934568088,49.191163163824086],[2.448796887074451,49.19159099376779],[2.449016237780455,49.19239872415989],[2.4476579507160636,49.19238769721264]]],“type”:“Polygon”}}]}
I tried to use my Geojson file on WebODM, and it worked perfectly.
I therefore tried to use the input for the boundary option obtained in the WebODM log :
{‘type’: ‘FeatureCollection’, ‘features’: [{‘type’: ‘Feature’, ‘properties’: {}, ‘geometry’: {‘coordinates’: [[[2.4476579507160636, 49.19238769721264], [2.447587842352192, 49.19223304984405], [2.447480444151978, 49.1918442954327], [2.447909934568088, 49.191163163824086], [2.448796887074451, 49.19159099376779], [2.449016237780455, 49.19239872415989], [2.4476579507160636, 49.19238769721264]]], ‘type’: ‘Polygon’}}]}
But it didn’t work again :
C:\Users\npaillou>docker run -ti --rm -v /X/XXXX/XXXX/XXXX/20221221:/20221221 opendronemap/odm --project-path /20221221 DJI_202212201001_009_fcmapping70m_ignore_resolution_geojson --end-with odm_orthophoto --fast-orthophoto --skip-3dmodel --ignore-gsd --orthophoto-resolution 1 --boundary “{‘type’: ‘FeatureCollection’, ‘features’: [{‘type’: ‘Feature’, ‘properties’: {}, ‘geometry’: {‘coordinates’: [[[2.4476579507160636, 49.19238769721264], [2.447587842352192, 49.19223304984405], [2.447480444151978, 49.1918442954327], [2.447909934568088, 49.191163163824086], [2.448796887074451, 49.19159099376779], [2.449016237780455, 49.19239872415989], [2.4476579507160636, 49.19238769721264]]], ‘type’: ‘Polygon’}}]}”
usage: run.sh [options]
run.py: error: argument --boundary: {‘type’: ‘FeatureCollection’, ‘features’: [{‘type’: ‘Feature’, ‘properties’: {}, ‘geometry’: {‘coordinates’: [[[2.4476579507160636, 49.19238769721264], [2.447587842352192, 49.19223304984405], [2.447480444151978, 49.1918442954327], [2.447909934568088, 49.191163163824086], [2.448796887074451, 49.19159099376779], [2.449016237780455, 49.19239872415989], [2.4476579507160636, 49.19238769721264]]], ‘type’: ‘Polygon’}}]} is not a valid JSON string.
Could you please help me solve this problem ?
Have a good day,
Nathan Paillou