Last post Sep 06, 2015 03:30 PM by PatriceSc
Sep 06, 2015 10:28 AM|sudip_inn|LINK
i got a routine which seems generate a tile from image but there is no code like how to call it. anyone guide me how to use the routine to generate tiles from images
here is the url from where full routine is there.
Sep 06, 2015 11:11 AM|PatriceSc|LINK
Does it compile fine? It is a console app. See
https://msdn.microsoft.com/en-us/library/0wc2kk78(v=vs.90).aspx for how to create a console app. You can use
http://dailydotnettips.com/2011/09/16/how-to-pass-command-line-arguments-using-visual-studio/ to define the arguments when it runs from Visual Studio.
It seems you have to pass a path to the file, the target directory and the zoom level (or /help or -help should show usage help).
Sep 06, 2015 11:35 AM|sudip_inn|LINK
just tell me how to set value for the below code
Options options = new Options();
options.AddOption(new Option(OPTIONS.FILEPATH, true, "File to parse"));
options.AddOption(new Option(OPTIONS.TARGETFOLDER, true, "Folder to create tiles"));
options.AddOption(new Option(OPTIONS.REMOVEXISTINGFILES, false, "Remove existing files"));
options.AddOption(new Option(OPTIONS.MAXZOOM, true, "Max zoom dimension"));
options.AddOption(new Option(OPTIONS.HELP, true, "Print this message"));
show me how to set file path, target folder path, REMOVEXISTINGFILES and zoom level
Sep 06, 2015 01:07 PM|wim sturkenboom|LINK
You can probably pass the parameter 'max = 5' or 'max 5' to the program to set the zoom level.
Compile the program, run it from the command line and pass the parameters that it can accept
public struct OPTIONS
public const string FILEPATH = "f";
public const string TARGETFOLDER = "t";
public const string REMOVEXISTINGFILES = "d";
public const string MAXZOOM = "max";
public const string HELP = "help";
The letters in the above struct seem to indicate the acceptable options for the program.
Sep 06, 2015 02:45 PM|sudip_inn|LINK
where u set file path, target folder path, REMOVEXISTINGFILES and zoom level ?
just do not understand what u try to say??
Sep 06, 2015 03:30 PM|PatriceSc|LINK
This is a console app which usually runs from a command line prompt. When you run this kind of application from VS, you can use
http://dailydotnettips.com/2011/09/16/how-to-pass-command-line-arguments-using-visual-studio/ that I mentioned earlier to tell which command line parameters you want to use.
Or just compile this to create an exe file, open a command line prompt and run this exe file from there. It could be something such as :
app.exe /f c::\folder\input.png /t c:\outputfolder /max 10
(so try to type /f c::\folder\input.png /t c:\outputfolder /max 10 in the dialog shown in the above link).