ossimPolyArea2d

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

ossimPolyArea2d

B B
By reading variable names, it seems like the logic is flipped. There is no documentation saying what the return is supposed to mean but I think the  foundPolys  should probably be (sizeBefore != polyList.size()); Similar for getPolygonHoles()



bool ossimPolyArea2d::getVisiblePolygons(vector<ossimPolygon>& polyList)const
{
   bool foundPolys = false;
   if(m_privateData->m_geometry)
   {
      ossim_uint32 sizeBefore = (ossim_uint32)polyList.size();
      recurseVisibleGeometries(polyList, m_privateData->m_geometry);
      foundPolys = sizeBefore == polyList.size();
       
   }

   return foundPolys;
}

bool ossimPolyArea2d::getPolygonHoles(vector<ossimPolygon>& polyList)const


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
B B
Reply | Threaded
Open this post in threaded view
|

Re: ossimPolyArea2d

B B
I found it while looking for a memory leak.

If I run:

ossimPolyArea2d polyArea2d = ....

while(1){
    vector<ossimPolygon> shell;
  polyArea2d.getVisiblePolygons(shell);
}

The memory usage takes off like a rocket.

===

On Tue, Dec 16, 2014 at 9:44 PM, Bryan Bagnall <[hidden email]> wrote:
By reading variable names, it seems like the logic is flipped. There is no documentation saying what the return is supposed to mean but I think the  foundPolys  should probably be (sizeBefore != polyList.size()); Similar for getPolygonHoles()



bool ossimPolyArea2d::getVisiblePolygons(vector<ossimPolygon>& polyList)const
{
   bool foundPolys = false;
   if(m_privateData->m_geometry)
   {
      ossim_uint32 sizeBefore = (ossim_uint32)polyList.size();
      recurseVisibleGeometries(polyList, m_privateData->m_geometry);
      foundPolys = sizeBefore == polyList.size();
       
   }

   return foundPolys;
}

bool ossimPolyArea2d::getPolygonHoles(vector<ossimPolygon>& polyList)const




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
B B
Reply | Threaded
Open this post in threaded view
|

Re: ossimPolyArea2d

B B
In the patch file attached, please find the following:

--Fixed the memory leak by wrapping a pointer inside recurseVisibleGeometries() and recurseHoles() with std::auto_ptr. The geos::geom::LineString::getPoint() was returning a naked pointer to memory that it was allocating internally.

--Added support for loading polygons with holes.

--Exposed the isValid() from geos with an optional parameter to display the error details in ossimNotify stream.


On Tue, Dec 16, 2014 at 9:52 PM, Bryan Bagnall <[hidden email]> wrote:
I found it while looking for a memory leak.

If I run:

ossimPolyArea2d polyArea2d = ....

while(1){
    vector<ossimPolygon> shell;
  polyArea2d.getVisiblePolygons(shell);
}

The memory usage takes off like a rocket.

===

On Tue, Dec 16, 2014 at 9:44 PM, Bryan Bagnall <[hidden email]> wrote:
By reading variable names, it seems like the logic is flipped. There is no documentation saying what the return is supposed to mean but I think the  foundPolys  should probably be (sizeBefore != polyList.size()); Similar for getPolygonHoles()



bool ossimPolyArea2d::getVisiblePolygons(vector<ossimPolygon>& polyList)const
{
   bool foundPolys = false;
   if(m_privateData->m_geometry)
   {
      ossim_uint32 sizeBefore = (ossim_uint32)polyList.size();
      recurseVisibleGeometries(polyList, m_privateData->m_geometry);
      foundPolys = sizeBefore == polyList.size();
       
   }

   return foundPolys;
}

bool ossimPolyArea2d::getPolygonHoles(vector<ossimPolygon>& polyList)const





--
----------------------------------------------------------------------------------------------
Bryan Bagnall
Software Engineer, Advanced Analysis Systems Branch (56220)

Space and Naval Warfare Systems Center, Pacific
Office: (619) 553-4061
Mobile: (619) 895-6574
Fax: (619) 553-1130
NIPR: [hidden email]
JWICS: [hidden email]
----------------------------------------------------------------------------------------------

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer

