Support density and non-density pixels in raster style
This commit is contained in:
parent
a647566ef0
commit
b10ad5e6b5
1 changed files with 18 additions and 0 deletions
|
@ -134,6 +134,15 @@ public class RenderingRuleProperty {
|
||||||
public int parseIntValue(String value){
|
public int parseIntValue(String value){
|
||||||
if(type == INT_TYPE){
|
if(type == INT_TYPE){
|
||||||
try {
|
try {
|
||||||
|
int colon = value.indexOf(':');
|
||||||
|
if(colon != -1) {
|
||||||
|
int c = 0;
|
||||||
|
if(c > 0) {
|
||||||
|
c += Integer.parseInt(value.substring(0, c));
|
||||||
|
}
|
||||||
|
c += Integer.parseInt(value.substring(c + 1));
|
||||||
|
return c;
|
||||||
|
}
|
||||||
return Integer.parseInt(value);
|
return Integer.parseInt(value);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
log.error("Rendering parse " + value);
|
log.error("Rendering parse " + value);
|
||||||
|
@ -159,6 +168,15 @@ public class RenderingRuleProperty {
|
||||||
public float parseFloatValue(String value){
|
public float parseFloatValue(String value){
|
||||||
if(type == FLOAT_TYPE){
|
if(type == FLOAT_TYPE){
|
||||||
try {
|
try {
|
||||||
|
int colon = value.indexOf(':');
|
||||||
|
if(colon != -1) {
|
||||||
|
float c = 0;
|
||||||
|
if(c > 0) {
|
||||||
|
c += Float.parseFloat(value.substring(0, c));
|
||||||
|
}
|
||||||
|
c += Float.parseFloat(value.substring(c + 1));
|
||||||
|
return c;
|
||||||
|
}
|
||||||
return Float.parseFloat(value);
|
return Float.parseFloat(value);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
log.error("Rendering parse " + value);
|
log.error("Rendering parse " + value);
|
||||||
|
|
Loading…
Reference in a new issue