[Gdal-dev] Losing projection info when running transformation method for the 2nd time.

VLIEGER (de) Paul paul.de-vlieger at clermont.cemagref.fr
Thu Jun 8 03:25:14 EDT 2006


Hello,
i'am writing a program with perform transformations on map files.

This program is written in vb.net and i had to create a bridge(dll) between 
gdal/ogr and the .net platform (with managed c++) and it works pretty well
(any problem of compilation with visual c++).

The program takes a file in entry (mapinfo or esri), performs transformations (add/remove/rename fields),
recopies features (like ogr2ogr) and saves the new file as a mapinfo file.

OK so my program works and do what i want, but only one time per execution...

I have to translate a thousand of files like that and only the first file is correct,
I need to re-launch the program to translate correctly only one file...

The other files that the first can't be opened with mapinfo due to corrupted data???

So I search for the origin of the problem and I've found that the 2nd file haven't the good
projection info.

->first file(wkt): -> projection lambert II carto (for france)
	PROJCS["NTF_Lambert_II_étendu",GEOGCS["GCS_NTF",DATUM["NTF",SPHEROID["Clarke_188
	0_IGN",6378249.2,293.46602]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.01745329251
	99433]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["False_Easting",6000
	00.0],PARAMETER["False_Northing",2200000.0],PARAMETER["Central_Meridian",2.33722
	91667],PARAMETER["Standard_Parallel_1",45.8989188889],PARAMETER["Standard_Parall
	el_2",47.6960144444],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin
	",46.8],UNIT["Meter",1.0]]

->2nd file(wkt) (only openable with ogr)
	GEOGCS["unnamed",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563],TOWGS
	84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]

all the other files get this projection info until I stop the program and re-lauch it.

I think Maybe I miss to delete/clean something the first time?
Is it normal that the file is created when I delete the datasource? >delete poODS;
Have you any idea about the origin of this problem?

Thank you...

Paul De Vlieger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060608/b778de6d/attachment.html


More information about the Gdal-dev mailing list