Guidance on GeoPackage based elevation?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Guidance on GeoPackage based elevation?

Brad Hards

I’ve been looking at adding support to OSSIM for the GeoPackage Elevation Extension.

 

The elevation extension essentially provides gridded heights based on tiles stored within the GeoPackage, potentially with variable resolution across the supported areas. For example, you might have 1 metre data for 20 cities, but much lower res for the rest of the country. A single GeoPackage can have more than one elevation set (potentially in different scales and different projections / SRS). I’m pretty familiar with GeoPackage and the elevation extension. My C++ is rusty, probably no better than average. I know little about OSSIM, but have been trying to get into it (see PRs).

 

From reading so far, I guess I have to implement some form of ossimElevSource, but I’m not sure which subclass(es). It looks like probably a ossimElevHandler and ossimElevationDatabase but I’m not sure whether that should be directly implemented, or whether it should be via ossimElevCellHandler and ossimElevationCellDatabase (or ossimTiledElevationDatabase).

 

I’m assuming that I’ll get the ossimElevManager singleton, and addDatabase(). After that, I’m hoping it will become self apparent…

 

Has anyone else looked at this, or have any suggestions / corrections?

 

Brad


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Guidance on GeoPackage based elevation?

David Burken-2
Hi Brad,

Two ways to go.  Lots of stuff below.  Let us know if you need anything.  I know our gpkg code is behind.  It does handle multiple entries.  But currently no logic to sort by resolution.

1)

Code/create a elevation source and database for gpkg specific files..  This would give you more flexibility with multi-entry gpks with different resolutions.  You could derive your elev source from the ossimGpkgReader as it has most of the stuff you need.

2 (easiest)):

This is provided our code reads you gpkgs:

Or you could use the existing image elevation database which allows you to use any image reader as an elevation source.  For example you could use the existing gpkg reader from the sqlite plugin.  Make a directory and stick what ever gpks you want in there.  With this approach you would currently need to separate by resolution.   Note the current gpkg reader does not have to logic to sort by resolution.. Then you could do this in you ossim prererences file:

// 1 meter city data:
elevation_manager.elevation_source0.connection_string: $(OSSIM_DATA)/elevation/gpkg/1mtr
elevation_manager.elevation_source0.enabled: true
elevation_manager.elevation_source0.type: image_directory
elevation_manager.elevation_source0.min_open_cells: 25
elevation_manager.elevation_source0.max_open_cells: 50
elevation_manager.elevation_source0.memory_map_cells: false
elevation_manager.elevation_source0.geoid.type: geoid1996

// 20 meter data:
elevation_manager.elevation_source1.connection_string: $(OSSIM_DATA)/elevation/gpkg/20mtr
elevation_manager.elevation_source1.enabled: true
elevation_manager.elevation_source1.type: image_directory
elevation_manager.elevation_source1.min_open_cells: 25
elevation_manager.elevation_source1.max_open_cells: 50
elevation_manager.elevation_source1.memory_map_cells: false
elevation_manager.elevation_source1.geoid.type: geoid1996

// You need the sqlite plugin in your preferences.  Gdal plugin I'm sure also reads.
plugin.file23:  $(OSSIM_BUILD_DIR)/lib64/libossim_sqlite_plugin.so
 

Links:

// Generic "image_directory" elevation database.  Can read from any file ossim can open.
http://trac.osgeo.org/ossim/doxygen/classossimImageElevationDatabase.html

// gpks reader:
http://trac.osgeo.org/ossim/doxygen/classossimGpkgReader.html

// srtm elev source example.
http://trac.osgeo.org/ossim/doxygen/classossimSrtmElevationDatabase.html
http://trac.osgeo.org/ossim/doxygen/classossimSrtmHandler.html

// Preferences:
http://trac.osgeo.org/ossim/wiki/ossimElevationSetup
http://trac.osgeo.org/ossim/wiki/ossimPreferenceFile

Notes:
1) Our doxygen is pointing to the old svn repo.  New repo at:
https://github.com/orgs/ossimlabs/dashboard

2) The gpkg code has not been touched in a while and is probably behind, spec wise.  When it was coded things were still being ironed out.  If you find anything out of date please let us know.  That code is at:
https://github.com/ossimlabs/ossim-plugins/tree/master/sqlite/src

Take care,
Dave

On 04/17/2016 07:06 AM, Brad Hards wrote:

I’ve been looking at adding support to OSSIM for the GeoPackage Elevation Extension.

 

The elevation extension essentially provides gridded heights based on tiles stored within the GeoPackage, potentially with variable resolution across the supported areas. For example, you might have 1 metre data for 20 cities, but much lower res for the rest of the country. A single GeoPackage can have more than one elevation set (potentially in different scales and different projections / SRS). I’m pretty familiar with GeoPackage and the elevation extension. My C++ is rusty, probably no better than average. I know little about OSSIM, but have been trying to get into it (see PRs).

 

From reading so far, I guess I have to implement some form of ossimElevSource, but I’m not sure which subclass(es). It looks like probably a ossimElevHandler and ossimElevationDatabase but I’m not sure whether that should be directly implemented, or whether it should be via ossimElevCellHandler and ossimElevationCellDatabase (or ossimTiledElevationDatabase).

 

I’m assuming that I’ll get the ossimElevManager singleton, and addDatabase(). After that, I’m hoping it will become self apparent…

 

Has anyone else looked at this, or have any suggestions / corrections?

 

Brad



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Guidance on GeoPackage based elevation?

DBurken@Radiantblue.com
In reply to this post by Brad Hards
Brad,

Sorry I had not seen your pull request.  Garrett just told me about them.  Merged into dev. 

Thanks!
Dave


On 04/17/2016 07:06 AM, Brad Hards wrote:

I’ve been looking at adding support to OSSIM for the GeoPackage Elevation Extension.

 

The elevation extension essentially provides gridded heights based on tiles stored within the GeoPackage, potentially with variable resolution across the supported areas. For example, you might have 1 metre data for 20 cities, but much lower res for the rest of the country. A single GeoPackage can have more than one elevation set (potentially in different scales and different projections / SRS). I’m pretty familiar with GeoPackage and the elevation extension. My C++ is rusty, probably no better than average. I know little about OSSIM, but have been trying to get into it (see PRs).

 

From reading so far, I guess I have to implement some form of ossimElevSource, but I’m not sure which subclass(es). It looks like probably a ossimElevHandler and ossimElevationDatabase but I’m not sure whether that should be directly implemented, or whether it should be via ossimElevCellHandler and ossimElevationCellDatabase (or ossimTiledElevationDatabase).

 

I’m assuming that I’ll get the ossimElevManager singleton, and addDatabase(). After that, I’m hoping it will become self apparent…

 

Has anyone else looked at this, or have any suggestions / corrections?

 

Brad



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer