root / tags / v10_RC2c / libraries / libCq CMS for java.old / src / org / cresques / io / data / WriterSupportOptions.java @ 8745
History | View | Annotate | Download (2.76 KB)
1 |
/*
|
---|---|
2 |
* Cresques Mapping Suite. Graphic Library for constructing mapping applications.
|
3 |
*
|
4 |
* Copyright (C) 2004-5.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
19 |
*
|
20 |
* For more information, contact:
|
21 |
*
|
22 |
* cresques@gmail.com
|
23 |
*/
|
24 |
package org.cresques.io.data; |
25 |
|
26 |
|
27 |
/**
|
28 |
* Opciones soportadas por los drivers de escritura
|
29 |
* @author Nacho Brodin (brodin_ign@gva.es)
|
30 |
*/
|
31 |
public class WriterSupportOptions { |
32 |
private String extension = null; |
33 |
private String[] blockSizeList = { |
34 |
"1", "8", "16", "32", "64", "128", |
35 |
"256", "512", "1024" |
36 |
}; |
37 |
private boolean georef = true; |
38 |
private int blockSizeDefault = 1; |
39 |
|
40 |
/**
|
41 |
* Constructor
|
42 |
* @param extension Extensi?n del driver
|
43 |
*/
|
44 |
public WriterSupportOptions(String extension) { |
45 |
this.extension = extension;
|
46 |
} |
47 |
|
48 |
/**
|
49 |
* Asigna el tama?o de bloque que se lee de una vez en la imagen origen
|
50 |
* @param blockSize Tama?o de bloque
|
51 |
*/
|
52 |
public void setBlockSize(int blockSize) { |
53 |
this.blockSizeDefault = blockSize;
|
54 |
} |
55 |
|
56 |
/**
|
57 |
* Se asigna true o false si se desea o no que el fichero de salida tenga georeferenciaci?n.
|
58 |
* @param geor true salva con georeferenciaci?n
|
59 |
*/
|
60 |
public void setWriteGeoref(boolean geor) { |
61 |
this.georef = geor;
|
62 |
} |
63 |
|
64 |
/**
|
65 |
* Obtiene el valor del flag que dice si se desea o no salvar con georeferenciaci?n
|
66 |
* @return true si se desea salvar con georeferenciaci?n
|
67 |
*/
|
68 |
public boolean getGeoref() { |
69 |
return georef;
|
70 |
} |
71 |
|
72 |
/**
|
73 |
* Obtiene el tama?o de bloque seleccionado
|
74 |
* @return Tama?o de bloque
|
75 |
*/
|
76 |
public int getBlockSize() { |
77 |
return blockSizeDefault;
|
78 |
} |
79 |
|
80 |
/**
|
81 |
* Obtiene la extensi?n del driver
|
82 |
* @return Extensi?n del driver
|
83 |
*/
|
84 |
public String getExtension() { |
85 |
return extension;
|
86 |
} |
87 |
|
88 |
/**
|
89 |
* Obtiene la lista de tama?os de bloque posible
|
90 |
* @return Lista de tama?os de bloque
|
91 |
*/
|
92 |
public String[] getBlockSizeList() { |
93 |
return blockSizeList;
|
94 |
} |
95 |
} |