Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spatial: Translate EnvelopeCombiner.CombineAsGeometry aggregate function #28184

Closed
roji opened this issue Jun 8, 2022 · 1 comment · Fixed by #28394
Closed

Spatial: Translate EnvelopeCombiner.CombineAsGeometry aggregate function #28184

roji opened this issue Jun 8, 2022 · 1 comment · Fixed by #28394
Assignees
Labels
area-query area-spatial area-sqlite area-sqlserver closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Jun 8, 2022

@airbreather graciously added EnvelopeCombiner.Combine for us in NetTopologySuite/NetTopologySuite#610, so once NTS is next released we can add an aggregate method translation for that as a follow-up to #13278:

.NET SQL Server SpatiaLite PostGIS
EnvelopeCombiner.CombineAsGeometry(geoms) EnvelopeAggregate(@​geoms) Extent(@​geoms) ST_Extent(@​geoms)
@ajcvickers ajcvickers added this to the 7.0.0 milestone Jun 10, 2022
@bricelam bricelam removed the blocked label Jul 7, 2022
roji added a commit to roji/efcore that referenced this issue Jul 8, 2022
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jul 8, 2022
@roji roji changed the title Spatial: Translate EnvelopeCombiner.Combine aggregate function Spatial: Translate EnvelopeCombiner.CombineAsGeometry aggregate function Jul 8, 2022
roji added a commit to roji/efcore that referenced this issue Jul 8, 2022
@ghost ghost closed this as completed in #28394 Jul 8, 2022
ghost pushed a commit that referenced this issue Jul 8, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0, 7.0.0-preview7 Jul 10, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-preview7, 7.0.0 Nov 5, 2022
@douglasg14b
Copy link

douglasg14b commented Jan 13, 2024

Are the code example of how this works? For instance using EnvelopeCombiner.CombineAsGeometry ?

Just trying to get a SELECT st_extent(position) from my_table is seemingly harder than I thought it would be using this....

await _context.Screens
            .GroupBy(x => 1)
            .Select(g => EnvelopeCombiner.CombineAsGeometry(g.Select(x => x.Position)))
            .FirstOrDefaultAsync();

results in:

SELECT ST_Extent(t.position)::geometry
      FROM (
          SELECT s.position, 1 AS "Key"
          FROM screens AS s
      ) AS t
      GROUP BY t."Key"
      LIMIT 1

Can this be used without a group by? What is the intended behavior?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query area-spatial area-sqlite area-sqlserver closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants