<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hy Elias,<br>
      <br>
      your procedure seems correct to me, it is more your conclusion
      that I don't understand...<br>
      What do you mean by "vpb didn't make texture elevated" ? Ha you
      fully zoomed on the textured zone in order to be sure that it is
      really not elevated. When I see the size of your dem, I would say
      that the elevations look reduced, due to the very large size of
      represented zone and the fact that there are only small elevations
      (try to calculate the ratio of highest point of dem and the length
      or width of your terrain).<br>
      As far as I know you can define the extend of generated terrain in
      osgdem (and vpb) with command line option : <br>
      <span style="font-family: monospace;"> -e <x> <y>
        <w>
        <h>     Extents of the model to generate<br>
        <br>
      </span>The artefact is due to the fact that the whole current LOD
      containing your texture will be black (that's why when you get
      farer away you see more black texture)<br>
      <br>
      I think the result will be correct (or look correct to you, as I
      think that it is already correct <span class="moz-smiley-s1"><span>
          :-) </span></span>) once you reduce the extend of your
      generated database.<br>
      <br>
      Regards,<br>
      <br>
      Christian<br>
      <br>
      <br>
      <br>
      Le 11/06/2015 10:52, Elias Tarasov a écrit :<br>
    </div>
    <blockquote cite="mid:1434012768.m2f.64048@forum.openscenegraph.org"
      type="cite">
      <pre wrap="">Hello!

My statement about the problem, that had been solved, looks a little premature.

The problem: 
Terrain is displayed incorrectly.
Results:
1. <a class="moz-txt-link-freetext" href="https://drive.google.com/file/d/0ByDDImhSolf6cGFyV21PRXZuZHM/view?usp=sharing">https://drive.google.com/file/d/0ByDDImhSolf6cGFyV21PRXZuZHM/view?usp=sharing</a>
2. <a class="moz-txt-link-freetext" href="https://drive.google.com/file/d/0ByDDImhSolf6N3FvRkNJUW1nMlk/view?usp=sharing">https://drive.google.com/file/d/0ByDDImhSolf6N3FvRkNJUW1nMlk/view?usp=sharing</a>

Step-by-step actions to make a terrain

0. Gathering required data
        0.1. Choose texture:
        <a class="moz-txt-link-freetext" href="https://drive.google.com/file/d/0ByDDImhSolf6S3E0M1VmR2xDd1U/view?usp=sharing">https://drive.google.com/file/d/0ByDDImhSolf6S3E0M1VmR2xDd1U/view?usp=sharing</a>
        0.2. Choose dem:
        <a class="moz-txt-link-freetext" href="https://drive.google.com/file/d/0ByDDImhSolf6cDNtWjlUa3VqdXc/view?usp=sharing">https://drive.google.com/file/d/0ByDDImhSolf6cDNtWjlUa3VqdXc/view?usp=sharing</a>
        0.3. Downloaded texture:
        <a class="moz-txt-link-freetext" href="https://drive.google.com/file/d/0ByDDImhSolf6eXRpYlhxMFN3NnM/view?usp=sharing">https://drive.google.com/file/d/0ByDDImhSolf6eXRpYlhxMFN3NnM/view?usp=sharing</a>
        0.4. Downloaded dem:
        <a class="moz-txt-link-freetext" href="https://drive.google.com/file/d/0ByDDImhSolf6MXVLUV9kOG1xR2c/view?usp=sharing">https://drive.google.com/file/d/0ByDDImhSolf6MXVLUV9kOG1xR2c/view?usp=sharing</a>

1. Straightforward
        vpbmaster --geocentric -d dem/n30_w086_1arc_v3.tif -t texture/44442.tif -o output/out.osgb

        answer:
        --geocentric
        -d dem/n30_w086_1arc_v3.tif
        ADD: dem/n30_w086_1arc_v3.tif
        -t texture/44442.tif
        ADD: texture/44442.tif
        -o output/out.osgb
        Adding terrainTile
        Error: vpbmaster can not run without all source data being in the correct destination coordinates system, please reproject them.
        Recieved signal 15, doing TERMINATE_RUNNING_TASKS_THEN_EXIT.
        Setting up MachinePool to use all 8 cores on this machine.
        MachinePool::signal(15)
        Machine::signal(15)
        Machine::cancelThreads() hostname=, threads=8
                Cancel thread
                Cancel thread
                Cancel thread
                Cancel thread
                Cancel thread
                Cancel thread
                Cancel thread
                Cancel thread
        Completed Machine::cancelThreads() hostname=, threads=8

