7

I am using GDAL/OGR 1.10 and QGIS 2.0.1.

I am trying to load a google fusion table into QGIS using the method mentioned in this blog post. The only difference is that I am not declaring a email and password but using the OAuth refresh token I have generated. My VRT code is shown below.

<OGRVRTDataSource>
    <OGRVRTLayer name="ps">
       <SrcDataSource>GFT:refresh=<MY_VERY_LONG_TOKEN_IN_HERE> tables=1kQSkw-2cM_PU_jnu_T_PIksBkbyXm1feYaIooq8</SrcDataSource>
    </OGRVRTLayer>
</OGRVRTDataSource>

But if I then add this layer to QGIS I get an OGR error that said "OGR[3] error 1: HTTP error code : 400", followed by another "OGR[3] error 1: Fetching OAuth2 access code from auth code failed."

I thought that this would have worked because via the commandline I can use OGR to open the data source as shown in the image below.

enter image description here

I have also tried structuring my VRT layer like in the blog post also with no luck. I'm a bit stuck on how to make this work. Any suggestions?

Thanks Ando

3
+50

While I can't test it, your VRT is different to that specified here: http://www.webrian.ch/2011/09/google-fusion-tables-in-qgis.html

Try this:

<OGRVRTDataSource>
    <OGRVRTLayer name="ps">
       <SrcDataSource>GFT:refresh=<MY_VERY_LONG_TOKEN_IN_HERE></SrcDataSource>
       <SrcLayer>1kQSkw-2cM_PU_jnu_T_PIksBkbyXm1feYaIooq8</SrcLayer>
    </OGRVRTLayer>
</OGRVRTDataSource>
3
  • Champion - nice pickup – Ando Feb 19 '14 at 22:57
  • Does it work now? – Alex Leith Feb 19 '14 at 23:03
  • Works fine. I can add the layer add features, change attributes and the table reflects the changes. Sometimes it's a tad slow but I don't think that's related to QGIS or OGR. Maybe network speed or read/write speed to the GFT. – Ando Feb 21 '14 at 1:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.