- Line String Elements
- Shape Elements
- Shape With Holes Elements
- Complex Line String Elements
- Complex Shape Elements
- Complex Shape With Holes Elements.
Currently, the maximum number of points is set to 12,000 and is sometimes too low to accommodate certain elements. Some polygons may contain 50,000 or more points for seemingly trivial features. There are various ways to deal with this problem when converting data for GTViewer. The GTShapeConv utility can decompose one of these elements into a group of elements with fewer points and this is generally the ideal solution, but it becomes a problem when you do this with large polygons. The polygon element will be broken down into a group of independent line strings that together will look like the polygon. The problem with this solution is that the converted element is no longer a polygon and can’t be filled.
If you are using Safe Software’s FME to convert your data to the GTViewer format, a clever transformer called the LineGenerlizer can be used to thin out the number of points in a linestring or polygon. By simply placing this transformer between your source and destination and configuring its parameters, the number of points in the elements will be reduced and fit into the elements without breaking them up.
A variety of parameters are available to generalize the element. I will leave it up to the user to look at the FME documentation for more details. However, I will discuss how to determine if you have satisfactorily adjusted the parameters enough to get all of the large polygons small enough to fit in to the maximum allowed number of points. When you run FME to convert your data, you will get warning messages like the following for elements that contained more than the maximum allowed points:
Shape with Holes contains more than the maximum number of points (20094, Max: 12000). Converted as a group of linestrings.
Shape with Holes contains more than the maximum number of points (12374, Max: 12000). Converted as a group of linestrings.
Shape with Holes contains more than the maximum number of points (24081, Max: 12000). Converted as a group of linestrings.
For generalizations using the Douglas algorithm, you can increase the generalization tolerance until you no longer get these warnings.
Not only will this process reduce the number of points in the elements enough to generate the appropriate elements, the reduction in points further improves performance, reduces the overall data size, and you probably will not be able to tell the points were removed in the first place.