Add Homogenize

Aperta
#385 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
go
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).
Lingua principale
Go
Stelle
176
Fork
27
Merge medio
1g 14h
PR unite (30g)
4

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di peterstace/simplefeatures

Tutte le issue di peterstace/simplefeatures

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.