for (Iterator<Element> i = listElement.elementIterator(); i.hasNext();)
{
Element n = i.next();
if ("region".equalsIgnoreCase(n.getName()))
{
Rectangle shape;
Attribute map = n.attribute("map");
String s = map.getValue();
String val[] = s.split("_");
int rx = Integer.parseInt(val[0]);
int ry = Integer.parseInt(val[1]);
int x1 = World.MAP_MIN_X + ((rx - Config.GEO_X_FIRST) << 15);
int y1 = World.MAP_MIN_Y + ((ry - Config.GEO_Y_FIRST) << 15);
int x2 = (x1 + (1 << 15)) - 1;
int y2 = (y1 + (1 << 15)) - 1;
shape = new Rectangle(x1, y1, x2, y2);
shape.setZmin(World.MAP_MIN_Z);
shape.setZmax(World.MAP_MAX_Z);
if (territory == null)
{
territory = new Territory();
}
territory.add(shape);
}
else if ("polygon".equalsIgnoreCase(n.getName()))
{
Polygon shape = ZoneParser.parsePolygon(n);
if (!shape.validate())
{
error("RestartPointParser: invalid territory data : " + shape + "!");
}
if (territory == null)
{