hotosm / oam-uploader-api

DEPRECIATED - The OAM Uploader API server
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

No filename extensions from GDrive downloaded files #60

Closed smit1678 closed 7 years ago

smit1678 commented 7 years ago

When testing on our staging deployment, it seems that the worker does not add a .tif file extension to the final filename after being processed. It receives a temporary filename: "Output: ","/local/tmp-2088WQYjIQPQiGE.tif" but then is given the original download filename which does not include extension when downloading from Google Drive.

Unsure if this is critical issue or not, but flagging since this changes how the UUID and filenaming within OAM.

170102/161650.292, [log,worker,worker 586a6c,debug], data: Downloading https://www.googleapis.com/drive/v3/files/0B87LgYxn5I0Fb1FoeGhacGV2Wm8?alt=media&key=AIzaSyBUrwC32pyKdXkzC6lJwsypmuO-exQ5IA4 to /local/tmp-2088DUDcM6UFznJ
170102/161654.776, [log,worker,worker 586a6c,debug], data: Converting image to OAM standard format.
170102/161705.500, [log,worker,worker 586a6c,debug], data: ["Converted image to OAM standard format. Input: ","/local/tmp-2088DUDcM6UFznJ","Output: ","/local/tmp-2088WQYjIQPQiGE.tif"]
170102/161705.500, [log,worker,worker 586a6c,debug], data: Generating metadata.
170102/161705.614, [log,worker,worker 586a6c,debug], data: ["Generated metadata: ",{"uuid":"http://hotosm-oam-uploader-test.s3.amazonaws.com/uploads/2017-01-02/586a6c4ae1d264ba00add686/scene/0/scene-0-image-1-0B87LgYxn5I0Fb1FoeGhacGV2Wm8","title":"test","projection":"PROJCS[\"WGS 84 / Pseudo-Mercator\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Mercator_1SP\"],PARAMETER[\"central_meridian\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],EXTENSION[\"PROJ4\",\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs\"],AUTHORITY[\"EPSG\",\"3857\"]]","bbox":[42.44833946228026,43.07139597339707,42.45082869393254,43.073088675390125],"footprint":"POLYGON((42.44833946228026 43.073088675390125,42.45082869393254 43.073088675390125,42.45082869393254 43.07139597339707,42.44833946228026 43.07139597339707,42.44833946228026 43.073088675390125))","gsd":0.049999999999813124,"file_size":63199151,"acquisition_start":"2017-01-02T00:00:00.000Z","acquisition_end":"2017-01-02T14:02:14.358Z","platform":"uav","provider":"test","contact":"Nate,nate@hotosm.org","properties":{"sensor":"unkown"}}]

cc @nbumbarger

mojodna commented 7 years ago

This is fixed by #66, since that ignores the original filenames.

smit1678 commented 7 years ago

👍 Closing