1
0
Fork 0
Commit graph

964 commits

Author SHA1 Message Date
Peter Sadrozinski
2dac4a87e5 stability check
- ran through the last commit, and only 10 airports crashed / locked up.
- EICL, SSPK, and LFBT fix was to simplify the base polygon during cleaning
  reduce_degeneracy() could also be used to fix the issue
  2 polygons clipped against each other shared a vertex.  This causes the
  resulting contour to have a duplicate point with different line segments.
  Luckily, clipper's polygon simplification cleans this up by adding a
  hole contour.  In the above airports, triangulation suceeded, but I'm
  not 100% convinced it will work for all cases.  reduce_degeneracy() will,
  at the expense of modified geometry (very noticible)
- EGLW and SWCH (I think - can't read my own writing) were fixed by expanding
  the user defined boundary by 2 meters for the base, and 5 meters for the
  clearing.  These 2 airports had the user defined boundary touching the exact
  airport layout.  When the base was diffed with the accumulation buffer, the
  resulting polygon was NIL.
  Starting a whole new stability test from the beginning to check for
  regressions.  Down to 5 airports with isses left.
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
ff352fad28 remove_dups() cleanup function would miss 2D dups with different elevations.
- created a new function that will take the higher elevated dup
(as most are ar -9999.0 at initialization.  Use the one with real elevation data)

Fixes UMNB
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
9f96783df6 another stability checkpoint
- found a bug in the polygon library: remove_small_cycles.
  If the cycle wrapped around the end of the point list, it went undetected.
  I created a new detection method, that is slower, but handles this case
  FIXES DNAK
- Added a new polygon cleaner function remove_spikes
  triangulation library doesn't like when segments for close to 0 degree
  angles.  When such an angle is seen (<.1 degree), the point is removed
  FIXES LFKJ (linear features) and YBAF (pavements and base polys)
- I also modified the runway shoulder code to use 11+ meter width.
  I was having problens with polys very close to this leaving a gap.
  The code needs revisiting, since I now see z-fighting betwen the shoulder
  and grass border.

From this point on, all my checkins need to get past the previous checkins
airport.  I am now parsing past LFSB
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
1090e602c2 Stability checkpoint
- When adding intermediate nodes, keep linear feature nodes list seperate from the rest, as they are
  seperate accumulation buffers.
- Revert expand poly by 5cm.  It broke more airports than it fixed :(
- Going back to GPC as well.

Feature Fixes
- finally got around to the last segment in closed linear features.
  I think I am feature complete now.

Remaining issues.
- I still see terrain holes between the base and clearing polys when an airport traverses a tile
  boundary.  I'm not sure where to start here, as genapt doesn't really know about the tile boundary.
  (Is the clearing part of the tile construction? - need to look into this)
)
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
372cbdf38f Added tgPolygonExpand() to grow / shrink polygons using clipper library.
- used to expand pavement polygons so they overlap slightly (5cm)
  This prevents slivers being formed between pavements when designers
  add their own taxiway shoulders, and try to line them up instead of
  placing the boundary 'under' the taxiway.
- also useed to create the default airport base.  This allows the base
  to follow the taxiways better - allowing concave boundaries, instead
  of the previous convex hull.

Memory leaks squashed.  Fixed several memory leaks reported by valgrind.
- GenApt850 can now run forever (or at least until it segfaults)

Very long linear segments in linear features are now broken up to
avoid triangulation errors

Added back some clipper boolean operations (diff and union).  These can
be used instead of the GPC functions by using tgPolyGonDiffClipper and
tgPolygonUnionClipper.  GPC had crashed in a few airports when clipping
linear features.  Using the clipper routines don't crash.  More investigation
is needed.  It may be something about the polygons being clipped more that
the clipping action itself.  In these problem airports, there are some
linear features extending far from the airport.
( I had thought those issues were fixed :( )

More warning cleanups.
2012-03-25 23:54:16 +02:00
Peter Sadrozinski
00afd0cb17 - I forgor to include my preliminary support to allow triangleJRS to return
success / failure.  I have some local changes to the lib to support it, but
  they aren't verified.  Checking in the support, that always returns success.
- allow clipper and GPC libraries to be included together.
  I need clipper for expanding polys, but I'm still using GPC for clipping.
2012-03-25 23:54:15 +02:00
Peter Sadrozinski
37a46c4075 Stability checkpoint for genapt850
- break up and expand shoulder polys, so they overlap runways.
  This keeps cracks from forming between the shoulder and runway
  do to roundoff error
- Add verbose option to polygon_tesselate functions to aid in debugging
  can set at runtime to produce triangulation output for just 1 poly.
- add remove_small_cycles to poly cleanup routines before triangulation
- more warnings cleanup in ClosePoly.cxx
- add more output in normal execution path, as some airports can go for
  hours without printing any status.  Hard to tell if it's locked up
2012-03-25 23:54:15 +02:00
PSadrozinski
27c31404ca Compile warnings cleanup round 1 2012-03-25 23:54:15 +02:00
PSadrozinski
48774e19e8 removing automake files - just updating cmake build files from now 2012-03-25 23:54:15 +02:00
PSadrozinski
de5dbfd6a5 Bring in textured roads, streams, and railroads.
- 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.
2012-03-25 23:54:15 +02:00
PSadrozinski
a6058dff58 - brought in clipper (alternative to gpc)
- 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
2012-03-25 23:54:15 +02:00
PSadrozinski
bc3ecf8fe9 - Add --texture-line option to ogr-decode to generated polygons with texture parameters
- change cout to SG_LOG so we can turn down the verbosity
2012-03-25 23:54:15 +02:00
PSadrozinski
f2af9db3c8 ran uncrustify on Polygon Library files. Makes it much more readable.
ran a test with all tools (decode, genapts and construct) succesfuly.
2012-03-25 23:54:15 +02:00
PSadrozinski
9add3fdaae moving texparams header from genapt to poly library. Need it for new construct. 2012-03-25 23:54:15 +02:00
Christian Schmitt
18b2c8a51a Correctly position the PAPI lights around the center and enable
left/right-handed PAPI versions
2012-03-25 23:54:15 +02:00
PSadrozinski
b583e8d0f0 use polygon-offset effect to render linear features 2012-03-25 23:54:14 +02:00
PSadrozinski
deaebbeb4d conditionaly compile native clipper lib poly optimizations 2012-03-25 23:54:14 +02:00
Christian Schmitt
f77da29398 forgot to add length extend calculation to the new gen_wgs84_area
function. Also fixed the runway area functions accordingly.
2012-03-25 23:54:14 +02:00
Christian Schmitt
f7ca9005ce Double the char value in the signs parser to prevent an
out of bounds segfault.
2012-03-25 23:54:14 +02:00
Maxime Guillaud
fd597739ea Increase ARRAY_SIZE_1 (previous value was too low and genapts would crash processing ENAL).
Add some code to catch this issue and abort with a helpful error message next time.
2012-03-25 23:54:14 +02:00
PSadrozinski
881c4e131b fix for FIndAirport to handle heliports 2012-03-25 23:54:14 +02:00
Christian Schmitt
16ff1e89cc Add runway shoulders support.
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.
2012-03-25 23:54:14 +02:00
Christian Schmitt
09352611d5 Add a second gen_wgs84_area function as preparation for shoulders.
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.
2012-03-25 23:54:14 +02:00
PSadrozinski
b24bcbb1ee Remove OSG capabilities and libraries. 2012-03-25 23:54:10 +02:00
Christian Schmitt
a5a14e2330 Initialize variables and remove unused ones 2012-03-25 23:53:50 +02:00
PSadrozinski
dfb4ece77e fixed 2 crashes.
- 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.
2012-03-25 23:53:49 +02:00
PSadrozinski
06d0d8bdd9 added support for --start-idx so I can restart after a failed airport. 2012-03-25 23:53:49 +02:00
Christian Schmitt
a377f11dad Fix a segfault related to water runways 2012-03-25 23:53:49 +02:00
Christian Schmitt
ea0fd7d9dd Do not error out on correct runway surface 2012-03-25 23:53:49 +02:00
Christian Schmitt
fcdeaae2fd Remove a duplicate function and fix a segfault when using the
--airport option.
2012-03-25 23:53:49 +02:00
PSadrozinski
595a190dd3 - min/max lat/lon command line options - can try to parse entire apt.dat
- lot's of cout -> SG_LOG changes so genapt produces minimal output
2012-03-25 23:53:49 +02:00
PSadrozinski
db1a734b19 Add an optimization to BuildBtg - the accumulator is kept in the native
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.
2012-03-25 23:53:49 +02:00
PSadrozinski
59b534616f Fix for using clipper library
- it doesn't fix my donut problem - still need to fix degenerate nodes.
2012-03-25 23:53:49 +02:00
Christian Schmitt
33d88b8c27 Write out the taxiway sign headings 2012-03-25 23:53:49 +02:00
Christian Schmitt
812dd638af Rework the runway designation code. All put into one function.
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.
2012-03-25 23:53:49 +02:00
Christian Schmitt
10260917f8 adapt the help output a bit 2012-03-25 23:53:48 +02:00
PSadrozinski
2e07528da3 Added support for clipper library
- still some issues, but it 'mostly' works
   (change #define in src/lib/polygon to select clipper library)
 - added performance statistics
2012-03-25 23:53:48 +02:00
PSadrozinski
4fb1944964 Adding Clipper library (experimental) 2012-03-25 23:53:48 +02:00
Christian Schmitt
dc3449a860 Remove texture coordinates length calculations from certain places.
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.
2012-03-25 23:53:48 +02:00
PSadrozinski
1663620e35 command line option --airport working. Tested with full apt.dat 2012-03-25 23:53:48 +02:00
PSadrozinski
3ba27cd481 Added Airport boundary support.
- needs testing on lots of airports.  I'm uncomfortable with expanding
  concave polys by 20 meters.  I really need to find a safe polygon expander.
2012-03-25 23:53:48 +02:00
Christian Schmitt
33c92f60f6 Fix a boundary size bug. All boundaries with < 2 nodes are discarded now 2012-03-25 23:53:48 +02:00
Christian Schmitt
8ebbb39893 generate simple runway including threshold 2012-03-25 23:53:48 +02:00
Christian Schmitt
c551e81136 add water runways. The corresponding buoys will follow into fgdata :) 2012-03-25 23:53:48 +02:00
Christian Schmitt
ec6b862730 ...and also remove bug work-around scripts 2012-03-25 23:53:48 +02:00
Christian Schmitt
ec3aa2a623 Now that the important stuff is ported, remove old files
that are no longer needed
2012-03-25 23:53:48 +02:00
PSadrozinski
051497bede Added taxiway/runway sign link creation 2012-03-25 23:53:48 +02:00
Christian Schmitt
e9a266fdf1 Helipads are also back, including some light 2012-03-25 23:53:42 +02:00
Christian Schmitt
1990ce6806 The size of the runway base should depend on the runway width 2012-03-25 23:53:32 +02:00
Christian Schmitt
504f5ef46c Refactor the runway code and exclude some math functions
from the class for general use
2012-03-25 23:53:28 +02:00