Reading .SHP - XCC ForumRegister | Login | Search
History | Home | Messages

Reading .SHPKillerLUA05:38 17-08-2012

I'm trying to read a .SHP file using the specification in Documents. According to the document, I should be reading an Int16 (short, word) first.

But everytime I do, it just returns 0.

Here is my code: (can you help?)

BinaryReader br = new BinaryReader(new FileStream("test.shp", FileMode.Open));
Console.WriteLine("No. Images: " + br.ReadInt16());
Console.WriteLine("A: " + br.ReadInt16());
Console.WriteLine("B: " + br.ReadInt16());
Console.WriteLine("Width: " + br.ReadInt16());
Console.WriteLine("Height: " + br.ReadInt16());
Console.WriteLine("C: " + br.ReadInt32());
Console.ReadKey();


Re: Reading .SHPOlaf van der Spek10:13 17-08-2012
Re: Reading .SHPZaaz13:04 18-04-2013


Home | Post | Users | Messages