Hexagon Geospatial
MENU

Spatial Modeler

Discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Valued Contributor
Posts: 552
Registered: ‎10-27-2015
Accepted Solution

Summarize Related Features Operator - how to use

Dear all, 

I am testing the "Summarize Related Features Operator". I have a polygon shapefile of buildings (Features) and a point shapefile (DetailFeatures). I want to count all the points that are inside each building and add this info as attribute of the building shapefile.

 

Capture.PNG

This is my model at the moment:

Capture.PNG

I have transformed the CRS of both data, to the same CRS.  
MatchAttributeNames is empty. 

Capture.PNG

This is the functional attribute:


COUNT(DetailFeatures.Geometry)

 

The model fails, whit this error:

18/03/19 16:42:35 SessionMgr(12604): Object reference not set to an instance of an object.
18/03/19 16:42:35 SessionMgr(12604): Operator execution failed.

What is the problem?
Regards

 

Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Summarize Related Features Operator - how to use

Hi Giuseppe,

 

I think you just need COUNT(*) in your Functional Attribute.

 

Cheers

 

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Valued Contributor
Posts: 552
Registered: ‎10-27-2015

Re: Summarize Related Features Operator - how to use

Thank you very much Ian! 

I have changed the functional attribute, but I still have that error.

Regards

Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Summarize Related Features Operator - how to use

[ Edited ]

Odd - it worked for me. 

 

Try taking those Coordinate Transformations out - I'm not sure why you'd need those.

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Valued Contributor
Posts: 552
Registered: ‎10-27-2015

Re: Summarize Related Features Operator - how to use

Thank you Ian. I remove the coordinate transformation but the problem is still there. 

Maybe there is some problems with the data. Can I try with some demo data (maybe the same that you are using)? I do not know if this is possible. Thank you very much

Regards

Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Summarize Related Features Operator - how to use

Sure - here you go.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Valued Contributor
Posts: 552
Registered: ‎10-27-2015

Re: Summarize Related Features Operator - how to use

Thank you Ian, it works with your shapefiles. 

Now the model is working with my data, I have added again the coordinate transformation operator, because I was having this error:

19/03/19 01:01:52 SessionMgr(1124): ERROR: #1985 from HexGeo:Smiley FrustratedpatialModeler:Smiley Surprisedperator:Smiley FrustratedetErrorMessage
19/03/19 01:01:52 SessionMgr(1124): ERROR: Spatial Model failed in Summarize Related Features. The error was "Failed to create a coordinate system object.".


I am trying to understand what can be the reason of the error. My data are:

  • feature: EPSG 3004
  • detail feature: EPSG 4326;

Now the model, with my data, is working if I use the coordinate transformation operator (to transform both files in 4326 or 3004).
Thank you, regards

 

Technical Evangelist
Technical Evangelist
Posts: 323
Registered: ‎02-03-2016

Re: Summarize Related Features Operator - how to use

I believe we have a logged bug on this operator not properly handling different CRS definitions for the primary geometry fields of the two Features involved.  We'll hopefully take care of it for the next release but in the meantime you have found how to make it work.  - Hal

Valued Contributor
Posts: 552
Registered: ‎10-27-2015

Re: Summarize Related Features Operator - how to use

Maybe this is the best way, in order to not change the CRS manually:

Capture.PNG

Technical Evangelist
Technical Evangelist
Posts: 323
Registered: ‎02-03-2016

Re: Summarize Related Features Operator - how to use

Yes, this is what I do.  - Hal

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.