OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Convert .earth file to .osg format

Goto page 1, 2  Next
 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
stevenj279
User


Joined: 22 Apr 2019
Posts: 21

PostPosted: Mon Apr 22, 2019 5:05 am    Post subject:
Convert .earth file to .osg format
Reply with quote

Hope someone can help with this:

I need to convert an earth file to the .osg format. I've not found any solid info yet as to how this can be done, or if it can be done at all. The 3rd party program this is for can load .osg or .ive GIS maps.

I've tried osgconv, and it creates a new file with the .osg extension, but it is a zero-byte file (no error messages are generated).

Many thanks in advance!

Cheers,
Steven
Back to top
View user's profile Send private message Send e-mail
Chris Hanson
Guest





PostPosted: Mon Apr 22, 2019 9:30 pm    Post subject:
Convert .earth file to .osg format
Reply with quote

So, the .earth format is not really a geometry format. It's a descriptor of a special node data file type used by the osgEarth library, and not representable in a .osg file.

You can't use a .earth file without the osgEarth library. If you HAVE the osgEarth library, you can already load .earth and don't need to convert it to .osg.


So, tell us what you're actually trying to DO, not the method by which you're trying to accomplish it, and maybe we can help.


On Mon, Apr 22, 2019 at 8:15 PM Steven Jones < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hope someone can help with this:

I need to convert an earth file to the .osg format. I've not found any solid info yet as to how this can be done, or if it can be done at all. The 3rd party program this is for can load .osg or .ive GIS maps.

I've tried osgconv, and it creates a new file with the .osg extension, but it is a zero-byte file (no error messages are generated).

Many thanks in advance!

Cheers,
Steven

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75875#75875





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
stevenj279
User


Joined: 22 Apr 2019
Posts: 21

PostPosted: Tue Apr 23, 2019 1:31 pm    Post subject:
Reply with quote

Chris - Thanks for the answer. I do understand the nuts & bolts of the OSG architecture, but was looking for a way to further streamline loading of a very large quantity of GIS imagery and elevation data that are referenced within the .earth file (over 4,000 images and close to 1,000 elev files).

They are all GeoTiffs, and I've already run the compression tools (GDAL) to reduce the size of the imagery to increase performance/reduce load time.

Given its size, it's likely that the .earth file is going to be the best/simplest option overall.

On a side note, I'm seeing the borders around all of the tiles when I view this terrain database in osgearth_viewer, and I'm not sure how to eliminate them. They are all very fine black lines, and I'm sure the georeferencing for each tile/GEOTiff is correct. Hopefully there's a way to remove them through a setting in the .earth file, but I've been unsuccessful so far.

...

Cheers,
Steven
Back to top
View user's profile Send private message Send e-mail
Chris Hanson
Guest





PostPosted: Tue Apr 23, 2019 8:12 pm    Post subject:
Convert .earth file to .osg format
Reply with quote

You may need to play with layering and other things to get the results you want at the borders.

Alternately, have you considered if your work could be built through Virtual Planet Builder, which DOES actually just produce "dumb" .osg (actually, .osgb is recommended) files?


The result might be larger, but simpler/faster depending on how complex your layering is.


On Tue, Apr 23, 2019 at 3:30 PM Steven Jones < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Chris - Thanks for the answer. I do understand the nuts & bolts of the OSG architecture, but was looking for a way to further streamline loading of a very large quantity of GIS imagery and elevation data that are referenced within the .earth file (over 4,000 images and close to 1,000 elev files).

They are all GeoTiffs, and I've already run the compression tools (GDAL) to reduce the size of the imagery to increase performance/reduce load time.

Given its size, it's likely that the .earth file is going to be the best/simplest option overall.

On a side note, I'm seeing the borders around all of the tiles when I view this terrain database in osgearth_viewer, and I'm not sure how to eliminate them. They are all very fine black lines, and I'm sure the georeferencing for each tile/GEOTiff is correct. Hopefully there's a way to remove them through a setting in the .earth file, but I've been unsuccessful so far.

