geo:region-clean( $region as cts:region, [$options as xs:string*] ) as cts:region
This function fixes various problems with the region or raises an error if it is not repairable. The only relevant fix for MarkLogic is to remove duplicate adjacent vertices in polygons (including inner and outer polygons of complex polygons). The only relevant options are options controlling the coordinate system and the tolerance option.
The value of the precision
option takes precedence over
that implied by the governing coordinate system name, including the
value of the coordinate-system
option. For example, if the
governing coordinate system is "wgs84/double" and the precision
option is "float", then the operation uses single precision.
geo:region-clean( cts:polygon(( cts:point(40.1234567890,-120.1234567890), cts:point(40.123456543,-120.123456543), cts:point(40.12455,-120.123467), cts:point(40.13456,-120.1455195)))) => A cts:region with the following coordinates: 40.123457,-120.12346 40.12455,-120.12347 40.13456,-120.14552 40.123457, -120.12346
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.