<div dir="ltr">Hi,<div><br></div><div>MVT is a vector format, so you should use OGR to manipulate it.</div><div>To open the OGR format and iterate the features on a layer refer to the following c# example:</div><div><br></div><div><a href="https://github.com/OSGeo/gdal/blob/master/gdal/swig/csharp/apps/ogrinfo.cs">https://github.com/OSGeo/gdal/blob/master/gdal/swig/csharp/apps/ogrinfo.cs</a> </div><div><br></div><div>Also refer to the MVT driver information page, how the connection string should look like and which open options can be used.</div><div><br></div><div><a href="https://gdal.org/drivers/vector/mvt.html">https://gdal.org/drivers/vector/mvt.html</a></div><div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div> <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">MRRAJESH <<a href="mailto:rajeshreddy82@gmail.com">rajeshreddy82@gmail.com</a>> ezt írta (időpont: 2020. jún. 21., V, 7:11):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Tamas,<br>
<br>
Thanks for your suggestions. Will it work for MVT memory dataset?<br>
<br>
We have an MVT memory dataset with us. How to convert this to memory stream.<br>
<br>
*Example: *<br>
.....<br>
var vsibuf = string.Format(@"/vsimem/mvt");<br>
var newDs = Gdal.wrapper_GDALVectorTranslateDestName(vsibuf, ds1,<br>
gdalOptions, null, null);<br>
newDs.Dispose();<br>
<br>
string filePath = string.Format("{0}\\{1}\\{2}\\{3}.mvt", vsibuf, 18, 66027,<br>
96262);<br>
<br>
We tried below ways:<br>
<br>
*Way1:*<br>
<br>
Dataset ds = Gdal.OpenEx(filePath, 0, null, open_options, null);<br>
<br>
How to convert a dataset (ds) to memory stream?<br>
<br>
*Way2:*<br>
<br>
var bufPtr = Gdal.VSIFOpenL(filePath, "rb");<br>
if (bufPtr != null)<br>
{<br>
Gdal.VSIFSeekL(bufPtr, 0, 2); // seek to end<br>
var contentSize = Gdal.VSIFTellL(bufPtr1);<br>
Gdal.VSIFSeekL(bufPtr1, 0, 0); // seek to beginning <br>
var data = new byte[contentSize];<br>
var content = VSIFReadL(1, contentSize, bufPtr); // This method is<br>
not available in C#.<br>
}<br>
<br>
How to get content here?<br>
<br>
Regards,<br>
Rajesh<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div>