Skip to main content
Solved

Is it possible to access directly geometry in new InlineQuerier (FME2023)?

  • December 15, 2022
  • 3 replies
  • 183 views

antoine
Contributor
Forum|alt.badge.img+5

In the new, fantastic, InlineQuerier (2023 beta), a geometry column can be selected. Is there a way to call directly the geometry of the feature without geometryextractor? On the same topic, is there a way to define the ouptput geometry without using an ST_asText followed by a GeometryReplacer?

Best answer by markatsafe

@antoine​ Version 2 of the InlineQuerier (FME 2023 betas) allows you to set the geometry column as shown here:

imageAThen you can use the geometry in your SQL query:

SELECT C.*, B.* FROM "CellSignals" as C, "local-area-boundary" as B
WHERE
ST_Intersects(B."_geom",C."_geom") ;

I've attached an example workspace (FME 2023 beta Build 23197)

SpatiaLite spatial queries can be pretty slow apparently.

View original
Did this help you find an answer to your question?

3 replies

Forum|alt.badge.img+2
  • December 15, 2022

@antoine​ InlineQuerier has part of FME for quite a long time. InlineQuerier will return the geometry of the first table listed in the Select.

So

SELECT P.*, T.* FROM "Parks" P ...

will return the Geometry of P but

SELECT T.*, P.* FROM "Parks" P ...

will return the geometry from table T

 

The change in FME 2023 is to add a "geometry" data type in the Define Query columns. You should be able to execute any ST_ function inthe queries:

imageRegarding the Query Columns. By default this is set to all the columns on the FME Feature. But InlineQuerier creates a packed column, fme_feature_content, that contains all the feature information (attributes and geometry). So for efficient use of Inlinequerier, only keep the attributes you will use in the query, usually ID's.


antoine
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • December 16, 2022

@Mark Stoakes​ I wanted to know if I could access directly the geometry from the feature without extracting it into an attribute first. As fme_feature_content contains all the info, I don't know how to do something like ST_buffer(fme_feature_content.geom) and have it as my output geometry.

If I use the "geometry" data type , as far as I know, I need first to use a GeometryExtractor and to use a GeometryReplacer in the output. That is what I did in the example I included as print-screen in my first question.

Could there be a way to call the feature geometry in SQL without extracting it in an attribute beforehand?


Forum|alt.badge.img+2
  • Best Answer
  • December 16, 2022

@antoine​ Version 2 of the InlineQuerier (FME 2023 betas) allows you to set the geometry column as shown here:

imageAThen you can use the geometry in your SQL query:

SELECT C.*, B.* FROM "CellSignals" as C, "local-area-boundary" as B
WHERE
ST_Intersects(B."_geom",C."_geom") ;

I've attached an example workspace (FME 2023 beta Build 23197)

SpatiaLite spatial queries can be pretty slow apparently.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings