- use ogr-decode with new option --texture-lines to generate polygons
with texture info
- possible fix for triangulation errors when triangulating each poly by
itself.
(It's worked for me, but more testing needed)
- Still using GPC for clipping. CLIPPER adds time, and looks to have
more errors. More testing needed here as well.
Simply edit the #define in polygon.h to choose clipping library.
Major TODOs:
1) There is 1 tile (with the most heavy OSM data) that blows up, and I get huge
road textured polys all over the place. Must be an overrun somewhere.
2) Lake / Ocean smoothing. The current algorithm handles all nodes at once. I'm
going to need to modify for the new structure
3) neighbor tile matching. This actually doesn't look so bad without it implemented.
The old method would add points in the triangulator. If a point was added on the
tile boundary, a t-junction would be created. Points are no longer added in triangulation,
so the polygon splitting in ogr-decode should make the points equal on each side of
the tile boundary. (I haven't seen any t-junctions, at least)
4) cleanup - this is a bit of a mess. I really want to refactor to make the code more understandable.
- moved poly_extra from genapts to polygon library (add intermediate nodes)
- change TGPolyList to arrays of superpolys and texparams in preperation for
generating tex coordinates for line data
This was harder than expected as the shoulders were often partially
covered by runway polygons. This was caused by inaccuracies introduced
by the calculation of dimensions from the runway center.
Now we create shoulders if set in apt.dat. If no shoulders are set,
a 1m broad stripe is added to concrete and asphalt runways to make
the blending runway-airport surface more visually appealing.
This function uses the 2 runway end points as supplied by apt.dat,
which eliminates some inaccuracies that occur when calculating with
only one center point.
- experimental : I haven't seen that this change has any detrimental effectt, and it avoids a
crash in triangle library if I don't split long edges before diffing the accumulator to
generate base_poly. Side effect could be t-junctions, but preliminary look at KATL seemed to give
the same (poor) effect - sometimes there are vertical gaps between the airport base and the terrain.
- Bad data on a few airports - Linear feature definition followed immediately by a
termination node - can't have a single point for linear feature definition, so I discard it.
clipping library format, so it doesn't have to be converted / reconverted
between clipping and TGPolygon types for each operation - shaves about
12 seconds from KATL build.
This does now support literal runway names like "07" instead of "7".
Also support upcoming "XX" designation which marks a runway as
non-numbered. Testing needed.
The width calculation is corrected now and should fix distorted
runway textures.
Hopefully we can get rid of this width mumbo-jumbo soon, too.
It has to stay for now as I found no solution.