LINEDENSITY

LINEDENSITY calculates the density of selected lines as per grid units, and save the result into a csv file.

INTRODUCTION

Line density means the cumulative lengths of lines over a given area.

The result is arranged in a csv file in rows and columns, represents the grid rows and columns in the drawing.

The calculation order is from top left corner of the grid, from left to right, when completes one row, it goes down to the next row below and starts from left side until completes all grid units.

Concept and terminology

An example of the result in csv file

Command: LINEDENSITY
Select objects:

Only line objects are valid for selection. Please explode/convert polyline and other objects to line first.

Please enter unit length:

Unit length defines the size of a square-shaped grid unit. It must be a positive number.

The precision of the unit length determines the precision of the result. For example, enter "15.000" as the unit length will assign 3-digits decimal precision to the result, and enter "15" will not get decimal part in the result.

Select top left corner of grid as the basepoint / <Use extend of selection>:

Pick up the top left corner of your grid system as the basepoint, or enter to accept the default option of "Use extent of selection" which means LINEDENSITY will find out the extent of selected object automatically and set the basepoint at the top left corner of the extent.

The default result file is saved in the same folder as current drawing with a suffix of "_linedesity.csv" added to current drawing name.

If the folder is read-only or the default file is opened at the moment, it will pop up a dialogue box and prompt you to "Select or create an output file".

It shows the processing percentage indicator as below, until all calculations have been completed.

Processing ... 15.56%

When completed, it prints the directory of the result file in the command line window:

Line density file is saved as:
Drive:\xxx\sss\drawingname_linedesity.csv

TIPS

  1. The top left corner of grid and XY direction of the grid is relative to current UCS. Rotate UCS to change X, Y direction of the grid.

  2. If all results are 0, try to increase the precision of entered unit lenght which affects the precsion of the result.

NOTES

  1. Lines outside of the grid extent are not included in the calculation.
    For example, if the basepoint is selected by user and is in the center position of selected lines,
    then all lines/line parts above and left to that point will not included.

  2. The bottom and right extent of the grid is determined by the grid unit length and line objects extent.
    For example, the extent of line objects in X direction is 33 and the grid unit length is 10, if the basepoint is at the top left corner of the objects extent, it will only calcul 3 units in X direction which is 10x3=30 long in total.
    All lines and line parts in between 30 to 33 will not included in the calculation.

TRIAL VERSION LIMITS

Trial version has some restriction.

  • Only 9 grid units can be calculated

Please simply email liugesen@126.com to get a free Registration Code.

DISCUSSIONS

UPDATES

09/07/2011, First issue