developmentseed / geolambda

Create and deploy Geospatial AWS Lambda functions
MIT License
303 stars 85 forks source link

Calling gdal2tiles.py #106

Open PhilCliv opened 2 years ago

PhilCliv commented 2 years ago

I'm desperately trying to call the gdal2tiles.py script from AWS lambda function like this

    import json
    import os
    from osgeo import gdal
    def lambda_handler(event, context):

         os.system("gdal2tiles.py -p -z [0-6] test.jpg")

But I get this error message sh: gdal2tiles.py: command not found Any idea what is wrong? Thanks!

saheelBreezo commented 2 years ago

Hey @PhilCliv If it helps you can use gdal2tiles library, it calls the same gdal2tiles.py script.