[gdal-dev] FID in a vrt

William Kyngesburye woklist at kyngchaos.com
Mon Apr 23 21:18:04 EDT 2012


As I worked on a test case and fiddled around with a few other ideas, I think I found the error of my ways.

The computer I was doing the conversion from vrt to PostGIS has GDAL 1.8.  In my test case, GDAL 1.9 correctly preserves the FIDs.  Was -preserve_fid broken in 1.8?  I see the option listed in the help for 1.8, but not described (it is described in the 1.9 help).

But, neither version reports the FID column info on a vrt.  Though it does on the PostGIS table.

On Apr 23, 2012, at 12:20 PM, Frank Warmerdam wrote:

> William,
> 
> The correct formlation appears to be:
> 
>  <FID>Fieldname</FID>
> 
> There are a few examples in:
> 
>  autotest/ogr/data/vrt_test.vrt
> 
> Given that you already seem to have tried this I don't know why it
> isn't working.  If you can construct a simple case and file a ticket
> it could perhaps be investigated.
> 
> Best regards,
> Frank
> 
> On Mon, Apr 23, 2012 at 9:09 AM, William Kyngesburye
> <woklist at kyngchaos.com> wrote:
>> Any ideas on how I can get this to work?  Or is it a limitation of the source csv format?
>> 
>> On Apr 17, 2012, at 12:47 PM, William Kyngesburye wrote:
>> 
>>> I'm having trouble getting the FID option to work in a vrt.  The help is not clear on how to do this.  I've tried
>>> 
>>> <FID>feature_id</FID>
>>> 
>>> and
>>> 
>>> <FID name="feature_id" />
>>> 
>>> but ogrinfo will not show the FID column info.
>>> 
>> 
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>> 
>> "I ache, therefore I am.  Or in my case - I am, therefore I ache."
>> 
>> - Marvin
>> 
>> 
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> 
> 
> -- 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Software Developer
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Mon Dieu! but they are all alike.  Cheating, murdering, lying, fighting, and all for things that the beasts of the jungle would not deign to possess - money to purchase the effeminate pleasures of weaklings.  And yet withal bound down by silly customs that make them slaves to their unhappy lot while firm in the belief that they be the lords of creation enjoying the only real pleasures of existence....

- the wisdom of Tarzan




More information about the gdal-dev mailing list