Skip to content

Commit

Permalink
add skip create tiles option
Browse files Browse the repository at this point in the history
  • Loading branch information
bertt committed Sep 2, 2024
1 parent 980d39c commit f52b1a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ If --username and/or --dbname are not specified the current username is used as
-r, --refinement (Default: ADD) Refinement ADD/REPLACE (Cesium)
--skip_create_tiles (Default: false) Skip creating tiles (Cesium)
--zoom (Default: 15) Zoom level (Mapbox)
--help Display this help screen.
Expand Down
3 changes: 3 additions & 0 deletions src/pg2b3dm/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ public class Options
[Option('r', "refinement", Required = false, Default = "ADD", HelpText = "Refinement option REPLACE/ADD (Cesium)", SetName = "Cesium")]
public string Refinement{ get; set; }

[Option("skip_create_tiles", Required = false, Default = false, HelpText = "Skip creating tiles, only create tileset.json files (Cesium)", SetName = "Cesium")]
public bool SkipCreateTiles { get; set; }

// mapbox specific options
[Option("zoom", Required = false, Default = 15, HelpText = "Zoom level (Mapbox)", SetName = "Mapbox")]
public int Zoom { get; set; }
Expand Down
6 changes: 4 additions & 2 deletions src/pg2b3dm/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ namespace pg2b3dm;
class Program
{
static string password = string.Empty;
static bool skipCreateTiles = false; // could be useful for debugging purposes
static void Main(string[] args)
{
var version = Assembly.GetEntryAssembly().GetName().Version;
Expand Down Expand Up @@ -93,7 +92,10 @@ static void Main(string[] args)
}
else {
Console.WriteLine($"Spatial index detected on {table}.{geometryColumn}");
}
}

var skipCreateTiles = o.SkipCreateTiles;
Console.WriteLine("Skip create tiles: " + skipCreateTiles);

Console.WriteLine($"Query bounding box of {table}.{geometryColumn}...");
var where = (query != string.Empty ? $" where {query}" : String.Empty);
Expand Down

0 comments on commit f52b1a8

Please sign in to comment.