...

Cheers,
Steven

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75879#75879





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
stevenj279
User


Joined: 22 Apr 2019
Posts: 21

PostPosted: Thu Apr 25, 2019 2:51 pm    Post subject:
Reply with quote

I'd considered VPB previously, but now it looks like it may be the most practical solution to meet our needs. Wish me luck, and thanks again Chris!

Cheers,

Steven
Back to top
View user's profile Send private message Send e-mail
Chris Hanson
Guest





PostPosted: Thu Apr 25, 2019 3:25 pm    Post subject:
Convert .earth file to .osg format
Reply with quote

You're welcome. It may also be conceivable to use osgearth tools to produce a composite tilemap set to feed to VPB, giving you some of the best of both worlds. 






On Thu, Apr 25, 2019, 4:50 PM Steven Jones < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
I'd considered VPB previously, but now it looks like it may be the most practical  solution to meet our needs. Wish me luck, and thanks again Chris!

Cheers,

Steven

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75897#75897





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
stevenj279
User


Joined: 22 Apr 2019
Posts: 21

PostPosted: Thu Apr 25, 2019 5:10 pm    Post subject:
Reply with quote

Chris - Is there a tutorial of some sort that would cover the basic steps to begin building a database in VPB using GeoTiff elevation and imagery data for the input?

I've downloaded and compiled VPB (MS Windows), but since it's mainly command-line driven, it's not all that intuitive. Also, most of what I've found online deals with modifying an existing database (that already has an .osgb master file).

Any help/tips/tricks would be greatly appreciated!

Cheers,

Steven
Back to top
View user's profile Send private message Send e-mail
Chris Hanson
Guest





PostPosted: Thu Apr 25, 2019 8:57 pm    Post subject:
Convert .earth file to .osg format
Reply with quote

I don't have a ready to consume tutorial, but your first goal is to use osgEarth to build a dataset by merging all your data together.

The second is to feed that to VPB.


Let me think on the matter a bit.





On Thu, Apr 25, 2019 at 7:09 PM Steven Jones < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Chris - Is there a tutorial of some sort that would cover the basic steps to begin building a database in VPB using GeoTiff elevation and imagery data for the input?

I've downloaded and compiled VPB (MS Windows), but since it's mainly command-line driven, it's not all that intuitive. Also, most of what I've found online deals with modifying an existing database (that already has an .osgb master file).

Any help/tips/tricks would be greatly appreciated!

Cheers,

Steven

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75900#75900





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
stevenj279
User


Joined: 22 Apr 2019
Posts: 21

PostPosted: Fri Apr 26, 2019 1:16 pm    Post subject:
Reply with quote

Hi Chris,

Are you referring to a TMS dataset? Or something different? (All of my elevation and imagery files are tiled GeoTiffs.)

Thanks!

Steven
Back to top
View user's profile Send private message Send e-mail
Chris Hanson
Guest





PostPosted: Fri Apr 26, 2019 7:51 pm    Post subject:
Convert .earth file to .osg format
Reply with quote

Basically, osgEarth is really good at doing fancy layering of data sources. VPB is a little trickier, but can do most of the same things (for elevation and raster data anyway).

I was thinking it might be easier to use osgEarth to turn your multiple layers of GeoTIFF images into a single elevation layer and a single imagery layer, and just feed that to VPB.


But, I think really, feeding the original data directly to VPB is better because it lets VPB use its own intelligence about the different layers' resolution.


So, do you know how to build a model using VPB with multiple input layers? Here's some info with a few sample command lines:
http://alphapixel.com/wp-content/uploads/2015/04/OpenSceneGraph-OSG-Virtual-Planet-Builder-VPB-OSGDEM.pdf 


 







On Fri, Apr 26, 2019 at 3:15 PM Steven Jones < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi Scott,

Are you referring to a TMS dataset? Or something different? (All of my elevation and imagery files are tiled GeoTiffs.)

