Maksim,<br><br>You can use the memory file system handler in the GDAL library.<br>The documentation of VSIInstallMemFileHandler() includes a C++ example.<br><br><a href="http://www.gdal.org/ogr/cpl__vsi_8h.html#66e2e6f093fd42f8a941b962d4c8a19e">http://www.gdal.org/ogr/cpl__vsi_8h.html#66e2e6f093fd42f8a941b962d4c8a19e</a><br>
<br><div class="gmail_quote">On Sun, Jul 31, 2011 at 9:47 PM, Maksim Sestic <span dir="ltr"><<a href="mailto:max@geoinova.com">max@geoinova.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="blue">
<div>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;">Hi </span></font><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">Chaitanya,<u></u><u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">Actually, what I need is writing GML (using GML
driver) to string, not a file. Current managed wrapper looks like:<u></u><u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">Public Function <b><span style="font-weight: bold;">CreateDataSource</span></b>(<i><span style="font-style: italic;">utf8_path</span></i> As </span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">String</span></font></u></b><b><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black; font-weight: bold;" lang="EN-US">, </span></font></b><i><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black; font-style: italic;" lang="EN-US">options</span></font></i><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">() As </span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">String</span></font></u></b><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">) As </span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">OSGeo</span></font></u></b><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">.</span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">OGR</span></font></u></b><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">.</span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">DataSource</span></font></u></b><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US"><u></u><u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">...while I need something like:<u></u><u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">Public Function <b><span style="font-weight: bold;">CreateDataSource</span></b>(<i><span style="font-style: italic;">myStream</span></i> As </span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">Stream</span></font></u></b><b><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black; font-weight: bold;" lang="EN-US">, </span></font></b><i><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black; font-style: italic;" lang="EN-US">options</span></font></i><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">() As </span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">String</span></font></u></b><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">) As </span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">OSGeo</span></font></u></b><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">.</span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">OGR</span></font></u></b><font color="black" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: black;" lang="EN-US">.</span></font><b><u><font color="#0066cc" face="Tahoma" size="1"><span style="font-size: 9pt; font-family: Tahoma; color: rgb(0, 102, 204); font-weight: bold;" lang="EN-US">DataSource</span></font></u></b><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US"><u></u><u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">Regards,<u></u><u></u></span></font></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">Maksim Sestic</span></font><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;"><u></u><u></u></span></font></p>
<p class="MsoNormal"><font color="blue" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: blue;"><u></u> <u></u></span></font></p>
<div>
<div class="MsoNormal" style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;" lang="EN-US">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;" lang="EN-US">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="EN-US">
Chaitanya kumar CH [mailto:<a href="mailto:chaitanya.ch@gmail.com" target="_blank">chaitanya.ch@gmail.com</a>] <br>
<b><span style="font-weight: bold;">Sent:</span></b> Sunday, July 31, 2011 18:06<br>
<b><span style="font-weight: bold;">To:</span></b> Maksim Sestic<br>
<b><span style="font-weight: bold;">Cc:</span></b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [gdal-dev] .NET and
OGR writing to stream</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><u></u> <u></u></span></font></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Maksim,<br>
<br>
You can use the Memory driver.<br>
<br>
<a href="http://www.gdal.org/ogr/drv_memory.html" target="_blank">http://www.gdal.org/ogr/drv_memory.html</a><br>
<a href="http://www.gdal.org/ogr/ogr_formats.html" target="_blank">http://www.gdal.org/ogr/ogr_formats.html</a><u></u><u></u></span></font></p>
<div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Sun, Jul 31, 2011 at 8:45 PM, Maksim Sestic <<a href="mailto:max@geoinova.com" target="_blank">max@geoinova.com</a>> wrote:<u></u><u></u></span></font></p>
<div link="blue" vlink="purple">
<div>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;">Hi all,</span></font><u></u><u></u></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;">Is there
any example of OGR driver writing to memory stream (instead of file stream), in
.NET?</span></font><u></u><u></u></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;"> </span></font><u></u><u></u></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;">Regards,</span></font><u></u><u></u></p>
<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;">Maksim
Sestic</span></font><u></u><u></u></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br>
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 6338 (20110731) __________<br>
<br>
The message was checked by ESET NOD32 Antivirus.<br>
<br>
<a href="http://www.eset.com" target="_blank">http://www.eset.com</a><u></u><u></u></span></font></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><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="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><u></u><u></u></span></font></p>
</div>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br clear="all">
<br>
-- <br>
Best regards,<br>
Chaitanya kumar CH.<br>
<br>
+91-9494447584<br>
17.2416N 80.1426E<u></u><u></u></span></font></p>
</div></div></div><div><div></div><div class="h5">
<br><br>__________ Information from ESET NOD32 Antivirus, version of virus signature database 6338 (20110731) __________<br><br>The message was checked by ESET NOD32 Antivirus.<br><br><a href="http://www.eset.com" target="_blank">http://www.eset.com</a><br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>