ossimPolyArea2d.patch (9K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ossimPolyArea2d

Garrett Potts-2
Hello Bryan:

This is very nice catch!!

Could you send me the full source file?


Take care

Garrett

On Dec 17, 2014, at 6:58 PM, Bryan Bagnall <[hidden email]> wrote:

In the patch file attached, please find the following:

--Fixed the memory leak by wrapping a pointer inside recurseVisibleGeometries() and recurseHoles() with std::auto_ptr. The geos::geom::LineString::getPoint() was returning a naked pointer to memory that it was allocating internally.

--Added support for loading polygons with holes.

--Exposed the isValid() from geos with an optional parameter to display the error details in ossimNotify stream.


On Tue, Dec 16, 2014 at 9:52 PM, Bryan Bagnall <[hidden email]> wrote:
I found it while looking for a memory leak.

If I run:

ossimPolyArea2d polyArea2d = ....

while(1){
    vector<ossimPolygon> shell;
  polyArea2d.getVisiblePolygons(shell);
}

The memory usage takes off like a rocket.

===

On Tue, Dec 16, 2014 at 9:44 PM, Bryan Bagnall <[hidden email]> wrote:
By reading variable names, it seems like the logic is flipped. There is no documentation saying what the return is supposed to mean but I think the  foundPolys  should probably be (sizeBefore != polyList.size()); Similar for getPolygonHoles()



bool ossimPolyArea2d::getVisiblePolygons(vector<ossimPolygon>& polyList)const
{
   bool foundPolys = false;
   if(m_privateData->m_geometry)
   {
      ossim_uint32 sizeBefore = (ossim_uint32)polyList.size();
      recurseVisibleGeometries(polyList, m_privateData->m_geometry);
      foundPolys = sizeBefore == polyList.size();
       
   }

   return foundPolys;
}

bool ossimPolyArea2d::getPolygonHoles(vector<ossimPolygon>& polyList)const





--
----------------------------------------------------------------------------------------------
Bryan Bagnall
Software Engineer, Advanced Analysis Systems Branch (56220)

Space and Naval Warfare Systems Center, Pacific
Office: (619) 553-4061
Mobile: (619) 895-6574
Fax: (619) 553-1130
NIPR: [hidden email]
JWICS: [hidden email]
----------------------------------------------------------------------------------------------
<ossimPolyArea2d.patch>------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
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: ossimPolyArea2d

David Burken
In reply to this post by B B
Hi Bryan,

Thanks for patch.  Applied in svn.  Can you update and test for me?  If you have a test app perhaps we could put in: ossim/src/test.  Let me know. All my ossim-batch-test passed but I'm not sure if they hit that code.

// Svn:
http://trac.osgeo.org/ossim/changeset/23050/trunk/ossim

Thanks again,
Dave


On 12/17/2014 06:58 PM, Bryan Bagnall wrote:
In the patch file attached, please find the following:

--Fixed the memory leak by wrapping a pointer inside recurseVisibleGeometries() and recurseHoles() with std::auto_ptr. The geos::geom::LineString::getPoint() was returning a naked pointer to memory that it was allocating internally.

--Added support for loading polygons with holes.

--Exposed the isValid() from geos with an optional parameter to display the error details in ossimNotify stream.


On Tue, Dec 16, 2014 at 9:52 PM, Bryan Bagnall <[hidden email]> wrote:
I found it while looking for a memory leak.

If I run:

ossimPolyArea2d polyArea2d = ....

while(1){
    vector<ossimPolygon> shell;
  polyArea2d.getVisiblePolygons(shell);
}

The memory usage takes off like a rocket.

===

On Tue, Dec 16, 2014 at 9:44 PM, Bryan Bagnall <[hidden email]> wrote:
By reading variable names, it seems like the logic is flipped. There is no documentation saying what the return is supposed to mean but I think the  foundPolys  should probably be (sizeBefore != polyList.size()); Similar for getPolygonHoles()



bool ossimPolyArea2d::getVisiblePolygons(vector<ossimPolygon>& polyList)const
{
   bool foundPolys = false;
   if(m_privateData->m_geometry)
   {
      ossim_uint32 sizeBefore = (ossim_uint32)polyList.size();
      recurseVisibleGeometries(polyList, m_privateData->m_geometry);
      foundPolys = sizeBefore == polyList.size();
       
   }

   return foundPolys;
}

bool ossimPolyArea2d::getPolygonHoles(vector<ossimPolygon>& polyList)const





--
----------------------------------------------------------------------------------------------
Bryan Bagnall
Software Engineer, Advanced Analysis Systems Branch (56220)

Space and Naval Warfare Systems Center, Pacific
Office: (619) 553-4061
Mobile: (619) 895-6574
Fax: (619) 553-1130
NIPR: [hidden email]
JWICS: [hidden email]
----------------------------------------------------------------------------------------------


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk


_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
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
|

Valid geometry

James E. Hopper-2
In reply to this post by Garrett Potts-2
We have nitfs from time to time that have only 2 corners but have a projection. For example a snap from video where camera is pointing at the horizon. When OSSIM opens the file we check for valid geometry. Does this check look to insure all 4 corners are defined?
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
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: Valid geometry

David Burken
Jim,

What does "ossim-info -p <nitf>" give you?

Dave

On 12/19/2014 01:09 PM, James E. Hopper wrote:

> We have nitfs from time to time that have only 2 corners but have a projection. For example a snap from video where camera is pointing at the horizon. When OSSIM opens the file we check for valid geometry. Does this check look to insure all 4 corners are defined?
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> www.ossim.org
> Ossim-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/ossim-developer
>


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
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: Valid geometry

James E. Hopper-2
David

Below is one file which seems to show it has a geometry but not corners.  I created the nitf from a video which only had 3 corners defined and our nitf software just stripped all corners to be safe.

But I was asking more to find out if it's possible for OSSIM to show a valid geometry for a file with less than 4 corners defined? I want to know do we need to check for both valid geometry And 4 corners or can we just do the valid geometry check and be safe?

Thanks jim


James-Hoppers-Mac-Pro:copy Hopper$ ossim-info -p snap_20140127_235902000.ntf
image0.geometry.decimal_degrees_per_pixel_lat:  nan
image0.geometry.decimal_degrees_per_pixel_lon:  nan
image0.geometry.decimations:  (1,1)
image0.geometry.gsd:  (nan,nan)
image0.geometry.image_size:  (640,480)
image0.geometry.ll_lat:  nan
image0.geometry.ll_lon:  nan
image0.geometry.lr_lat:  nan
image0.geometry.lr_lon:  nan
image0.geometry.meters_per_pixel_x: nan
image0.geometry.meters_per_pixel_y: nan
image0.geometry.target_rrds:  0
image0.geometry.tie_point_lat:  nan
image0.geometry.tie_point_lon:  nan
image0.geometry.type:  ossimImageGeometry
image0.geometry.ul_lat:  nan
image0.geometry.ul_lon:  nan
image0.geometry.ur_lat:  nan
image0.geometry.ur_lon:  nan
number_entries:  1


> On Dec 19, 2014, at 1:39 PM, David Burken <[hidden email]> wrote:
>
> Jim,
>
> What does "ossim-info -p <nitf>" give you?
>
> Dave
>
>> On 12/19/2014 01:09 PM, James E. Hopper wrote:
>> We have nitfs from time to time that have only 2 corners but have a projection. For example a snap from video where camera is pointing at the horizon. When OSSIM opens the file we check for valid geometry. Does this check look to insure all 4 corners are defined?
>> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>> _______________________________________________
>> www.ossim.org
>> Ossim-developer mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/ossim-developer
>

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
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: Valid geometry

David Burken
No I think even the bilinear projection needs at least four points...

Sorry,
Dave

On 12/19/2014 02:58 PM, James E. Hopper wrote:

> David
>
> Below is one file which seems to show it has a geometry but not corners.  I created the nitf from a video which only had 3 corners defined and our nitf software just stripped all corners to be safe.
>
> But I was asking more to find out if it's possible for OSSIM to show a valid geometry for a file with less than 4 corners defined? I want to know do we need to check for both valid geometry And 4 corners or can we just do the valid geometry check and be safe?
>
> Thanks jim
>
>
> James-Hoppers-Mac-Pro:copy Hopper$ ossim-info -p snap_20140127_235902000.ntf
> image0.geometry.decimal_degrees_per_pixel_lat:  nan
> image0.geometry.decimal_degrees_per_pixel_lon:  nan
> image0.geometry.decimations:  (1,1)
> image0.geometry.gsd:  (nan,nan)
> image0.geometry.image_size:  (640,480)
> image0.geometry.ll_lat:  nan
> image0.geometry.ll_lon:  nan
> image0.geometry.lr_lat:  nan
> image0.geometry.lr_lon:  nan
> image0.geometry.meters_per_pixel_x: nan
> image0.geometry.meters_per_pixel_y: nan
> image0.geometry.target_rrds:  0
> image0.geometry.tie_point_lat:  nan
> image0.geometry.tie_point_lon:  nan
> image0.geometry.type:  ossimImageGeometry
> image0.geometry.ul_lat:  nan
> image0.geometry.ul_lon:  nan
> image0.geometry.ur_lat:  nan
> image0.geometry.ur_lon:  nan
> number_entries:  1
>
>
>> On Dec 19, 2014, at 1:39 PM, David Burken <[hidden email]> wrote:
>>
>> Jim,
>>
>> What does "ossim-info -p <nitf>" give you?
>>
>> Dave
>>
>>> On 12/19/2014 01:09 PM, James E. Hopper wrote:
>>> We have nitfs from time to time that have only 2 corners but have a projection. For example a snap from video where camera is pointing at the horizon. When OSSIM opens the file we check for valid geometry. Does this check look to insure all 4 corners are defined?
>>> ------------------------------------------------------------------------------
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> www.ossim.org
>>> Ossim-developer mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
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: Valid geometry

Oscar Kramer
Jim,

That dump tells me that your image's projection was not read by OSSIM. Only the image size was picked up from the nitf. What projection were you expecting? I presume it is some kind of frame camera sensor model since it is looking at the horizon. In OSSIM, we handle that by projecting the image point that is over the horizon to NaN geo-coordinates which should (I didn't verify) cause that pixel to be painted as a null. There might be some places where the bounding ground rect is requested and the computed corner points would contain two NaNs. I don't know if that would cause a problem down the line. In any case, it looks like your immediate problem is an unrecognized sensor model projection.

