| 10 | |
| 11 | ||='''Douglas-Peucker algorithm ''' =|| |
| 12 | |---------------- |
| 13 | {{{#!td style="vertical-align:top; text-align:left;width: 250px" |
| 14 | For polygon P = {p,,0,,,p,,1,,,...,p,,n,,}: |
| 15 | * Approximate P by the line segment p,,0,,p,,n,, |
| 16 | * Determine furthest vertex p,,f,, from p,,0,,p,,n,, |
| 17 | * If distance d(p,,f,,,p,,0,,p,,n,,) < ε, accept p,,0,,p,,n,, as approximation.\\ |
| 18 | Else, break P at p,,f,, and recursively\\ |
| 19 | approximate {p,,0,,,p,,1,,,...,p,,f,,} and {p,,f,,,...,p,,n,,} |
| 20 | }}} |
| 21 | {{{#!td style="vertical-align:top; text-align:left;width: 250px" |
| 22 | asdf |
| 23 | }}} |
| 24 | |
| 42 | |
| 43 | == NAMELIST group name: {{{prepro_par}}}== |
| 44 | |
| 45 | ||='''Parameter Name''' =||='''[wiki:/doc/app/fortrantypes FORTRAN Type]''' =||='''Default Value''' =||='''Explanation''' =|| |
| 46 | |---------------- |
| 47 | {{{#!td style="vertical-align:top; text-align:left;width: 150px" |
| 48 | [=#flag_2d '''flag_2d''] |
| 49 | }}} |
| 50 | {{{#!td style="vertical-align:top; text-align:left;style="width: 50px" |
| 51 | L |
| 52 | }}} |
| 53 | {{{#!td style="vertical-align:top; text-align:left;style="width: 75px" |
| 54 | .F. |
| 55 | }}} |
| 56 | {{{#!td |
| 57 | Flag to force usage of 2d-buildings.\\\\ |
| 58 | If set to .T., this flag forces the usage of buildings_2d even if buildings_3d is available. See [wiki:doc/app/iofiles/pids#topo here] for information on topography and building input. |
| 59 | }}} |
| 60 | |---------------- |
| 61 | {{{#!td style="vertical-align:top; text-align:left;width: 150px" |
| 62 | [=#internal_buildings '''internal_buildings''] |
| 63 | }}} |
| 64 | {{{#!td style="vertical-align:top; text-align:left;style="width: 50px" |
| 65 | L |
| 66 | }}} |
| 67 | {{{#!td style="vertical-align:top; text-align:left;style="width: 75px" |
| 68 | .F. |
| 69 | }}} |
| 70 | {{{#!td |
| 71 | Flag to control usage of buildings within courtyards.\\\\ |
| 72 | By default, buildings completely surrounded by another building are excluded from the visibility graph as pedestrians can neither reach nor leave enclosed areas such as courtyards. If '''internal_buildings = .T.''', buildings within courtyards are allowed. The resulting navigation nodes can, however, never be connected to nodes outside of the courtyard. In such cases, be sure to set the target of a agent group originating inside a courtyard also within that same courtyard. |
| 73 | }}} |
| 74 | |---------------- |
| 75 | {{{#!td style="vertical-align:top; text-align:left;width: 150px" |
| 76 | [=#tolerance_dp '''tolerance_dp''] |
| 77 | }}} |
| 78 | {{{#!td style="vertical-align:top; text-align:left;style="width: 50px" |
| 79 | R * 3 |
| 80 | }}} |
| 81 | {{{#!td style="vertical-align:top; text-align:left;style="width: 75px" |
| 82 | 1.41, \\0.7, \\0.35 |
| 83 | }}} |
| 84 | {{{#!td |
| 85 | Tolerance for simplification of building polygons during preprocessing.\\\\ |
| 86 | Each building is stored as a counter-clockwise sorted polygon. Initially each building polygon consists of all inner and outer corners of the PALM topography as vertices. Due to the rastered nature of this grid this may be a very large number of vertices. The Douglas-Peucker-Algorithm ([#hershberger1994 Hershberger and Snoeyink, 1994]) is used to reduce the number of vertices.\\ |
| 87 | This algorithm recursively approximates a polygon section as a straight line connecting the end points of that section. If the greatest distance between this line and any vertex between the end points is smaller than '''tolerance_dp''', the approximation is accepted and all vertices in between are deleted. Otherwise, the segment is split into two segments at the vertex of greatest distance and the process is repeated.\\\\ |
| 88 | '''tolerance_dp''' is internally multiplied with {{{SQRT( dx*dy )}}}. If a building is left with less than 4 vertices after simplification using '''tolerance_dp(0)''', it is reset and the process is repeated with '''tolerance_dp(1)''', then '''tolerance_dp(2)''', if necessary.\\\\ |
| 89 | '''NOTE:''' The APT-P produces an ASCII output-file {{{topo.txt}}}. The polygon data is stored in this file. After execution of the tool, please check the polygon representation. If you are not satisfied, adjust '''tolerance_dp''' and rerun the tool. |
| 90 | }}} |
| 91 | |
| 92 | == References == |
| 93 | * [=#hershberger1994] '''Hershberger, J., Snoeyink, J.''' 1994. An O(''n''log''n'') implementation of the Douglas-Peucker algorithm for line simplification. SCG '94 Proceedings of the tenth annual symposium on Computational geometry. 383-384. [https://doi.org/10.1145/177424.178097 doi] |