sum of shp lines

sum of shp lines

Anonymous
Not applicable
592 Views
4 Replies
Message 1 of 5

sum of shp lines

Anonymous
Not applicable

 How do I add lengths of lines or Polynesians, of shp files, that contain the same name in some field of attributes For example, I have 100 pipes, of which 30 are made of plastic and 70 of steel, in the attribute table I can see all those pipes with their respective lengths, now I want you to tell me in total what length I have of plastic and what length I have of steel .

Thank you

0 Likes
593 Views
4 Replies
Replies (4)
Message 2 of 5

ChicagoLooper
Mentor
Mentor

The down-n-dirty, fast way.

  1. Open Table View of the shapefile.
  2. Click the dropdown arrow next to OPTIONS at the bottom edge of the table view.
  3. Choose 'Select All' and the entire table will highlight blue.
  4. Right click anywhere blue and choose COPY.
  5. Open a new, blank spreadsheet.
  6. Right click in cell A1 and select PASTE.

 

1-In the Table, Options dropdown arrow at bottom of table=>Select All.1-In the Table, Options dropdown arrow at bottom of table=>Select All.

 

Open a new, blank spreadsheet, click cell A1, right click and paste contents of your clipboard.

2-Highlight A1, right click and paste the Table.2-Highlight A1, right click and paste the Table. 

 

If you wish, you may insert a blank ROW at the top of the spreadsheet and type in the column headings. You can now perform calculations in your spreadsheet.

Chicagolooper

EESignature

Message 3 of 5

Anonymous
Not applicable

Thanks for possible solution. I was looking for if from AutoCAD you can do that grouping by attributes and from autocad see the total lengths

 

0 Likes
Message 4 of 5

ChicagoLooper
Mentor
Mentor

You should use caution when adding attribute values listed in the Table View. The numbers in the table are NOT dynamic. This means if the geometry changes, lengthen a shapefile line or shorten a shapefile line, the value in the table will remain the same. This is in contrast to a line or polyline in AutoCAD where line length is immediately reflected in the PROPERTIES PALETTE.

 

To make the shapefile's table data consistent with the new length after a line is modified, you'll need to edit the value, or the length, directly in table's cell. Again, the Table Values are static, not dynamic.

 

To alleviate this, you may use MAPIMPORT command to import the shapefile. The Mapimport command will turn the shapefile geometry, or the ESRI entity, into AutoCAD entities, i.e. lines, polylines or points. The import procedure will be geospatially accurate and can 'hold' or maintain the dbf as OBJECT DATA. If you import it correctly, you can see the object data, abbreviated OD, at the bottom of the properties palette when you select an imported entity. 

 

If the original author of the shapefile has made changes to the line lengths without making the appropriate edits in the table (or the dbf file) then the lengths listed in the table will not be accurate.If the original author is not aware that an office colleague has made a change to the shapefile line length, then the colleague should make an edit to the dbf file to reflect the new length of the line.

Chicagolooper

EESignature

Message 5 of 5

parkr4st
Advisor
Advisor

Before the copy and paste, add a calculation  column Length2D (  Geom  ) .  that will update automatically as you change line lengths. then use the spreadsheet to analyze the data from that column

 

Dave

0 Likes