Skip to content

Commit

Permalink
updated base branch v4.1.1 via merge
Browse files Browse the repository at this point in the history
Merge branch 'refs/heads/develop' into feature/using-radixtree-detectoverlap
  • Loading branch information
mi-24v committed Sep 9, 2024
2 parents 136ba26 + 14706ca commit a7018fe
Show file tree
Hide file tree
Showing 2 changed files with 2,060 additions and 1,905 deletions.
14 changes: 7 additions & 7 deletions transform/convert_quadkey_and_Vertical_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ func ConvertExtendedSpatialIDToSpatialIDs(extendedSpatialID *object.ExtendedSpat
// extendedSpatialIDs :["20/85263/65423/23/-2", "20/85263/65423/23/-1"]
func ConvertTileXYZsToExtendedSpatialIDs(request []*object.TileXYZ, zBaseExponent int64, zBaseOffset int64, outputVZoom int64) ([]object.ExtendedSpatialID, error) {

extendedSpatialIDsMap := make(map[int64]object.ExtendedSpatialID)
extendedSpatialIDsMap := make(map[object.ExtendedSpatialID]bool)

for _, r := range request {
if !extendedSpatialIDCheckZoom(r.HZoom(), outputVZoom) {
Expand All @@ -627,20 +627,20 @@ func ConvertTileXYZsToExtendedSpatialIDs(request []*object.TileXYZ, zBaseExponen
}

for z := zMin; z <= zMax; z++ {
// 重複排除
if _, exists := extendedSpatialIDsMap[z]; exists {
continue
}
extendedSpatialID := new(object.ExtendedSpatialID)
extendedSpatialID.SetX(r.X())
extendedSpatialID.SetY(r.Y())
extendedSpatialID.SetZ(z)
extendedSpatialID.SetZoom(r.HZoom(), outputVZoom)
extendedSpatialIDsMap[z] = *extendedSpatialID
// 重複排除
if _, exists := extendedSpatialIDsMap[*extendedSpatialID]; exists {
continue
}
extendedSpatialIDsMap[*extendedSpatialID] = true
}
}
extendedSpatialIDs := make([]object.ExtendedSpatialID, 0, len(extendedSpatialIDsMap))
for _, extendedSpatialID := range extendedSpatialIDsMap {
for extendedSpatialID := range extendedSpatialIDsMap {
extendedSpatialIDs = append(extendedSpatialIDs, extendedSpatialID)
}

Expand Down
Loading

0 comments on commit a7018fe

Please sign in to comment.