1
0
Fork 0
Commit graph

1149 commits

Author SHA1 Message Date
Peter Sadrozinski
cc0d913712 - refactor construct.cxx into smaller files
- remove Match - tile matching now handled in tgconstruct_shared.cxx
2012-10-06 22:10:09 +02:00
Peter Sadrozinski
c39e3e0542 elevation averaging and neighbor tile faces included in point normal calculation 2012-10-06 22:10:09 +02:00
Peter Sadrozinski
6a3a57f198 tile matching phase 1
- 3 stage construct
- insert neighbor vertexes from all sides
2012-10-06 22:10:09 +02:00
Peter Sadrozinski
779db9566b multistage coming along - need TGNodes derialization 2012-10-06 22:10:09 +02:00
Peter Sadrozinski
f52e3fef75 fix clipper usage to fix accumulator contours. 2012-10-06 22:10:09 +02:00
Peter Sadrozinski
b44c6c00d0 - some clipperfixes for tgconstruct. bring in clipper 4.8.9
Hopefully, we can start another clc06 test with this fix
- add lots of debug, in case more clipper issues uncovered
  added --debug-areas= allows turning on debug for an area
  can dump the accumulator when using it.
- fixed the swirlies round 2 workaround on tile output, rather than
  stopping the load of polygons at arbitrary threshold.
  (hopefully, we'll have a fix for this in simgear soon)
- modified ogr-decode (when using --texture-lines) to insert triangles
  instead of self-intersecting trapezoids when the turn angle between
  segments is too steep (hit this issue when experimenting with cgal-clipping)
  we were adding a lot of self intersecting polys on line data
- needed to add gdal library to all executables that link against Polygon
  TODO - combne Geometry and Polygon libs - they are completely joined, now.
2012-10-06 22:10:09 +02:00
Peter Sadrozinski
55bfcd80e7 fix for ogr-decode --line-width-column option.
When combined with the --line-width option, if the field is present, but has
no value, gdal returns 0.  Use the value from --line-width in this case.
2012-10-06 22:10:09 +02:00
Christian Schmitt
cd0ee283c0 Adapt helipad shoulder to newconstruct changes 2012-10-06 22:10:09 +02:00
Christian Schmitt
e367395813 Remove runway type check that always returns true 2012-10-06 22:10:09 +02:00
Christian Schmitt
723ce3b7d5 CMake: require at least CGAL 4.0 2012-10-06 22:10:09 +02:00
Christian Schmitt
eccb6d1388 Fix for a genapts810 segfault in conjunction with clipper use 2012-10-06 22:10:08 +02:00
Christian Schmitt
36c8cbbb15 genapts scheduler: improve info message 2012-10-06 22:10:08 +02:00
Christian Schmitt
c016041337 Remove TriangleJRS. All tesselation is now done by CGAL. 2012-10-06 22:10:08 +02:00
Christian Schmitt
65bcb00dee Switch old genapts to CGAL for tesselation 2012-10-06 22:10:08 +02:00
Christian Schmitt
e8936f773c genapts (old): removal of GPC introduced wrong runway polys in some cases. Add snap to fix this.
Fix airport skirts as well
2012-10-06 22:10:08 +02:00
Peter Sadrozinski
87df5b805e add help text for --share-dir 2012-10-06 22:10:08 +02:00
Peter Sadrozinski
3b2dfba225 - add --shared-dir option to get ready for new tile matching
and make it easier to share work and data dirs on a server
2012-10-06 22:10:08 +02:00
Christian Schmitt
916544f4fe Fix the wrong normals on the airport skirt, introduced by the GPC removal.
Simply changing the order of upper and lower points does the trick.
Also fix indentation
2012-10-06 22:10:08 +02:00
Christian Schmitt
28bc14e4cc Use CGAL for tesselation in genapts850 2012-10-06 22:10:07 +02:00
Christian Schmitt
3d800bbb77 Clean up includes in the CMake files 2012-10-06 22:10:07 +02:00
Christian Schmitt
7f532ce615 Add cgal helper function for tesselation 2012-10-06 22:10:07 +02:00
Christian Schmitt
771d65881e Only write out txt.gz files if debug is enabled 2012-10-06 22:10:07 +02:00
Christian Schmitt
3e068ed6dd Partially revert "fix some uninitialized data found with valgrind"
Some unwanted changes sneaked in
2012-10-06 22:10:07 +02:00
Peter Sadrozinski
e6d8d69c87 fix some uninitialized data found with valgrind
remove the cpu limit - tgconstruct should be able to run for weeks, now.
2012-10-06 22:10:07 +02:00
Peter Sadrozinski
f24699ca05 Fix a segfault caused by Ocean not being flagged correctly 2012-10-06 22:10:07 +02:00
Christian Schmitt
ca9a6dda13 Finally get rid of GPC 2012-10-06 22:10:07 +02:00
Christian Schmitt
1e64cfc974 Improve construct output. Lower some loglevels and make output more informative 2012-10-06 22:10:07 +02:00
Christian Schmitt
37d07e6526 add GPC includes only where needed. also add newmat includes 2012-10-06 22:10:06 +02:00
Christian Schmitt
d6e7ac6b96 More CGAL cmake changes 2012-10-06 22:10:06 +02:00
Peter Sadrozinski
85ad4573ec - add the extra height nodes to the cgal triangulation
- enable cgal triangulation
2012-10-06 22:10:06 +02:00
Christian Schmitt
f3da89af8a Add CGAL dep to the makefile 2012-10-06 22:10:06 +02:00
Peter Sadrozinski
adfb4482e2 experimental - use cgal for triangulation
try breaking up construct_bucket into stages for better tile matching
2012-10-06 22:10:06 +02:00
Christian Schmitt
e719fa66d2 Rename fgfs-tools-server and fgfs-tools-client to tg-construct-server and tg-construct-client 2012-10-06 22:10:06 +02:00
Christian Schmitt
f32d340921 Remove VC90 project files as CMake has taken over and they are outdated 2012-10-06 22:10:06 +02:00
Christian Schmitt
8f2c0f6cb9 rename fgfs-construct to tg-construct 2012-10-06 22:10:06 +02:00
Peter Sadrozinski
c1de74f4fa Some fixes
- genapt850 : some airports (LSMM) have multiple airport boundaries.
  This caused a lot of the airport to not get a smoothed base (so some landclass polys were not clipped against the airport).  Changed boundary from a single ClosedPolygon to a list.  Seems to work.
  Some misc warnings cleanup in scheduler, and parser

- Clipper using accumulator results in a significant speed boots - enable clipper and the accumulator by default.

- ogr-decode - most of the crashes I'm getting are due to non-continuous roads.  Within a line string, I create adjacent polys that snap correctly.  On the ends, I generate 90 degree angles.  Some linestrings should be consecutive.  As a workaround, I am now extending every start and end poly of linestrings by 0.1 meters.  It makes it better, but I need to do a better job of creating continuous roads.  This will require some preprocessing of the entire shapefile.  (Perhaps all line data shapefiles, to handle correct overpass / underpass logic)
2012-10-06 22:10:05 +02:00
Peter Sadrozinski
346ae44e14 - Fixed issues where an entire landclass poly wold no triangulate.
- Increase epsilon when looking for intermediate nodes
  (setup method for calling function to specify the bounding box and error
   epsilon in case this had adverse effects on genapts)
  This fixes many of the small vertical gaps (T-Junctions)
- Fix an issue with merge slivers.  The clip mask optimization broke
  merge slivers.  WHen merging the slivers with a poly segment, it also
  needs to be merged with the clip mask, so when the segments are
  seperated from the mask, they include the sliver.
- Added to the shapefile debug.
  --debug_shape=tileid:all generates shapefiles for every polygon in the tile
  This is usefull to setup individual debug polys on subsequent passes.
  Also added load, clip, and with_slivers and clean layers for debugging
2012-10-06 22:10:05 +02:00
Peter Sadrozinski
79bdae93fc forgot to include the shape id during tesselation 2012-10-06 22:10:05 +02:00
Peter Sadrozinski
5f83fe82c6 Implemented shape file debug capability via command line options:
--debug-dir=pathname points to the debug root directory.  each tile will create a sub directory in this existing directory. (default is '.')
--debug-shapes=tileid:shape1,shape2,etc..  lists the shapes to debug within a tile
example: if the tesselator crashes in shape id '123', you can rerun with --debug-shapes=2678440:337

implemented the same bounding box optimization from tesselate in FixTJunctions.  Also fixed a bounding box issue that could cause some
elevation points to be missed.

brought in the latest version of clipper - and moved the #define to the construct header

some debug cleanup (especially in polygon loading)
2012-10-06 22:10:05 +02:00
Peter Sadrozinski
cf6d6f42b9 add bounding box calculations to optimize tesselation 2012-10-06 22:10:05 +02:00
Peter Sadrozinski
feeaf602b7 added seperate-segments option to ogr-decode.
- generates an intermediate file for the whole linestring, but as seperate poly/texcoord pairs
- construct generates the union ofthe polys for the main clip routine
- intersection ot the original segment with the clipped mask gives the clipped segment
  This cuts ~75% of clipping time for really complex tiles.  8 tiles for Madeira went from
  4:45:00 to 1:04:00
2012-10-06 22:10:05 +02:00
Peter Sadrozinski
465fccc6a0 checkpoint - madeira builds fine with individual line segments 2012-10-06 22:10:05 +02:00
Christian Schmitt
df4e685c84 Remove fans/strips routines. We don't create fans anymore 2012-10-06 22:10:04 +02:00
Christian Schmitt
05e1670b56 Construct log output: some changes 2012-10-06 22:10:04 +02:00
Peter Sadrozinski
7e55efbb03 Optimize and cleanup
- fix really bad facelist generation.
- add a face area list in superpoly - each triangle area was calculated twice
- cleanup contruct_bucket - calls a function for each step.
  TODO : move groups of operations into their own files
         i.e. load, clip, elevation, shared edges, and output
2012-10-06 22:10:04 +02:00
Peter Sadrozinski
30573aa811 - Point nodes are now generated. Testing Madeira with tranisition shader enbled shows rocky cliffs, so I think thy are correct.
- some small optimizations made by storing triangle nodes in addition to triangle coordinates in TGSuperpoly.  More can be done, here.
- Brute force methos of generating alist of faces for each nodes that the face has is completely brute force.  Looking at original method, I think I can make it work, which should be a significant speedup.
2012-10-06 22:10:04 +02:00
Peter Sadrozinski
80ac1b38f5 - fixed malloc crash caused by - array index.
- fixed exception in find_point_inside.

NOTE: second fix can cause some gaps, as the polygon cleaning can result in a smaller poly than the original.  Need to clean polys after diff, before adding the result to the union.

I'm now able to build all of
adeira - and tile matchine looks good.  Some gaps visible when roads are cleaned incorrectly.
2012-10-06 22:10:04 +02:00
Peter Sadrozinski
22a8d28857 handle multiple tile construction in a single fgfs-construct run 2012-10-06 22:10:04 +02:00
Christian Schmitt
aa3abbe418 Some cosmetics for construct output 2012-10-06 22:10:04 +02:00
Peter Sadrozinski
7e1257ed8a - fixed t-junctions in roads - I was adding intermediate nodes after adding verticies from
neighboring tiles, but before adding the nodes from the result of clipping.
2012-10-06 22:10:04 +02:00