Showing results for 
Search instead for 
Do you mean 

X and Y Expressions return null values, Analyze Geometry also returns null values for point geometry

by Technical Evangelist on ‎06-10-2020 06:16 PM (98 Views)


Why would X and Y functional expressions as well as Analyze Geometry command fail to calculate values for my point geometries?


The Analyize Geometry command, as well as certain functional geometry based expressions such as X, Y, Z, LENGTH, etc.. return a null value when directly processing input geometry stored as a "geometry collection".


A geometry collection is typically when a number of graphic items are all stored in the same record of geometry field (stored as a "geometry collection"). As mentioned, a collection normally contains multiple geometries and in such cases if you select one geometry in the GeoMedia map window, you can see the other geoemtries in the collection also highlight/select.


It is possible however to have a single geometry stored as a collection. If you are displaying points from a arcview connection (shapefile points) try selecting one of your points, then right-click for the Geometry Information option. It is likely that the point is stored as part of a "Geometry Collection", but in this case, a collection composed of a single point.

As mentioned a geometry collection is normally multiple geometries or points.. so commands that require a single geometry, like X and Y functional expressions and analyize geometry commands do not work for geometry collections.


In the functional expression system there are work-arounds that may be helpful.


You might choose to use COMPRESS which will simplify geometry collections that contain a single geometry. The following example will return the simplified geometry:


The following example will return the X value for any single point or single point collection from the input.geometry:
X(COMPRESS(Input.Geometry), ProjectedMeas, Meter)


There are other functional expressions that commonly used. The GEOMETRIES function can be used to expand geometry collections to their individual components. It is an "expansive" type function where you most often get more records in the output.

The following expression would expand any collections in the geometry field and return single geometry items.


The following could be used to calculate the Y value for single item points:


Related Article:
Exporting Points to Shapefile: Multipoint vs. Point Shapefile Formats