Report Inappropriate Content
Top Print
This Forum is closed for replies.
|
| Subject |
Re: Export / conversion of Shapefile : SHP to CSV or XML (shp2csv / shp2xml) |
| Author |
Dan Patterson |
| Date |
Jun 10, 2005 |
| Message |
I have designed it to run from a tool in the interim, see the script header, add a tool, specify the parameters and their properties etc
#Properties (right-click on the tool and specify the following)
#General
# Name FeaturesToCSV
# Label Features to CSV
# Desc Produces a csv file which contains X, Y and Z/M (if present)
# along with optional attributes for all features in a feature
# class. Selections will be honored in the output if you desire
# a subset. An output projection can be specified as well, to
# project any longitude/latitude output to another coordinate system.
#Source script ScriptNameHere.py
#
#Parameter list
# Parameter Properties
# Display Name Data type Type Direction MultiValue
# argv[1] Input feature class Feature Layer Required Input No
# argv[2] Optional fields Field Optional Input Yes
# argv[3] Output text file Text file Required Output No |
| |
Geomatics, Carleton University, Ottawa, Canada |
| |
|
Report Inappropriate Content
Top Print
This Forum is closed for replies.
 |
| Subject |
Re: Export / conversion of Shapefile : SHP to CSV or XML (shp2csv / shp2xml) |
| Author |
Dan Patterson |
| Date |
Jun 11, 2005 |
| Message |
Scott
I didn't bring over all the attributes, the zip contains a toolbox, the script (with documentation fixed...my apologies) and the text file.
In short a shapefile is the sum of its parts, at least the shp, dbf and shx are required in order to use (kindof like a car needing the body, the engine and some wheels :) ). Let me know if the toolbox works, this is first time I have tried to distribute a toolbox. I will have to provide some more testing to bring attributes over that contain null values (not there yet).
Dan |
| |
Geomatics, Carleton University, Ottawa, Canada |
| |
Features2CSV.zip (opens in new window)
|