Thanks!

Steven

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75903#75903





_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
stevenj279
User


Joined: 22 Apr 2019
Posts: 21

PostPosted: Sun Apr 28, 2019 2:12 am    Post subject:
Reply with quote

I'd downloaded that guide before and briefly reviewed it, but that was when I first installed VPB but hadn't yet tried it.

It would certainly be much more efficient to combine the imagery and elevation data and create an osg or ive formatted database.

But, since I have so many GeoTiffs (4,000+) and elevation files (600+), is it possible to just point to the specific folder for each type on the command line?

For example, here's the general structure for the imagery:

C:\DB\N33\W118\004_Imagery

The imagery files in this directory are L0 through L08

Each of these sub-directories contain multiple sub-sub-directories, named U0 through U"X" (some have 20 or more folders).

File names follow this naming convention:

N33W118_D004_S001_T001_L03_U0_R5a.tif
N33W118_D004_S001_T001_L03_U0_R6a.tif etc...

The structure is basically the same for the elevation data:

C:\DB\N33\W118\001_Elevation

The overall database format follows what is common for the CDB format.

The document you referenced shows listing of individual files to be merged/combined - Pointing to the overall sub-directories would be much easier, if that's possible...


...

Thank you!

Cheers,
Steven
Back to top
View user's profile Send private message Send e-mail
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12279

PostPosted: Sun Apr 28, 2019 11:40 am    Post subject:
Convert .earth file to .osg format
Reply with quote

Hi Steven,

It's probably getting on decade since I last used or did any serious
worked on VPB so can't recall the specific command line options to use
off the top of my head. So will just provide some general notes that
may help.

It's possible to have osgdem (single process build) and vpbmaster
(multi-process distributed build) using a directory as input rather
than individual files. Run osgdem -h to get the command line options.
You can generate a single source file from your initial input
parameters and reuse that source file subsequently - this is what is
also used in the distributed build.

I'm afraid I can't help beyond this without sitting down at my
workstation to do some test builds after doing re-learning of the
command line options.

FYI, in the coming months I'll be doing some work on paging in for the
VulkanSceneGraph project and will likely do some work with VPB to get
it to generate native .vsgb rather than .osgb files. At this point
I'll need to dive back into VPB and re-lean how to use it properly :-)

Robert.


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Chris Hanson
Guest





PostPosted: Sun Apr 28, 2019 9:54 pm    Post subject:
Convert .earth file to .osg format
Reply with quote

Also, to add to that, osgdem relies heavily on GDAL to ingest raster data. GDAL has several tricks for combining multiple files or directories and referencing them as one dataset. For example:

https://gdal.org/gdal_vrttut.html  


I don't recall ever using that technique with VPB, but in theory it could be helpful.


On Sun, Apr 28, 2019 at 1:38 PM Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Hi Steven,

It's probably getting on decade since I last used or did any serious
worked on VPB so can't recall the specific command line options to use
off the top of my head.  So will just provide some general notes that
may help.

It's possible to have osgdem (single process build) and vpbmaster
(multi-process distributed build) using a directory as input rather
than individual files.  Run osgdem -h to get the command line options.
You can generate a single source file from your initial input
parameters and reuse that source file subsequently - this is what is
also used in the distributed build.

I'm afraid I can't help beyond this without sitting down at my
workstation to do some test builds after doing re-learning of the
command line options.

FYI, in the coming months I'll be doing some work on paging in for the
VulkanSceneGraph project and will likely do some work with VPB to get
it to generate native .vsgb rather than .osgb files.  At this point
I'll need to dive back into VPB and re-lean how to use it properly Smile

Robert.
_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
stevenj279
User


Joined: 22 Apr 2019
Posts: 21

PostPosted: Mon Apr 29, 2019 7:10 pm    Post subject:
Reply with quote

Chris,

I've been trying osgdem to build the database, and pointing to the overall imagery and elevation sub-directories works fine.

