[AZ-372] Apply dotnet format whitespace cleanup; archive batch 22
ci/woodpecker/push/01-test Pipeline was successful
ci/woodpecker/push/02-build-push Pipeline was successful

Pure whitespace-only cleanup uncovered by the new format gate from the
previous commit. Verified via `git diff -w --stat`: only 4 files differ
when whitespace is ignored, and those differ only by the BOM byte.

Cleanup kinds applied across 22 source files:
- BOM removal (MapConfig.cs, SatTile.cs, GeoUtils.cs,
  IntegrationTests/Program.cs)
- CRLF -> LF (IntegrationTests/Program.cs)
- Trailing whitespace on blank lines (Common, Api, DataAccess,
  IntegrationTests, Services.RegionProcessing,
  Services.TileDownloader)
- Final newline added (RoutePoint.cs, GeoPoint.cs, others)

After this commit `dotnet format whitespace SatelliteProvider.sln
--verify-no-changes` exits 0; AC-1 is enforceable from `scripts/
run-tests.sh` going forward.

Also lands the batch 22 report, code-review report
(PASS_WITH_WARNINGS, 2 Low findings — both deferred per spec),
dependency-table status update (AZ-372 -> Done (In Testing)), task
archive (todo/ -> done/), and autodev state update.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-11 04:43:08 +03:00
parent 68359350fc
commit 534ab41b8e
28 changed files with 519 additions and 279 deletions
@@ -27,7 +27,7 @@ public class TileRepository : ITileRepository
file_path as FilePath, created_at as CreatedAt, updated_at as UpdatedAt
FROM tiles
WHERE id = @Id";
return await connection.QuerySingleOrDefaultAsync<TileEntity>(sql, new { Id = id });
}
@@ -44,7 +44,7 @@ public class TileRepository : ITileRepository
WHERE tile_zoom = @TileZoom AND tile_x = @TileX AND tile_y = @TileY
ORDER BY updated_at DESC
LIMIT 1";
return await connection.QuerySingleOrDefaultAsync<TileEntity>(sql, new { TileZoom = tileZoom, TileX = tileX, TileY = tileY });
}
@@ -64,11 +64,11 @@ public class TileRepository : ITileRepository
AND tile_zoom = @TileZoom
AND version = @Version
LIMIT 1";
return await connection.QuerySingleOrDefaultAsync<TileEntity>(sql, new
{
Latitude = latitude,
Longitude = longitude,
return await connection.QuerySingleOrDefaultAsync<TileEntity>(sql, new
{
Latitude = latitude,
Longitude = longitude,
TileSizeMeters = tileSizeMeters,
TileZoom = zoomLevel,
Version = version
@@ -78,18 +78,18 @@ public class TileRepository : ITileRepository
public async Task<IEnumerable<TileEntity>> GetTilesByRegionAsync(double latitude, double longitude, double sizeMeters, int zoomLevel)
{
using var connection = new NpgsqlConnection(_connectionString);
const double EARTH_CIRCUMFERENCE_METERS = 40075016.686;
const int TILE_SIZE_PIXELS = 256;
var latRad = latitude * Math.PI / 180.0;
var metersPerPixel = (EARTH_CIRCUMFERENCE_METERS * Math.Cos(latRad)) / (Math.Pow(2, zoomLevel) * TILE_SIZE_PIXELS);
var tileSizeMeters = metersPerPixel * TILE_SIZE_PIXELS;
var expandedSizeMeters = sizeMeters + (tileSizeMeters * 2);
var latRange = expandedSizeMeters / 111000.0;
var lonRange = expandedSizeMeters / (111000.0 * Math.Cos(latitude * Math.PI / 180.0));
const string sql = @"
SELECT id, tile_zoom as TileZoom, tile_x as TileX, tile_y as TileY,
latitude, longitude,
@@ -101,7 +101,7 @@ public class TileRepository : ITileRepository
AND longitude BETWEEN @MinLon AND @MaxLon
AND tile_zoom = @TileZoom
ORDER BY latitude DESC, longitude ASC, updated_at DESC";
return await connection.QueryAsync<TileEntity>(sql, new
{
MinLat = latitude - latRange / 2,
@@ -129,7 +129,7 @@ public class TileRepository : ITileRepository
tile_y = EXCLUDED.tile_y,
updated_at = EXCLUDED.updated_at
RETURNING id";
return await connection.ExecuteScalarAsync<Guid>(sql, tile);
}
@@ -151,7 +151,7 @@ public class TileRepository : ITileRepository
file_path = @FilePath,
updated_at = @UpdatedAt
WHERE id = @Id";
return await connection.ExecuteAsync(sql, tile);
}