[Gdal-dev] Re: Problem using OGR and join-functionality: column names gone when creating a new shapefile?

Frank Warmerdam warmerdam at pobox.com
Tue Sep 19 14:22:24 EDT 2006


wqual wrote:
> Hi Neil,
> thank you for your reply - and a good idea to use aliases. But first, the 
> complete ogr2ogr-command that I used before:
> ogr2ogr -f "ESRI Shapefile" testjoin5.shp ./ -sql "select 
> flurstck_test.*, flurstck_nr1.GEMARKUNG_ from flurstck_test left join 
> flurstck_nr1 on flurstck_test.OBJEKT_ID = flurstck_nr1.OBJEKT_ID"
> 
> The result was the column names as described earlier:
> flurstck_t
> flurstck_t
> flurstck_t
> flurstck_t
...

> fl.NUTZUNG
> fl.EIGENTU
> fl.ADMPLAY
> fl.FLUR_P_
> nr.GEMARKU
> 
> This result looks much better! I guess there's no way to keep the original 
> column names, but this is ok.

Wolfgang,

I see what is happening.  It is rather annoying that there is no way
to control the column renaming.  Perhaps at some point I should offer
some mechanism to either rename specific columns or to at least strip off
"dot prefix" names.

Best regards,

-- 
---------------------------------------+--------------------------------------
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    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list