Ticket #4449 (closed defect: invalid)
C# bindings - CreateCopy() progress delegate fails for WMS
| Reported by: | MaksimS | Owned by: | tamas |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.9.1 |
| Component: | CSharpBindings | Version: | 1.8.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
It seems that there's issues while setting a progress delegate on CreateCopy() for PNG imagery being fetched using WMS driver. Here's the example:
Dim ds_in As Dataset = Gdal.Open("<GDAL_WMS><Service name="WMS"><Version>1.3.0</Version><ServerUrl>http://wms.agiv.be/inspire/wms/orthobeeldvorming</ServerUrl><CRS>CRS:84</CRS><ImageFormat>image/png</ImageFormat><Transparent>True</Transparent><Layers>RGB</Layers><Styles></Styles></Service><DataWindow><UpperLeftX>3.76302095985856</UpperLeftX><UpperLeftY>50.9987228424621</UpperLeftY><LowerRightX>3.76629196690679</LowerRightX><LowerRightY>50.9968195506639</LowerRightY><SizeX>2439</SizeX><SizeY>2255</SizeY></DataWindow><Projection>EPSG:4326</Projection></GDAL_WMS>", Access.GA_ReadOnly)
Dim drv As Driver = Gdal.GetDriverByName("PNG")
Dim ds_out As Dataset = drv.CreateCopy("C:\Test.png", ds_in, 0, Nothing, New Gdal.GDALProgressFuncDelegate(AddressOf ProgressFunc), "")
There's also callback function reporting progress:
Private Function ProgressFunc(Complete As Double, Message As System.IntPtr, Data As System.IntPtr) As Integer MsgBox(Complete.ToString) End Function
Above example fails with "libpng: No IDATs written into file" exception.
But, if there's no callback function set:
ds_out = drv.CreateCopy("C:\Test.png", ds_in, 0, Nothing, Nothing, Nothing)
...everything works fine.
Change History
Note: See
TracTickets for help on using
tickets.
