Posted Mon, 28 Aug 2006 10:15:20 GMT by Denim Umeshkumar Anajwala
hi all,
does anybody know how to convert *.SHP files to *.PLY files?

help will be appriciated!

see you soon at berlin!
Posted Mon, 28 Aug 2006 10:52:21 GMT by Boris Lyssenko
Use shptoasc.exe in the /bin directory of the FEFLOW installation. This is a simple command line program converting shape files into *.ply, *.lin or *.pnt files according to the type of shape file.
Posted Mon, 28 Aug 2006 13:39:54 GMT by Denim Umeshkumar Anajwala
thank you!
this is for future users:

[color=Red][b]General Description:[/b][/color]
usage: shptoasc [options] <shape_file> <item>
  options (may be applied in conjunction):   
-f <factor>  use <item>*<factor> as ID
-s <shift>    use <item>+<shift> as ID
-o <outfile> generate <outfile> instead of <shape_file>.{lin|ply|pnt}
-d                  Append DATABASE-extension for JOIN-operation in FEFLOW to a polygon output file.

*  Hit 'start'
*  Hit 'Run'
*  Type in the command box:
     [b] [color=Green]C:\FeFlow\bin\shptoasc d:\feflow\north\gisdata\polyg3.shp id[/color][/b]

This means that the shptoasc module is found at directory C:\FeFlow\bin and that the module will look for the file polyg3.shp at directory D:\Feflow\GISData and create a .ply file in the same directory and in the same name, i.e polyg3.shp.
Posted Fri, 30 Nov 2007 05:30:50 GMT by faby
pl can u tell me how to give the data attributes to the polygon.
Posted Tue, 04 Dec 2007 21:30:57 GMT by Denim Umeshkumar Anajwala
Hey Eladd,

thanks for the example.
Too bad my browser screws up some of the characters ( : I think those are supposed to be tabs?)  :(
Also in the last line of your post, it should say
[b][i][...] will [...] create a .ply file in the same directory and in the same name, i.e. polyg3.ply[/i][/b]
Just a typo :)

As a side note: If your PATH variable contains the path to FeFlow, you command can be truncated to:
[b][i]shptoasc d:\feflow\north\gisdata\polyg3.shp id[/i][/b]

So I checked out shptoasc, and option -d caught my attention. I compared the ply file generated with and without that option. The difference is a section at the end of the file, that defines the linkage to the data in the dbf file (see attachement). It gives you a template and instructions how to modify it. I followed those, but when I tried to join the ply file, it still would recognize the linkage. It popped up the "Item-Parameter Assaciation" dialog. Once you specify the links, it will join the data and save a ffi file. The ffi file looks pretty much the same as the "link section" in the ply file:

DATABASE kZones.dbf

Bottom line is: I don't know why the modified ply file doesn't work, but I figure one could generate ffi files easily since they follow a simple scheme - Faby was asking about that in a different posting ("Polygon file").

Any other ideas on this?


You must be signed in to post in this forum.