MCPcopy Create free account
hub / github.com/MapServer/MapServer / Main

Method Main

mapscript/csharp/examples/shpdump.cs:45–67  ·  view source on GitHub ↗
(string[] args)

Source from the content-addressed store, hash-verified

43 }
44
45 public static void Main(string[] args) {
46
47 if (args.Length != 1) usage();
48
49 shapefileObj sf_obj = new shapefileObj(args[0],-1);
50 shapeObj s_obj = new shapeObj(-1);
51 for (int i=0; i<sf_obj.numshapes; i++)
52 {
53 sf_obj.get(i, s_obj);
54 Console.WriteLine("Shape " + i + " has " + s_obj.numlines + " part(s)");
55 Console.WriteLine("bounds (" + s_obj.bounds.minx + ", " + s_obj.bounds.miny + ") (" + s_obj.bounds.maxx + ", " + s_obj.bounds.maxy + ")" );
56 for(int j=0; j<s_obj.numlines; j++)
57 {
58 lineObj l_obj = s_obj.get(j);
59 Console.WriteLine("Part " + j + " has " + l_obj.numpoints + " points.");
60
61 for(int k=0; k < l_obj.numpoints; k++) {
62 pointObj p_obj = l_obj.get(k);
63 Console.WriteLine(k +": " + p_obj.x + ", " + p_obj.y);
64 }
65 }
66 }
67 }
68}

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
usageFunction · 0.50

Tested by

no test coverage detected