1 year ago
#335282
mona 2
convert .tif to geojson without gdal
Hi, I am working on an api with geotiff and geojson files. Do you have a way to use geotiff.py to convert an image file (.tif) to geojson without using GDAL?
Thanks in advance for your help.
I tried to create this api (unfinished) but I don't have much knowledge of non-GDAL uses. use python
@app.route("imgeo/upload-img.html")
def upload_file():
if request.method == 'POST':
geo_tiff = GeoTiff(tiff_archivo, as_crs=none, banda=1)
zarr_array = geo_tiff.read()
def server_info():
ubication = [
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [-74.006393, 40.714172] # for example
},
"properties": {
"name": "your ubication",
"description": "your ubication"
}
}
]
}
]
return jsonify(ubication)
if __name__ == '__main__':
# Start the application
app.run(debug=True)
api
gdal
geotiff
0 Answers
Your Answer