GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 36
Registered: ‎11-21-2015
Accepted Solution

spatial filter using session filter in GMSC

[ Edited ]

Hi,

In GeoMedia SmartClient we need to, for example display only the contour lines that are within a selected area feature .. in other words a spatial filter using the session filter. Is there any such example, or a sample SQL.. Can you pls share.

 

In a GMSC Project we already make use of session filters to auto display features associated with a selected feature. Mostly based on ID relationship. However, now we have a requirement to set a session filter using spatial parameter. But all the examples of session filter I've seen are attribute based.

 

 

Thanks,

Shameem

 

 

Staff
Posts: 1,135
Registered: ‎10-18-2015

Re: spatial filter using session filter in GMSC

the result of the query must be a list of IDs. In the following example we are filtering the parcels where the id of the parcel is within the selection of another table:

 

ID in (select PARCEL_ID from BUILDINGEXTENSION as b where b.ID = {SESSION.BUILDINGEXTENSION.ID})

Any statement that includes spatial functions is supported too.

 

 

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 36
Registered: ‎11-21-2015

Re: spatial filter using session filter in GMSC

Thanks Stefano. That worked.

 

What I did is 

 

In Oracle
CREATE MATERIALIZED VIEW MVWTest_AllPltCntrsIntrsct
AS
SELECT ROWNUM AS ID,  B.ID AS PLOT_REF_ID, SDO_GEOM.SDO_INTERSECTION(B.Geometry, A.Geometry, 0.005) as GEOMETRY
  FROM testcontours  A, tks_plots B
  WHERE SDO_RELATE(A.Geometry, B.Geometry,
                   'mask=ANYINTERACT') = 'TRUE';

 

in GMSC

assigned it a session filter (with a filter clause similar to what you suggested)

 

*Ideally it should be a view (rather than materialized view). However, that'd have the spatial indexing issue mentioned in this post. 

https://community.hexagongeospatial.com/t5/GMSC-Q-A/GMSC-Publish-Error-ORA-13226-Interface-not-suppo...