Oscar


From: David Burken <[hidden email]>
To: James E. Hopper <[hidden email]>
Cc: ossim users <[hidden email]>
Sent: Friday, December 19, 2014 5:03 PM
Subject: Re: [OSSIM] Valid geometry

No I think even the bilinear projection needs at least four points...

Sorry,
Dave



On 12/19/2014 02:58 PM, James E. Hopper wrote:

> David
>
> Below is one file which seems to show it has a geometry but not corners.  I created the nitf from a video which only had 3 corners defined and our nitf software just stripped all corners to be safe.
>
> But I was asking more to find out if it's possible for OSSIM to show a valid geometry for a file with less than 4 corners defined? I want to know do we need to check for both valid geometry And 4 corners or can we just do the valid geometry check and be safe?
>
> Thanks jim
>
>
> James-Hoppers-Mac-Pro:copy Hopper$ ossim-info -p snap_20140127_235902000.ntf
> image0.geometry.decimal_degrees_per_pixel_lat:  nan
> image0.geometry.decimal_degrees_per_pixel_lon:  nan
> image0.geometry.decimations:  (1,1)
> image0.geometry.gsd:  (nan,nan)
> image0.geometry.image_size:  (640,480)
> image0.geometry.ll_lat:  nan
> image0.geometry.ll_lon:  nan
> image0.geometry.lr_lat:  nan
> image0.geometry.lr_lon:  nan
> image0.geometry.meters_per_pixel_x: nan
> image0.geometry.meters_per_pixel_y: nan
> image0.geometry.target_rrds:  0
> image0.geometry.tie_point_lat:  nan
> image0.geometry.tie_point_lon:  nan
> image0.geometry.type:  ossimImageGeometry
> image0.geometry.ul_lat:  nan
> image0.geometry.ul_lon:  nan
> image0.geometry.ur_lat:  nan
> image0.geometry.ur_lon:  nan
> number_entries:  1
>
>
>> On Dec 19, 2014, at 1:39 PM, David Burken <[hidden email]> wrote:
>>
>> Jim,
>>
>> What does "ossim-info -p <nitf>" give you?
>>
>> Dave
>>
>>> On 12/19/2014 01:09 PM, James E. Hopper wrote:
>>> We have nitfs from time to time that have only 2 corners but have a projection. For example a snap from video where camera is pointing at the horizon. When OSSIM opens the file we check for valid geometry. Does this check look to insure all 4 corners are defined?
>>> ------------------------------------------------------------------------------
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> www.ossim.org
>>> Ossim-developer mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
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: Valid geometry

