Calculating regions from MultiPolygon objects in MapXtreme


The user wants to calculate regions from multi polygons on the basis of the object. This works properly with: 
select Obj as Object, MI_Area(Obj, 'sq km', 'Spherical') as AreaSqKm from xy.
User further want calculate the regions of multi polygons within a second layer.

User has two layers - Layer1 is for Swiss border and Layer2 is for all UMTS-cells in Switzerland where the best server areas are calculated per cell.

In this example the UMTS-cell called BURC3G has a calculated best server area of 106.8sqkm.

What user want to know is the SQ km's which are inner Switzerland only i.e. inside Layer2.

This can be done with MapInfo Pro manually by:
a) select cell-area
b) set the target
c) select swiss-layer
d) Menu Objects-Erase => result 8.632sqkm.

The user tried with following:
select CELLID, Obj as Object, MI_Area(Obj, 'sq km', 'Spherical') as AreaSqKm from <table> where CELLID = 'BURC3G' and  MI_Within(.Obj,@container)
But this does filter the cell id BURC3G completely while the center of this multi-polygon is outside the swiss borders.

How can this be done similarly in MapXtreme Code? 


The user wants to calculate the area of intersection of Layer1 and Layer2 and with MI_Within() function. Therefore,  multi-polygons which are intersected from the Switzerland border are completely filtered out.

MI_Within() function determines if one geometry object is entirely within another geometry object.


UPDATED: April 20, 2017

Use MI_Intresection() function instead of MI_Within() to calculate the region/area which falls in the intersection of Layer1 and Layer2. 
e.g. select CELLID, Obj as Object, MI_Area(Obj, 'sq km', 'Spherical') as AreaSqKm from <table> where CELLID = 'BURC3G' and  MI_Intersection(.Obj,@container)

MI_Intersection() function  returns a geometry object which represents the intersection between two input geometry objects.

User-added image

Refer "SQL Language Reference Guide" which can be found in "<<InstallationDirectory>>\Documentation\Help" .


Environment Details

Product Feature: Features



  • No Downloads