Resend to the mailing list.<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Even Rouault</b> <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>></span><br>
Date: Thu, May 17, 2012 at 12:05 PM<br>Subject: Re: [gdal-dev] Can OGR WFS driver take advantage of WFS Server streaming?<br>To: Yingqi Tang <<a href="mailto:anakintang@gmail.com">anakintang@gmail.com</a>><br><br><br>
Le jeudi 17 mai 2012 20:52:07, Yingqi Tang a écrit :<br>
<div class="im">> Even,<br>
><br>
> Just to clarify, when you say:<br>
><br>
> "...server allows partial downloading of arbitrary ranges of bytes within<br>
> the file...", what does it really mean? If I simply put a static GML file<br>
> in IIS and share it through HTTP, will it support partial downloading?<br>
<br>
</div>Yes, static pages should support partial downloading. But WFS servers that<br>
generate response on the fly generally don't.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Thanks,<br>
> Yingqi<br>
><br>
> On Thu, May 17, 2012 at 4:19 AM, Even Rouault<br>
><br>
> <<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>>wrote:<br>
> > Le jeudi 17 mai 2012 00:25:52, Yingqi Tang a écrit :<br>
> > > Thanks for confirming it, Even. I have two follow up questions though:<br>
> > ><br>
> > > 1. Does the GML driver (reading local big GML file) also load the whole<br>
> ><br>
> > GML<br>
> ><br>
> > > in memory too?<br>
> ><br>
> > No, it will read it by small chunks. If no matching XML schema is<br>
> > available (or that the parser of the GML driver cannot manage to<br>
> > understand it because<br>
> > it is too complex (when the GML data is not limited to the Simple Feature<br>
> > convention)), there will be an initial full scan of the file to determine<br>
> > the<br>
> > schema of features.<br>
> ><br>
> > > 2. Does the GML driver take url pointing to a GML?<br>
> ><br>
> > It can work with /vsicurl/<a href="http://something" target="_blank">http://something</a>, provided that the server<br>
> > allows<br>
> > partial downloading of arbitrary ranges of bytes within the file, which<br>
> > is rarely the case with GetFeature() requests.<br>
> ><br>
> > In theory the WFS driver could be improved to use the capability of the<br>
> > GML driver to read chunk by chunk, but there is some work to make that<br>
> > happen. This would probably require a /vsicurl_streaming/ virtual file<br>
> > system where basically only Read() requests would be available, thus not<br>
> > requiring the server to have download range capabilities.<br>
> ><br>
> > > Thanks<br>
> > ><br>
> > > On Wed, May 16, 2012 at 3:20 PM, Even Rouault<br>
> > ><br>
> > > <<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>>wrote:<br>
> > > > Le mercredi 16 mai 2012 23:58:29, Yingqi Tang a écrit :<br>
> > > > > Hi all,<br>
> > > > ><br>
> > > > > I am communicating against a WFS server which supports data (GML)<br>
> > > > > streaming, which means that once I send a GetFeature quest for a<br>
> > > > > big GML (2.0GB+), server will take only seconds to start streaming<br>
> > > > > GML back to client while at the same time it's still preparing the<br>
> > > > > rest<br>
> ><br>
> > of<br>
> ><br>
> > > > > the big<br>
> > > ><br>
> > > > GML.<br>
> > > ><br>
> > > > > Now I wonder if GDAL/OGR WFS client can take advantage of that?<br>
> > > > > Will<br>
> ><br>
> > I<br>
> ><br>
> > > > > be able to access the first few features while the streaming is<br>
> > > > > still going on? It seems to me that it doesn't because it always<br>
> > > > > waiting<br>
> ><br>
> > the<br>
> ><br>
> > > > > whole<br>
> > > ><br>
> > > > big<br>
> > > ><br>
> > > > > GML response is loaded in memory.<br>
> > > ><br>
> > > > Yes indeed, the OGR WFS driver waits for the whole response to be<br>
> > > > downloaded<br>
> > > > before parsing it. It could be desirable to have on-the-fly parsing<br>
> > > > indeed, but<br>
> > > > we currently lack the capability of doing it with the way we use the<br>
> ><br>
> > Curl<br>
> ><br>
> > > > library.<br>
> > > ><br>
> > > > > Thanks<br>
</div></div></div><br>