James E. Hopper
Oscar

It's a video from an airborne video. That sample is from a known bad video but it showed as having a geometry so it looked like to be sure we don't try to work with a bad video we need to check for more than is there a geometry. Thanks so much for the information



Sent from my iPad

On Dec 22, 2014, at 10:16 AM, Oscar Kramer <[hidden email]> wrote:

Jim,

That dump tells me that your image's projection was not read by OSSIM. Only the image size was picked up from the nitf. What projection were you expecting? I presume it is some kind of frame camera sensor model since it is looking at the horizon. In OSSIM, we handle that by projecting the image point that is over the horizon to NaN geo-coordinates which should (I didn't verify) cause that pixel to be painted as a null. There might be some places where the bounding ground rect is requested and the computed corner points would contain two NaNs. I don't know if that would cause a problem down the line. In any case, it looks like your immediate problem is an unrecognized sensor model projection.

Oscar


From: David Burken <[hidden email]>
To: James E. Hopper <[hidden email]>
Cc: ossim users <[hidden email]>
Sent: Friday, December 19, 2014 5:03 PM
Subject: Re: [OSSIM] Valid geometry

No I think even the bilinear projection needs at least four points...

Sorry,
Dave



On 12/19/2014 02:58 PM, James E. Hopper wrote:

> David
>
> Below is one file which seems to show it has a geometry but not corners.  I created the nitf from a video which only had 3 corners defined and our nitf software just stripped all corners to be safe.
>
> But I was asking more to find out if it's possible for OSSIM to show a valid geometry for a file with less than 4 corners defined? I want to know do we need to check for both valid geometry And 4 corners or can we just do the valid geometry check and be safe?
>
> Thanks jim
>
>
> James-Hoppers-Mac-Pro:copy Hopper$ ossim-info -p snap_20140127_235902000.ntf
> image0.geometry.decimal_degrees_per_pixel_lat:  nan
> image0.geometry.decimal_degrees_per_pixel_lon:  nan
> image0.geometry.decimations:  (1,1)
> image0.geometry.gsd:  (nan,nan)
> image0.geometry.image_size:  (640,480)
> image0.geometry.ll_lat:  nan
> image0.geometry.ll_lon:  nan
> image0.geometry.lr_lat:  nan
> image0.geometry.lr_lon:  nan
> image0.geometry.meters_per_pixel_x: nan
> image0.geometry.meters_per_pixel_y: nan
> image0.geometry.target_rrds:  0
> image0.geometry.tie_point_lat:  nan
> image0.geometry.tie_point_lon:  nan
> image0.geometry.type:  ossimImageGeometry
> image0.geometry.ul_lat:  nan
> image0.geometry.ul_lon:  nan
> image0.geometry.ur_lat:  nan
> image0.geometry.ur_lon:  nan
> number_entries:  1
>
>
>> On Dec 19, 2014, at 1:39 PM, David Burken <[hidden email]> wrote:
>>
>> Jim,
>>
>> What does "ossim-info -p <nitf>" give you?
>>
>> Dave
>>
>>> On 12/19/2014 01:09 PM, James E. Hopper wrote:
>>> We have nitfs from time to time that have only 2 corners but have a projection. For example a snap from video where camera is pointing at the horizon. When OSSIM opens the file we check for valid geometry. Does this check look to insure all 4 corners are defined?
>>> ------------------------------------------------------------------------------
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> www.ossim.org
>>> Ossim-developer mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
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: Valid geometry

