Add Homogenize

Abierto
#385 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
go
Área
backend

Línea de trabajo

Start by reading the GeometryCollections methods and geometry type definitions in the repository; the issue does not name specific files or tests. Implement Homogenize() to follow the listed empty geometry, merging, and output ordering rules while keeping polygons separate. Done means those cases are covered by tests and the returned geometry types and ordering match the issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

algorithm feature

It would be similar to https://postgis.net/docs/ST_CollectionHomogenize.html

ST_CollectionHomogogenize has a bad characteristic that it can return invalid MultiPolygons. That's not a good idea... Instead, we would return Polygons separately.

It should be a new method Homogenize() Geometry on GeometryCollections. It should:

  • Empty geometries inside the geometry collection should be ignored.
  • If after ignoring empty geometries there is nothing left, then it should return an empty GC.
  • If the GC contains a single geometry, it should return it as a single geometry.
  • All points (whether from singular points or multipoints) will be merged into a single multipoint.
  • All linestrings (whether from singular linestrings or multilinestrings) will be merged into a single multilinestring.
  • Polygons and Multipolygons will NOT be merged, to avoid invalid MultiPolygons.
  • If there is just a single multi geometry (i.e. multipoint, multilinetring) or areal geometry (polygon or multipolygon) then they can be returned on their own.
  • But if there are multiple, they get returned in a new GC (multipolygons first, then polygons, then multilinestrings/linestring, then multipoint/point).
Lenguaje dominante
Go
Estrellas
176
Forks
27
Merge medio
1 d 14 h
PR fusionados (30 d)
4

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de peterstace/simplefeatures

Todos los issues de peterstace/simplefeatures

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.