<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yiv8629367754"><div id="yui_3_16_0_1_1452368375327_2568"><div id="yui_3_16_0_1_1452368375327_2567" style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:13px;"><div dir="ltr" id="yiv8629367754yui_3_16_0_1_1452339073746_9760">Hello,<br><br>I am trying to read the point geometry from .shp file in ironpython 2.7, by using C# gdal bindings (downloaded from <a rel="nofollow" id="yiv8629367754yui_3_16_0_1_1452008687872_10603" class="yiv8629367754" target="_blank" href="http://gisinternals.com/query.html?content=filelist&file=release-1800-gdal-1-11-3-mapserver-6-4-2.zip">gisinternals</a>).</div><div id="yiv8629367754yui_3_16_0_1_1452339073746_9943" dir="ltr"><br></div><div id="yiv8629367754yui_3_16_0_1_1452339073746_9987" dir="ltr">There is a tutorial on how this can be done on <a rel="nofollow" id="yiv8629367754yui_3_16_0_1_1452339073746_10100" class="yiv8629367754edited-link-editor" target="_blank" href="http://www.gdal.org/ogr_apitut.html">gdal.org</a>, but it's in C, C++ and Python languages, with which I am not familiar with (I am familiar with python, but the syntax is completely different from C# gdal bindings syntax).<br id="yiv8629367754yui_3_16_0_1_1452339073746_10320"><br id="yiv8629367754yui_3_16_0_1_1452339073746_10318"><div dir="ltr" id="yui_3_16_0_1_1452368375327_3158">I googled a bit, and found the <a rel="nofollow" id="yiv8629367754yui_3_16_0_1_1452339073746_10312" class="yiv8629367754edited-link-editor" target="_blank" href="https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/ogrinfo.cs">ogrinfo</a> C# file example by Tamas Szekeres, which helped me to replicate what I want in ironpython, <span id="yiv8629367754yui_3_16_0_1_1452339073746_10519" class="yiv8629367754">but only partly.<br>What I need is to get the points of each line and polygon from .shp file.</span></div><div id="yui_3_16_0_1_1452368375327_6467" dir="ltr"><span id="yiv8629367754yui_3_16_0_1_1452339073746_10519" class="yiv8629367754">I checked the <a id="yui_3_16_0_1_1452368375327_7684" class="edited-link-editor" href="http://www.gdal.org/classOGRGeometry.html">Ogr.Geometry class</a>, but I still do not understand how to do it.</span></div><div id="yui_3_16_0_1_1452368375327_7686" dir="ltr"><span id="yiv8629367754yui_3_16_0_1_1452339073746_10519" class="yiv8629367754">I tried using Ogr.Geometry.GetX/Y/Z method:<br></span></div><div id="yui_3_16_0_1_1452368375327_7715" dir="ltr"><br><span id="yiv8629367754yui_3_16_0_1_1452339073746_10519" class="yiv8629367754"></span></div><blockquote id="yui_3_16_0_1_1452368375327_13346"><div id="yui_3_16_0_1_1452368375327_9928" dir="ltr"><span id="yiv8629367754yui_3_16_0_1_1452339073746_10519" class="yiv8629367754">feat = layer.GetNextFeature()<br class="" id="yui_3_16_0_1_1452368375327_11152">geom = feat.GetGeometryRef()<br class="" id="yui_3_16_0_1_1452368375327_11154">sub_geom = geom.GetGeometryRef(i)<br class="" id="yui_3_16_0_1_1452368375327_11156">print sub_geom.<b>GetX</b>(i), sub_geom.<b id="yui_3_16_0_1_1452368375327_19954">GetY</b>(i), sub_geom.<b>GetZ</b>(i)<br></span></div></blockquote><div id="yui_3_16_0_1_1452368375327_7563" dir="ltr"><span id="yiv8629367754yui_3_16_0_1_1452339073746_10519" class="yiv8629367754"><br></span></div><div id="yui_3_16_0_1_1452368375327_7565" dir="ltr"><span id="yiv8629367754yui_3_16_0_1_1452339073746_10519" class="yiv8629367754">But it is not working. I can read only 47 points in this way, while the .shp file has much more points than those 47.<br></span></div><div id="yui_3_16_0_1_1452368375327_7570"><span id="yiv8629367754yui_3_16_0_1_1452339073746_10573" class="yiv8629367754"></span><br></div><span id="yiv8629367754yui_3_16_0_1_1452339073746_10573" class="yiv8629367754">I would be very grateful for any kind of advice.<br></span></div><div id="yiv8629367754yui_3_16_0_1_1452339073746_9987"><br>Thank you in advance.<br><br>Kind regards,<br>Djordje Spasic<br></div></div></div></div></div></body></html>