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
Occasional Contributor
Posts: 8
Registered: ‎05-10-2018

GeoCSV output

Hello, 

 

I am trying to output a 3 column textfile from feature points in the spatial modeler. The shapefile are orginally polygons which are changed into centroids.

 

After some searching I though outputting as a GEOcsv sounded like the best bet. However I am really struggling to get the operator to output the geometry columns.  From the help it looks as though it should output automatically as my features are points, however this does not happen unless I write out a temp shapefile and then output as csv. 

 

It seems as though I should be able to force geometry output as an option in the feature output operator - but I cannot seem to get that working - it requires a dictionary input, but I need to create a new 1 item dictionary for that - but it only accepts a data input? 

 

imaginesp.JPG

 

Thanks!

Emily 

Occasional Contributor
Posts: 8
Registered: ‎05-10-2018

Re: GeoCSV output

I should add - all I want is a text file of   : id, x and y

Staff
Posts: 119
Registered: ‎07-04-2016

Re: GeoCSV output

Hi Emily,

 

You can use the Functional Attributes to export X and Y coordinates. It would look something like below:

 

2018-12-05 13_22_39-Start.png

 

The X and Y functions have following expression: X/Y(Geometry, MeasType, UnitOfMeasure)

 

Geometry you can take from Attribute column.

 

MeasType (Optional) has two possible values:

0 TrueMeas Measurements are computed on the surface of the ellipsoid (taking the earth's curvature into account). Distances are also referred to as geodesic distances.

1 ProjectedMeas Measurements are computed on the projection plane. These measurements are affected by projection distortions.

 

TrueMeas is used as default.

 

UnitOfMeasure (Optional): The angular (if MeasType is TrueMeas) or linear (if MeasType is ProjectedMeas) unit in which the geometry is to be measured.

 

Let me know if it is what you were looking for.

 

Kind Regards,
Marina Vardovska
Hexagon Geospatial Support
Staff
Posts: 119
Registered: ‎07-04-2016

Re: GeoCSV output

And you can remove attributes you don't need with the Remove Attributes operator.

Kind Regards,
Marina Vardovska
Hexagon Geospatial Support
Occasional Contributor
Posts: 8
Registered: ‎05-10-2018

Re: GeoCSV output

Hi Marina, 

 

That does seem to work but I cannot Run in Batch. When I try to run-in-batch it stops on Generate Functional Attributes and just hangs indefinitely. If I skip one it does the same on the next one. 

 

Any ideas?

 

Emily 

Highlighted
Staff
Posts: 119
Registered: ‎07-04-2016

Re: GeoCSV output

Hi Emily,

 

What output do you specify: is it .shp or .csv ? Are there any errors in Session Log?

Could you please try to run the model attached here, which is working for me when running in Batch?

Kind Regards,
Marina Vardovska
Hexagon Geospatial Support
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.