Thank you for the reply Mr. Flannigan,

Sadly I have no knowledge of Perl.
If its "Geo::ShapeFile" module uses the same C# GDAL bindings (or is based on 
them), then I might try to take a look at your Perl code.
If not, then I guess I can not make use of it.

I respect the intention to help, though.

Kind regards,
Djordje Spasic

      From: Mike Flannigan <[email protected]>
 To: [email protected] 
Cc: [email protected]
 Sent: Monday, January 11, 2016 3:11 AM
 Subject: Re: [gdal-dev] Reading the points from shp file
   

I can't help with the ironpython problem you are
having, but I have a couple of Perl scripts that
strip data from shp files.  They are not likely
to do what you want, but I could try it if you
want me to.

One of them says this:

# This program extracts data from shp and shx files
# and places the data into the $outfile.  Place both
# the .shp and .shx file in the C:/Copy directory.
# The output file is also created in the same directory.

I can also send the files if you run Perl.  They use
the Geo::ShapeFile module.


Mike


On 1/10/2016 2:00 PM, [email protected] wrote:
> Hello,
>
> I am trying to read the point geometry from .shp file in ironpython 2.7, by 
> using C# gdal bindings (downloaded from gisinternals).
> There is a tutorial on how this can be done on gdal.org, 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).
>
> I googled a bit, and found the ogrinfo C# file example by Tamas Szekeres, 
> which helped me to replicate what I want in ironpython, but only partly.
> What I need is to get the points of each line and polygon from .shp file.I 
> checked the Ogr.Geometry class, but I still do not understand how to do it.I 
> tried using Ogr.Geometry.GetX/Y/Z method:
>
>
> feat = layer.GetNextFeature()
> geom = feat.GetGeometryRef()
> sub_geom = geom.GetGeometryRef(i)
> print sub_geom.GetX(i), sub_geom.GetY(i), sub_geom.GetZ(i)
>
>
> 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.
>
> I would be very grateful for any kind of advice.
>
> Thank you in advance.
>
> Kind regards,
> Djordje Spasic



  
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to