David Burken
Hi Jim,

A good check is that the geometry has a "projection".  E.g.:

image0.geometry.projection.type:  ossimUtmProjection

Dave

On 12/22/2014 07:58 PM, Jim Hopper wrote:
Oscar

It's a video from an airborne video. That sample is from a known bad video but it showed as having a geometry so it looked like to be sure we don't try to work with a bad video we need to check for more than is there a geometry. Thanks so much for the information



Sent from my iPad

On Dec 22, 2014, at 10:16 AM, Oscar Kramer <[hidden email]> wrote:

Jim,

That dump tells me that your image's projection was not read by OSSIM. Only the image size was picked up from the nitf. What projection were you expecting? I presume it is some kind of frame camera sensor model since it is looking at the horizon. In OSSIM, we handle that by projecting the image point that is over the horizon to NaN geo-coordinates which should (I didn't verify) cause that pixel to be painted as a null. There might be some places where the bounding ground rect is requested and the computed corner points would contain two NaNs. I don't know if that would cause a problem down the line. In any case, it looks like your immediate problem is an unrecognized sensor model projection.

Oscar


From: David Burken <[hidden email]>
To: James E. Hopper <[hidden email]>
Cc: ossim users <[hidden email]>
Sent: Friday, December 19, 2014 5:03 PM
Subject: Re: [OSSIM] Valid geometry

