Hexagon Geospatial
MENU

GeoMedia

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 112
Registered: ‎01-14-2018

Automatically calculate area

Dear all,

 

I have feature of type area containing a field that should calculate the area of each polygon,

I used "Vector > Update > Update Attributes" and r.click on the area field and choosed area.

 

But when drawing a new polygon its area is not calculated automatically, Is there a way to automatically assign a field to calculate area whenever a new polygon is drawn?

 

Best Regards,

Khaled

Regular Contributor
Posts: 174
Registered: ‎05-25-2016

Re: Automatically calculate area

Use Functional Attributes instead of Update Attributes

Highlighted
Staff
Posts: 110
Registered: ‎05-26-2016

Re: Automatically calculate area

You can use Funtional Attributes ie AREA(Input.Geometry,ProjectedMeas,Meter) or Analyse Geometry commands to compute Area dynamically but to then insert value into column you still need to use Vector > Update > Update Attributes  by selecting that query and the associated area attribute to update.

 

If you want it dynamically computed as you digitize , you could use a database Trigger if the database supports spatial Area function.

 

For example, I use a SQL Server Spatial database as my warehouse. GeoMedia requires you have insert and update triggers.

I have an area feature Property_Address with a primary key of ID1 and an area attribute area_m i want populated

 

I simply modified  the Geomedia Insert Trigger by adding the following line.

 

update Property_Address set area_m = Geometry_SPA.STArea() where id1 = (SELECT ID1 FROM inserted)

 

Now when i digitise the area_m attribute is populated automatically

 

 

 

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