Your sample code doesn't write any feature to the dataset. If you create and write at least one feature then does the file load in MapInfo?
I created bug 1319 for this, let's move the discussion there: http://bugzilla.maptools.org/show_bug.cgi?id=1319 Daniel Canfield, Andrew wrote: > OK I did some more testing after downloading 1.5.0 release from Maptools it > is definitely in 1.5.0-beta1 and 1.5.0 release. Here is the test code: > > void testMiWrite(char *szPath){ > IMapInfoFile *poFile = NULL; > poFile = new TABFile; > if( poFile->Open(szPath, "wb" ) != 0 ){ > delete poFile; > return; > } > /* > if the following line is commented out when using the 1.5.0 sources > MapInfo can open the table otherwise it cannot > */ > poFile->SetMIFCoordSys("CoordSys Earth Projection 1, 33"); > poFile->AddFieldNative("MARKUP",(TABFieldType)1,35,0,0,0); > poFile->Close(); > delete poFile; > return; > } > > If I switch that code to 1.3.0 and re-compile after wiping out the obj files > created by the 1.5.0* compile everything runs just fine. I also tested it in > 2 different projects that both also compile the mitab source inside of them > vice linking it and using the C API. Same results in all three projects. > 1.3.0 created tables open just fine after creation and 1.5.0* created tables > say "Cannot open table whatever_table_name". If I comment out that line the > table gets created OK in 1.5.0* and opens in MapInfo but is in Non-Earth > Meters which I guess must be MapInfo's default for unknown systems. > > Do you need any more info or testing from me to help nail this down? > > Andy > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of > Daniel Morissette > Sent: Thursday, March 02, 2006 11:01 AM > To: [email protected] > Subject: Re: [mitab] SetMIFCoordSys broken in 1.5.0-beta1 > > > Andrew wrote: > >>If I use SetMIFCoordSys from 1.5.0-beta1 I get a table that Mapinfo >>cannot open yet if I switch it back to 1.3.0 the exact same code >>produces a table that Mapinfo has no problems opening. Any idea what >>might be going on? >> > > > Many things have changed leading to 1.5.0 with respect to projection and > datum handling. Could you please double-check that the problem is still > present with the final 1.5.0 release. Also, is tab2tab.exe able to read > the generated file that fails in MapInfo? > > Daniel -- Daniel Morissette http://www.mapgears.com/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/mitab/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
