[gdal-dev] c# bindings - osr SpatialReference constructor

Paul Harwood runette at gmail.com
Tue Jun 16 12:30:52 PDT 2020


Cool, thanks!

On Tue, 16 Jun 2020, 19:12 Tamas Szekeres, <szekerest at gmail.com> wrote:

> You should use null in the constructor if you don't want to specity a wkt
> during the initialization, something like:
>
>
> *SpatialReference srs = new
> SpatialReference(null);srs.ImportFromEPSG(2927);*
>
> Best regards,
>
> Tamas
>
>
>
> Paul Harwood <runette at gmail.com> ezt írta (időpont: 2020. jún. 16., K,
> 19:01):
>
>> A common pattern for creating a SpatialReference is this :
>>
>> from osgeo import osr
>> spatialRef = osr.SpatialReference()
>> spatialRef.ImportFromEPSG(2927)         # from EPSG
>>
>> ( this example is from the Python Cookbook and is just used to illustrate
>> the pattern)
>>
>> But - when I try to do the equivalent in c# using the bindings :
>>
>> SpatialReference CRS = new SpatialReference();
>> CRS.ImportFromMICoordSys(coordsys);
>>
>> I get a message
>>
>> error CS1729: 'SpatialReference' does not contain a constructor that
>> takes 0 arguments
>>
>> Am I missing something? Or is this is a gap in the bindings?
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200616/eca344ee/attachment.html>


More information about the gdal-dev mailing list