将 .tif 转换为 geojson 而不使用 gdal
你好,我正在开发一个带有 geotiff 和 geojson 文件的 api。您是否有办法使用 geotiff.py 将图像文件 (.tif) 转换为 geojson 而不使用 GDAL?
预先感谢您的帮助。
我尝试创建这个 api(未完成),但我对非 GDAL 用途了解不多。 使用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)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论