No I think even the bilinear projection needs at least four points...

Sorry,
Dave



On 12/19/2014 02:58 PM, James E. Hopper wrote:
> David
>
> Below is one file which seems to show it has a geometry but not corners.  I created the nitf from a video which only had 3 corners defined and our nitf software just stripped all corners to be safe.
>
> But I was asking more to find out if it's possible for OSSIM to show a valid geometry for a file with less than 4 corners defined? I want to know do we need to check for both valid geometry And 4 corners or can we just do the valid geometry check and be safe?
>
> Thanks jim
>
>
> James-Hoppers-Mac-Pro:copy Hopper$ ossim-info -p snap_20140127_235902000.ntf
> image0.geometry.decimal_degrees_per_pixel_lat:  nan
> image0.geometry.decimal_degrees_per_pixel_lon:  nan
> image0.geometry.decimations:  (1,1)
> image0.geometry.gsd:  (nan,nan)
> image0.geometry.image_size:  (640,480)
> image0.geometry.ll_lat:  nan
> image0.geometry.ll_lon:  nan
> image0.geometry.lr_lat:  nan
> image0.geometry.lr_lon:  nan
> image0.geometry.meters_per_pixel_x: nan
> image0.geometry.meters_per_pixel_y: nan
> image0.geometry.target_rrds:  0
> image0.geometry.tie_point_lat:  nan
> image0.geometry.tie_point_lon:  nan
> image0.geometry.type:  ossimImageGeometry
> image0.geometry.ul_lat:  nan
> image0.geometry.ul_lon:  nan
> image0.geometry.ur_lat:  nan
> image0.geometry.ur_lon:  nan
> number_entries:  1
>
>
>> On Dec 19, 2014, at 1:39 PM, David Burken <[hidden email]> wrote:
>>
>> Jim,
>>
>> What does "ossim-info -p <nitf>" give you?
>>
>> Dave
>>
>>> On 12/19/2014 01:09 PM, James E. Hopper wrote:
>>> We have nitfs from time to time that have only 2 corners but have a projection. For example a snap from video where camera is pointing at the horizon. When OSSIM opens the file we check for valid geometry. Does this check look to insure all 4 corners are defined?
>>> ------------------------------------------------------------------------------
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> www.ossim.org
>>> Ossim-developer mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
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: Valid geometry

James E. Hopper-2
Thanks Dave


On Dec 23, 2014, at 8:26 AM, David Burken <[hidden email]> wrote:

Hi Jim,

A good check is that the geometry has a "projection".  E.g.:

image0.geometry.projection.type:  ossimUtmProjection

Dave

On 12/22/2014 07:58 PM, Jim Hopper wrote:
Oscar

It's a video from an airborne video. That sample is from a known bad video but it showed as having a geometry so it looked like to be sure we don't try to work with a bad video we need to check for more than is there a geometry. Thanks so much for the information



Sent from my iPad

On Dec 22, 2014, at 10:16 AM, Oscar Kramer <[hidden email]> wrote:

Jim,

That dump tells me that your image's projection was not read by OSSIM. Only the image size was picked up from the nitf. What projection were you expecting? I presume it is some kind of frame camera sensor model since it is looking at the horizon. In OSSIM, we handle that by projecting the image point that is over the horizon to NaN geo-coordinates which should (I didn't verify) cause that pixel to be painted as a null. There might be some places where the bounding ground rect is requested and the computed corner points would contain two NaNs. I don't know if that would cause a problem down the line. In any case, it looks like your immediate problem is an unrecognized sensor model projection.

Oscar


From: David Burken <[hidden email]>
To: James E. Hopper <[hidden email]>
Cc: ossim users <[hidden email]>
Sent: Friday, December 19, 2014 5:03 PM
Subject: Re: [OSSIM] Valid geometry

No I think even the bilinear projection needs at least four points...

Sorry,
Dave



On 12/19/2014 02:58 PM, James E. Hopper wrote:
> David
>
> Below is one file which seems to show it has a geometry but not corners.  I created the nitf from a video which only had 3 corners defined and our nitf software just stripped all corners to be safe.
>
> But I was asking more to find out if it's possible for OSSIM to show a valid geometry for a file with less than 4 corners defined? I want to know do we need to check for both valid geometry And 4 corners or can we just do the valid geometry check and be safe?
>
> Thanks jim
>
>
> James-Hoppers-Mac-Pro:copy Hopper$ ossim-info -p snap_20140127_235902000.ntf
> image0.geometry.decimal_degrees_per_pixel_lat:  nan
> image0.geometry.decimal_degrees_per_pixel_lon:  nan
> image0.geometry.decimations:  (1,1)
> image0.geometry.gsd:  (nan,nan)
> image0.geometry.image_size:  (640,480)
> image0.geometry.ll_lat:  nan
> image0.geometry.ll_lon:  nan
> image0.geometry.lr_lat:  nan
> image0.geometry.lr_lon:  nan
> image0.geometry.meters_per_pixel_x: nan
> image0.geometry.meters_per_pixel_y: nan
> image0.geometry.target_rrds:  0
> image0.geometry.tie_point_lat:  nan
> image0.geometry.tie_point_lon:  nan
> image0.geometry.type:  ossimImageGeometry
> image0.geometry.ul_lat:  nan
> image0.geometry.ul_lon:  nan
> image0.geometry.ur_lat:  nan
> image0.geometry.ur_lon:  nan
> number_entries:  1
>
>
>> On Dec 19, 2014, at 1:39 PM, David Burken <[hidden email]> wrote:
>>
>> Jim,
>>
>> What does "ossim-info -p <nitf>" give you?
>>
>> Dave
>>
>>> On 12/19/2014 01:09 PM, James E. Hopper wrote:
>>> We have nitfs from time to time that have only 2 corners but have a projection. For example a snap from video where camera is pointing at the horizon. When OSSIM opens the file we check for valid geometry. Does this check look to insure all 4 corners are defined?
>>> ------------------------------------------------------------------------------
>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>>> Get technology previously reserved for billion-dollar corporations, FREE
>>> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
>>> _______________________________________________
>>> www.ossim.org
>>> Ossim-developer mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer