[gdal-dev] gdal.open fails from C#
Jeannie May
jeannie_may at trimble.com
Tue Apr 20 22:03:28 PDT 2021
We're unable to get this working from our c# code on the EC2 instance. It
appears to be an issue related to c# and curl. Attached is a sample c# and
log:
The open works fine from our container using bash, but not python. It's a
real mixed bag. BTW Its linux and using an IAM role.
--
*Jeannie May*
Senior Software Engineer
11 Birmingham Drive, Christchurch | 963 5305 Office
www.trimble.com
Connect with us!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210421/f29e3b8f/attachment-0001.html>
-------------- next part --------------
using System;
using OSGeo.GDAL;
using MaxRev.Gdal.Core;
namespace root
{
class Program
{
static void Main(string[] args)
{
GdalBase.ConfigureAll();
Gdal.AllRegister();
Gdal.SetConfigOption("CPL_DEBUG","ON");
Gdal.SetConfigOption("CPL_CURL_VERBOSE","ON");
Gdal.SetConfigOption("GDAL_HTTP_TIMEOUT","30");
Gdal.SetConfigOption("AWS_REGION","us-west-2");
Gdal.SetConfigOption("AWS_HTTPS","NO");
var path = "/vsis3/s3-pdxa-rpd-trex-designfiles/projectSvcIntegrationTests/637540489051794065_SmallGeotiff300kb.tif";
var opts = new GDALInfoOptions(new[] { "-json" });
var dataset = Gdal.Open(path, Access.GA_ReadOnly);
var metadataJson = Gdal.GDALInfo(dataset, opts);
Console.WriteLine(metadataJson);
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.log
Type: application/octet-stream
Size: 4702 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210421/f29e3b8f/attachment-0001.obj>
More information about the gdal-dev
mailing list