2. osgdem
        osgdem --geocentric -d dem/n30_w086_1arc_v3.tif -t texture/44442.tif -o output/out.osgb

        answer:
        --geocentric
        -d dem/n30_w086_1arc_v3.tif
        ADD: dem/n30_w086_1arc_v3.tif
        -t texture/44442.tif
        ADD: texture/44442.tif
        -o output/out.osgb
        Adding terrainTile
        DataSet::_run() 0 0
        Now checking for plug-in osgPlugins-3.3.8/osgdb_nvtt.dll
        osg::Registry::addImageProcessor(ImageProcessor)
        Loaded plug-in osgPlugins-3.3.8/osgdb_nvtt.dll and located ImageProcessor
        started DataSet::createDestination(30)
        reprojecting to file temporaryfile_44442.tif
        ERROR 1: No PROJ.4 translation for source SRS, coordinate
        transformation initialization has failed.
        Failed to reproject texture/44442.tif
        Time for after_reproject 0.003934

        And here program crashes.

3. Manual reprojection using gdalwarp
        3.1. gdalinfo for dem file:
                        Driver: GTiff/GeoTIFF
                        Files: n30_w086_1arc_v3.tif
                        Size is 3601, 3601
                        Coordinate System is:
                        GEOGCS["WGS 84",
                                        DATUM["WGS_1984",
                                                        SPHEROID["WGS 84",6378137,298.257223563,
                                                                        AUTHORITY["EPSG","7030"]],
                                                        AUTHORITY["EPSG","6326"]],
                                        PRIMEM["Greenwich",0],
                                        UNIT["degree",0.0174532925199433],
                                        AUTHORITY["EPSG","4326"]]
                        Origin = (-86.000138888888884,31.000138888888891)
                        Pixel Size = (0.000277777777778,-0.000277777777778)
                        Metadata:
                                AREA_OR_POINT=Point
                                DTED_CompilationDate=0002
                                DTED_DataEdition=02
                                DTED_DigitizingSystem=SRTM
                                DTED_HorizontalAccuracy=0013
                                DTED_HorizontalDatum=WGS84
                                DTED_MaintenanceDate=0000
                                DTED_MaintenanceDescription=0000
                                DTED_MatchMergeDate=0000
                                DTED_MatchMergeVersion=A
                                DTED_NimaDesignator=DTED2
                                DTED_OriginLatitude=0300000N
                                DTED_OriginLongitude=0860000W
                                DTED_Producer=USCNIMA
                                DTED_RelHorizontalAccuracy=NA
                                DTED_RelVerticalAccuracy=0004
                                DTED_SecurityCode_DSI=U
                                DTED_SecurityCode_UHL=U
                                DTED_UniqueRef_DSI=H24 084
                                DTED_UniqueRef_UHL=H24 084
                                DTED_VerticalAccuracy_ACC=0005
                                DTED_VerticalAccuracy_UHL=0005
                                DTED_VerticalDatum=E96
                        Image Structure Metadata:
                                INTERLEAVE=BAND
                        Corner Coordinates:
                        Upper Left  ( -86.0001389,  31.0001389) ( 86d 0' 0.50"W, 31d 0' 0.50"N)
                        Lower Left  ( -86.0001389,  29.9998611) ( 86d 0' 0.50"W, 29d59'59.50"N)
                        Upper Right ( -84.9998611,  31.0001389) ( 84d59'59.50"W, 31d 0' 0.50"N)
                        Lower Right ( -84.9998611,  29.9998611) ( 84d59'59.50"W, 29d59'59.50"N)
                        Center      ( -85.5000000,  30.5000000) ( 85d30' 0.00"W, 30d30' 0.00"N)
                        Band 1 Block=3601x1 Type=Int16, ColorInterp=Gray
                                NoData Value=-32767
                                Unit Type: m
                                
        3.2. gdalinfo for texture file
                        Driver: GTiff/GeoTIFF
                        Files: 44442.tif
                        Size is 5000, 5000
                        Coordinate System is:
                        LOCAL_CS["unnamed",
                                        UNIT["US survey foot",0.3048006096012192,
                                                        AUTHORITY["EPSG","9003"]]]
                        Origin = (1655000.330000000100000,559999.510000000010000)
                        Pixel Size = (1.000000000000000,-1.000000000000000)
                        Metadata:
                                AREA_OR_POINT=Area
                                TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
                                TIFFTAG_XRESOLUTION=1
                                TIFFTAG_YRESOLUTION=1
                        Image Structure Metadata:
                                INTERLEAVE=PIXEL
                        Corner Coordinates:
                        Upper Left  ( 1655000.330,  559999.510)
                        Lower Left  ( 1655000.330,  554999.510)
                        Upper Right ( 1660000.330,  559999.510)
                        Lower Right ( 1660000.330,  554999.510)
                        Center      ( 1657500.330,  557499.510)
                        Band 1 Block=5000x1 Type=Byte, ColorInterp=Red
                                Overviews: 1024x1024
                        Band 2 Block=5000x1 Type=Byte, ColorInterp=Green
                                Overviews: 1024x1024
                        Band 3 Block=5000x1 Type=Byte, ColorInterp=Blue
                                Overviews: 1024x1024
        
        3.3. Conclusion: 
        We need to reproject texture file to match dem file
        
        3.4. Reprojection
        Since I was pointed that t_srs for texture file is EPSG:2238 and WGS_1984 is EPSG:4326 (at least what i was able to find), then:
        c:\Terrain\FromUSGS\texture>gdalwarp -s_srs EPSG:2238 -t_srs EPSG:4326 44442.tif 44442_conv.tif
        Creating output file that is 5386P x 4662L.
        Processing input file 44442.tif.
        0...10...20...30...40...50...60...70...80...90...100 - done.
        
        3.5. gdalinfo for reprojected texture file
                        Driver: GTiff/GeoTIFF
                        Files: 44442_conv.tif
                        Size is 5386, 4662
                        Coordinate System is:
                        GEOGCS["WGS 84",
                                        DATUM["WGS_1984",
                                                        SPHEROID["WGS 84",6378137,298.257223563,
                                                                        AUTHORITY["EPSG","7030"]],
                                                        AUTHORITY["EPSG","6326"]],
                                        PRIMEM["Greenwich",0],
                                        UNIT["degree",0.0174532925199433],
                                        AUTHORITY["EPSG","4326"]]
                        Origin = (-85.495785570955590,30.536183332655433)
                        Pixel Size = (0.000002974135230,-0.000002974135230)
                        Metadata:
                                AREA_OR_POINT=Area
                                TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
                                TIFFTAG_XRESOLUTION=1
                                TIFFTAG_YRESOLUTION=1
                        Image Structure Metadata:
                                INTERLEAVE=PIXEL
                        Corner Coordinates:
                        Upper Left  ( -85.4957856,  30.5361833) ( 85d29'44.83"W, 30d32'10.26"N)
                        Lower Left  ( -85.4957856,  30.5223179) ( 85d29'44.83"W, 30d31'20.34"N)
                        Upper Right ( -85.4797669,  30.5361833) ( 85d28'47.16"W, 30d32'10.26"N)
                        Lower Right ( -85.4797669,  30.5223179) ( 85d28'47.16"W, 30d31'20.34"N)
                        Center      ( -85.4877762,  30.5292506) ( 85d29'15.99"W, 30d31'45.30"N)
                        Band 1 Block=5386x1 Type=Byte, ColorInterp=Red
                        Band 2 Block=5386x1 Type=Byte, ColorInterp=Green
                        Band 3 Block=5386x1 Type=Byte, ColorInterp=Blue
                        
        3.6. Conclusion: 
        Seems like both files are now in the same projection?
        
4. Try to use vpbmaster again with the converted texture file:        vpbmaster --geocentric -t texture/44442_conv.tif -d dem/n30_w086_1arc_v3.tif -o output/out.osgb

        Now vpb seems work but the result is:
        <a class="moz-txt-link-freetext" href="https://drive.google.com/file/d/0ByDDImhSolf6cGFyV21PRXZuZHM/view?usp=sharing">https://drive.google.com/file/d/0ByDDImhSolf6cGFyV21PRXZuZHM/view?usp=sharing</a>
        <a class="moz-txt-link-freetext" href="https://drive.google.com/file/d/0ByDDImhSolf6N3FvRkNJUW1nMlk/view?usp=sharing">https://drive.google.com/file/d/0ByDDImhSolf6N3FvRkNJUW1nMlk/view?usp=sharing</a>
        Conclusion: 
        vpbmaster did not make texture "elevated" and too much area of elevation compared to small area of texture caused artefacts.
        Need to crop elevation here? 
        If yes, what tool is the most user friendly for a newbie?
        
5. Try to use osgdem again - result is the same as №4.

Again, what am i doing wrong?

Thank you!

Cheers,
Elias

------------------
Read this topic online here:
<a class="moz-txt-link-freetext" href="http://forum.openscenegraph.org/viewtopic.php?p=64048#64048">http://forum.openscenegraph.org/viewtopic.php?p=64048#64048</a>





_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>



</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
SCHULTE Christian
Ingénieur Recherche
Responsable du Laboratoire de Simulation
ONERA - DCSD/PSEV
Département Commande des Systèmes et Dynamique du Vol
ONERA - Centre de Salon de Provence
BA 701
13661 SALON AIR Cedex - France
Tel :04.90.17.01.45</pre>
  </body>
</html>