I receive no error messages, and the build completes, but when I use osgviewer to inspect the .ive file, it is completely flat - no visible change in elevation - terrain resolution is perfect though. (When I view the .earth file in osgearth_viewer, the terrain's elevation is rendered correctly.)

Below is the command line that I've used to build the database - I've changed the LOD level to various settings, even up to 8, and tried other settings based on osgdem's -h info (such as --PagedLOD), but no joy.

osgdem --geocentric -t C:\DB\N33\W118\004_Imagery -d C:\DB\N33\W118\001_Elevation -l 8 -o db.ive

Also, if I create the database as .osg instead of .ive, osgviewer throws the following error: "Problem, no locator found in any of the terrain layers."

Maybe I'm missing something obvious, but for the life of me I can't get past this point... ;-( (It is very important that the database render the elevation in a 3D format.)

One other item of interest is that neither --interpolate-imagery nor --interpolate-terrain work in osgDem... They both throw errors that they are unrecognized commands. The version of VPB/osgDem I'm running is 0.9.11 (I was trying different options to generate the database when I encountered this.)

...

Cheers,

Steven
Back to top
View user's profile Send private message Send e-mail
Chris Hanson
Guest





PostPosted: Mon Apr 29, 2019 11:03 pm    Post subject:
Convert .earth file to .osg format
Reply with quote

On Mon, Apr 29, 2019 at 9:09 PM Steven Jones < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
I receive no error messages, and the build completes, but when I use osgviewer to inspect the .ive file, it is completely flat - no visible change in elevation - terrain resolution is perfect though.


  Is the imagery in place and proper resolution?
 

Quote:
Below is the command line that I've used to build the database - I've changed the LOD level to various settings, even up to 8, and tried other settings based on osgdem's -h info (such as --PagedLOD), but no joy.
osgdem --geocentric -t C:DBN33W118\004_Imagery -d C:DBN33W118\001_Elevation -l 8 -o db.ive


  What elevation units is your elevation data in?


  Can you verify that OSG or osgDEM is able to read it ok otherwise? Do you have any other known-good sample data to throw at it to see if your elevation file values just aren't being understood correctly?
 
Quote:
Also, if I create the database as .osg instead of .ive, osgviewer throws the following error:  "Problem, no locator found in any of the terrain layers."


  Is your OSG even built with the deprecated .osg format plugin?


  You can save as the more modern .osgb (binary) and .osgt (text) formats instead of .osg and .ive. They are preferred now, though I haven't tried them with VPB/osgdem myself.


  If you can get it into .osg or .osgt format -- or use osgconv to convert the successful .ive file(s) to .osg/.osgt you might be able to examine the data values in the created rasters and see if there are all zeros or just some VERY small values.
 
Quote:
Maybe I'm missing something obvious, but for the life of me I can't get past this point... ;-(   (It is very important that the database render the elevation in a 3D format.)
One other item of interest is that neither --interpolate-imagery nor --interpolate-terrain work in osgDem... They both throw errors that they are unrecognized commands. The version of VPB/osgDem I'm running is 0.9.11 (I was trying different options to generate the database when I encountered this.)


  Huh. I can't recall if I ever used them. You'd have to look into the source to see if they're even there or if they're able to be made to work.
 

--
Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android
@alphapixel facebook.com/alphapixel (775) 623-PIXL [7495]

------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Resolution of .earth vice .osg/.ive F... stevenj279 General 22 Sun Jun 02, 2019 2:24 pm View latest post
No new posts Issue with osgt format on 3.6.x Riccardo Corsi General 1 Wed Apr 17, 2019 3:46 pm View latest post
No new posts Attaching color buffer with GL_R32F i... deroliver General 0 Tue Apr 09, 2019 6:19 pm View latest post
No new posts EditorConfig file? AnyOldName3 General 13 Thu Mar 14, 2019 12:02 am View latest post
No new posts what the parameter format of the path... mirro General 0 Mon Dec 17, 2018 2:03 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP