disassociate dataElement from layer

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

disassociate dataElement from layer

Wailes, Andrew

In my importer I am attempting to enable the capability for the user to cancel the import after the spatial view has already been created.  I want to clean up the view without deleting the raster element.  Is there a way to disassociate a dataElement (in my case a rasterElement) from a layer so I can remove the view and all of its layers with out deleting the raster element?

 

 

Andrew Wailes

Ball Aerospace & Technologies Corp.

937-320-4093

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Reply | Threaded
Open this post in threaded view
|

RE: disassociate dataElement from layer

Kip Streithorst
Administrator

You cannot currently disassociate the two.  A layer’s lifetime is defined by the existence of its element.  When it’s element ceases to exist, so does the layer.

 

Thanks,

Kip

 


From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 1:11 PM
To: [hidden email]
Subject: disassociate dataElement from layer

 

In my importer I am attempting to enable the capability for the user to cancel the import after the spatial view has already been created.  I want to clean up the view without deleting the raster element.  Is there a way to disassociate a dataElement (in my case a rasterElement) from a layer so I can remove the view and all of its layers with out deleting the raster element?

 

 

Andrew Wailes

Ball Aerospace & Technologies Corp.

937-320-4093

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Reply | Threaded
Open this post in threaded view
|

RE: disassociate dataElement from layer

Kip Streithorst
Administrator
In reply to this post by Wailes, Andrew

Is appears that you want the window to go away but not the dataElement.  Is this correct, because this seems a little counter-intuitive?

 

Thanks,

Kip

 


From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 1:11 PM
To: [hidden email]
Subject: disassociate dataElement from layer

 

In my importer I am attempting to enable the capability for the user to cancel the import after the spatial view has already been created.  I want to clean up the view without deleting the raster element.  Is there a way to disassociate a dataElement (in my case a rasterElement) from a layer so I can remove the view and all of its layers with out deleting the raster element?

 

 

Andrew Wailes

Ball Aerospace & Technologies Corp.

937-320-4093

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Reply | Threaded
Open this post in threaded view
|

RE: RE: disassociate dataElement from layer

Wailes, Andrew

Yes this does seem counter-intuitive and here is why.  My importer is currently overwriting the RasterElementImporterShell.  Internal to the RasterElementImporterShell there is a pointer to the raster element that is being imported.  If the user aborts the import, eventually the execute method will return false and the raster element associated with the RasterElementImporterShell will be cleaned up automatically.  If I manually clean up the view which in turn will clean up the layers, the raster element will be destroyed along with the layer and when the RasterElementImporterShell tries to clean up the RasterElement it will crash because the raster element no longer exists.

 

Is there a way to clean up the view, layer, and rasterElement after the view has been created, the rasterElement has been associated with the layer, and the layer has been added to the view without opticks crashing?

 


From: Streithorst, Kip [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:00 PM
To: [hidden email]
Subject: RE: disassociate dataElement from layer

 

Is appears that you want the window to go away but not the dataElement.  Is this correct, because this seems a little counter-intuitive?

 

Thanks,

Kip

 


From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 1:11 PM
To: [hidden email]
Subject: disassociate dataElement from layer

 

In my importer I am attempting to enable the capability for the user to cancel the import after the spatial view has already been created.  I want to clean up the view without deleting the raster element.  Is there a way to disassociate a dataElement (in my case a rasterElement) from a layer so I can remove the view and all of its layers with out deleting the raster element?

 

 

Andrew Wailes

Ball Aerospace & Technologies Corp.

937-320-4093

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Reply | Threaded
Open this post in threaded view
|

RE: RE: RE: disassociate dataElement from layer

dadkins
Administrator

Which RasterElementImporterShell method(s) are you overriding? Can you be specific as to why you have chosen to override this/these methods? Is there a particular reason why you’re attempting to delete the View manually? RasterElementImporterShell should do the entire cleanup itself.

 


From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:41 PM
To: [hidden email]
Subject: RE: RE: disassociate dataElement from layer

 

Yes this does seem counter-intuitive and here is why.  My importer is currently overwriting the RasterElementImporterShell.  Internal to the RasterElementImporterShell there is a pointer to the raster element that is being imported.  If the user aborts the import, eventually the execute method will return false and the raster element associated with the RasterElementImporterShell will be cleaned up automatically.  If I manually clean up the view which in turn will clean up the layers, the raster element will be destroyed along with the layer and when the RasterElementImporterShell tries to clean up the RasterElement it will crash because the raster element no longer exists.

 

Is there a way to clean up the view, layer, and rasterElement after the view has been created, the rasterElement has been associated with the layer, and the layer has been added to the view without opticks crashing?

 


From: Streithorst, Kip [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:00 PM
To: [hidden email]
Subject: RE: disassociate dataElement from layer

 

Is appears that you want the window to go away but not the dataElement.  Is this correct, because this seems a little counter-intuitive?

 

Thanks,

Kip

 


From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 1:11 PM
To: [hidden email]
Subject: disassociate dataElement from layer

 

In my importer I am attempting to enable the capability for the user to cancel the import after the spatial view has already been created.  I want to clean up the view without deleting the raster element.  Is there a way to disassociate a dataElement (in my case a rasterElement) from a layer so I can remove the view and all of its layers with out deleting the raster element?

 

 

Andrew Wailes

Ball Aerospace & Technologies Corp.

937-320-4093

 


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.
Reply | Threaded
Open this post in threaded view
|

RE: RE: RE: RE: disassociate dataElement from layer

Kip Streithorst
Administrator
Here are my thoughts:

Currently RasterElementImporterShell does not check for abort() during or after it creates a spatial data view.  I believe this is the behavior Andrew is trying to add to his importer.

In trying to add abort Andrew has two options, he can attempt to clean up the import or he can let existing code take care of it.  If Andrew just checks for abort and then returns false from execute(), I believe the following will happen.  Opticks (ie. ImportAgent ) will detect that the importer failed and will delete the RasterElement it provided to the importer.  This RasterElement deletion will then cause the RasterLayer to be deleted.  This in turn could potential leave a SpatialDataView and SpatialDataWindow that has no layers in it, that will crash the first time the user tries to interact with it.  If Andrew tries to delete either the RasterElement, RasterLayer, SpatialDataView or SpatialDataWindow inside of his importer's execute, all of those will result in the RasterElement being deleted while still executing his importer.  This will proceed to cause a crash if his importer returns false because Opticks (ie. ImportAgent ) will try to clean up the RasterElement it provided to the importer, but at this point that is a dangling pointer.  So my suggestion to Andrew would be do you really need to support abort by the user after the view has been created?

Thanks,
Kip

________________________________________
From: Adkins, Dustan [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:48 PM
To: [hidden email]
Subject: RE: RE: RE: disassociate dataElement from layer

Which RasterElementImporterShell method(s) are you overriding? Can you be specific as to why you have chosen to override this/these methods? Is there a particular reason why you're attempting to delete the View manually? RasterElementImporterShell should do the entire cleanup itself.

________________________________________
From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:41 PM
To: [hidden email]
Subject: RE: RE: disassociate dataElement from layer

Yes this does seem counter-intuitive and here is why.  My importer is currently overwriting the RasterElementImporterShell.  Internal to the RasterElementImporterShell there is a pointer to the raster element that is being imported.  If the user aborts the import, eventually the execute method will return false and the raster element associated with the RasterElementImporterShell will be cleaned up automatically.  If I manually clean up the view which in turn will clean up the layers, the raster element will be destroyed along with the layer and when the RasterElementImporterShell tries to clean up the RasterElement it will crash because the raster element no longer exists.
 
Is there a way to clean up the view, layer, and rasterElement after the view has been created, the rasterElement has been associated with the layer, and the layer has been added to the view without opticks crashing?
 
________________________________________
From: Streithorst, Kip [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:00 PM
To: [hidden email]
Subject: RE: disassociate dataElement from layer
 
Is appears that you want the window to go away but not the dataElement.  Is this correct, because this seems a little counter-intuitive?
 
Thanks,
Kip
 
________________________________________
From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 1:11 PM
To: [hidden email]
Subject: disassociate dataElement from layer
 
In my importer I am attempting to enable the capability for the user to cancel the import after the spatial view has already been created.  I want to clean up the view without deleting the raster element.  Is there a way to disassociate a dataElement (in my case a rasterElement) from a layer so I can remove the view and all of its layers with out deleting the raster element?
 
 
Andrew Wailes
Ball Aerospace & Technologies Corp.
937-320-4093
 



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: RE: RE: RE: RE: disassociate dataElement from layer

Wailes, Andrew
Yes Kip that is the problem I am seeing.

After importing the data we geoReference the data which can potentially cause long waits.  Our customer would very much like us to provide the capability to cancel the import at any step.  If there is no good way to clean everything up properly I may have to gray out the cancel option once the view is created.  This is not an ideal solution.

-----Original Message-----
From: Streithorst, Kip [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 3:21 PM
To: [hidden email]
Subject: RE: RE: RE: RE: disassociate dataElement from layer

Here are my thoughts:

Currently RasterElementImporterShell does not check for abort() during or after it creates a spatial data view.  I believe this is the behavior Andrew is trying to add to his importer.

In trying to add abort Andrew has two options, he can attempt to clean up the import or he can let existing code take care of it.  If Andrew just checks for abort and then returns false from execute(), I believe the following will happen.  Opticks (ie. ImportAgent ) will detect that the importer failed and will delete the RasterElement it provided to the importer.  This RasterElement deletion will then cause the RasterLayer to be deleted.  This in turn could potential leave a SpatialDataView and SpatialDataWindow that has no layers in it, that will crash the first time the user tries to interact with it.  If Andrew tries to delete either the RasterElement, RasterLayer, SpatialDataView or SpatialDataWindow inside of his importer's execute, all of those will result in the RasterElement being deleted while still executing his importer.  This will proceed to cause a crash if his importer returns false because Opticks (ie. ImportAgent ) will try to clean up the RasterElement it provided to the importer, but at this point that is a dangling pointer.  So my suggestion to Andrew would be do you really need to support abort by the user after the view has been created?

Thanks,
Kip

________________________________________
From: Adkins, Dustan [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:48 PM
To: [hidden email]
Subject: RE: RE: RE: disassociate dataElement from layer

Which RasterElementImporterShell method(s) are you overriding? Can you be specific as to why you have chosen to override this/these methods? Is there a particular reason why you're attempting to delete the View manually? RasterElementImporterShell should do the entire cleanup itself.

________________________________________
From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:41 PM
To: [hidden email]
Subject: RE: RE: disassociate dataElement from layer

Yes this does seem counter-intuitive and here is why.  My importer is currently overwriting the RasterElementImporterShell.  Internal to the RasterElementImporterShell there is a pointer to the raster element that is being imported.  If the user aborts the import, eventually the execute method will return false and the raster element associated with the RasterElementImporterShell will be cleaned up automatically.  If I manually clean up the view which in turn will clean up the layers, the raster element will be destroyed along with the layer and when the RasterElementImporterShell tries to clean up the RasterElement it will crash because the raster element no longer exists.
 
Is there a way to clean up the view, layer, and rasterElement after the view has been created, the rasterElement has been associated with the layer, and the layer has been added to the view without opticks crashing?
 
________________________________________
From: Streithorst, Kip [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:00 PM
To: [hidden email]
Subject: RE: disassociate dataElement from layer
 
Is appears that you want the window to go away but not the dataElement.  Is this correct, because this seems a little counter-intuitive?
 
Thanks,
Kip
 
________________________________________
From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 1:11 PM
To: [hidden email]
Subject: disassociate dataElement from layer
 
In my importer I am attempting to enable the capability for the user to cancel the import after the spatial view has already been created.  I want to clean up the view without deleting the raster element.  Is there a way to disassociate a dataElement (in my case a rasterElement) from a layer so I can remove the view and all of its layers with out deleting the raster element?
 
 
Andrew Wailes
Ball Aerospace & Technologies Corp.
937-320-4093
 



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: RE: RE: RE: RE: RE: disassociate dataElement from layer

Kip Streithorst
Administrator
I see three options.

1) Move your georeference code in your importer to before the view is created.  You couldn't do this earlier if you were depending on a GcpList being created in ModelServices, because the SpatialDataView was responsible for creating the GcpList.  However, in recent builds the RasterElementImporterShell does this now instead of the SpatialDataview.  So you should be able to move your georeference step earlier in your import process.  In this case, you don't need to support abort after the view is created.

2) Disable abort for your importer.  You can either disable abort for your entire importer or just a segment of your import.  Let me know if want to do the later and I can give you some details.

3) We update Opticks (specifically ImportAgent) to allow an importer to delete the provided RasterElement without crashing.  This would allow your importer to delete the window.

Let me know what you think.

Thanks,
Kip

-----Original Message-----
From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 3:57 PM
To: [hidden email]
Subject: RE: RE: RE: RE: RE: disassociate dataElement from layer

Yes Kip that is the problem I am seeing.

After importing the data we geoReference the data which can potentially cause long waits.  Our customer would very much like us to provide the capability to cancel the import at any step.  If there is no good way to clean everything up properly I may have to gray out the cancel option once the view is created.  This is not an ideal solution.

-----Original Message-----
From: Streithorst, Kip [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 3:21 PM
To: [hidden email]
Subject: RE: RE: RE: RE: disassociate dataElement from layer

Here are my thoughts:

Currently RasterElementImporterShell does not check for abort() during or after it creates a spatial data view.  I believe this is the behavior Andrew is trying to add to his importer.

In trying to add abort Andrew has two options, he can attempt to clean up the import or he can let existing code take care of it.  If Andrew just checks for abort and then returns false from execute(), I believe the following will happen.  Opticks (ie. ImportAgent ) will detect that the importer failed and will delete the RasterElement it provided to the importer.  This RasterElement deletion will then cause the RasterLayer to be deleted.  This in turn could potential leave a SpatialDataView and SpatialDataWindow that has no layers in it, that will crash the first time the user tries to interact with it.  If Andrew tries to delete either the RasterElement, RasterLayer, SpatialDataView or SpatialDataWindow inside of his importer's execute, all of those will result in the RasterElement being deleted while still executing his importer.  This will proceed to cause a crash if his importer returns false because Opticks (ie. ImportAgent ) will try to clean up the RasterElement it provided to the importer, but at this point that is a dangling pointer.  So my suggestion to Andrew would be do you really need to support abort by the user after the view has been created?

Thanks,
Kip

________________________________________
From: Adkins, Dustan [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:48 PM
To: [hidden email]
Subject: RE: RE: RE: disassociate dataElement from layer

Which RasterElementImporterShell method(s) are you overriding? Can you be specific as to why you have chosen to override this/these methods? Is there a particular reason why you're attempting to delete the View manually? RasterElementImporterShell should do the entire cleanup itself.

________________________________________
From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:41 PM
To: [hidden email]
Subject: RE: RE: disassociate dataElement from layer

Yes this does seem counter-intuitive and here is why.  My importer is currently overwriting the RasterElementImporterShell.  Internal to the RasterElementImporterShell there is a pointer to the raster element that is being imported.  If the user aborts the import, eventually the execute method will return false and the raster element associated with the RasterElementImporterShell will be cleaned up automatically.  If I manually clean up the view which in turn will clean up the layers, the raster element will be destroyed along with the layer and when the RasterElementImporterShell tries to clean up the RasterElement it will crash because the raster element no longer exists.
 
Is there a way to clean up the view, layer, and rasterElement after the view has been created, the rasterElement has been associated with the layer, and the layer has been added to the view without opticks crashing?
 
________________________________________
From: Streithorst, Kip [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 2:00 PM
To: [hidden email]
Subject: RE: disassociate dataElement from layer
 
Is appears that you want the window to go away but not the dataElement.  Is this correct, because this seems a little counter-intuitive?
 
Thanks,
Kip
 
________________________________________
From: Wailes, Andrew [mailto:[hidden email]]
Sent: Thursday, April 10, 2008 1:11 PM
To: [hidden email]
Subject: disassociate dataElement from layer
 
In my importer I am attempting to enable the capability for the user to cancel the import after the spatial view has already been created.  I want to clean up the view without deleting the raster element.  Is there a way to disassociate a dataElement (in my case a rasterElement) from a layer so I can remove the view and all of its layers with out deleting the raster element?
 
 
Andrew Wailes
Ball Aerospace & Technologies Corp.
937-320-4093
 



This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]