Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DataSource.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DataSource.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DataSource.java	(revision 1291)
@@ -0,0 +1,93 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.io;
+
+import java.util.Hashtable;
+
+
+/**
+ * Origen de datos. Unidad, volumen de red, etc.
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class DataSource {
+    private static int counter = 0;
+    private static Hashtable units = new Hashtable();
+    String path = null;
+    String name = null;
+
+    public DataSource(String path, String name) {
+        this.path = path;
+        this.name = name;
+        units.put(name, this);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public static DataSource getDSFromName(String name) {
+        if (name.indexOf("[") >= 0) {
+            name = name.substring(name.indexOf("[") + 1);
+        }
+
+        if (name.indexOf("]") >= 0) {
+            name = name.substring(0, name.indexOf("]"));
+        }
+
+        DataSource ds = (DataSource) units.get(name);
+
+        return ds;
+    }
+
+    /**
+     * Sustituye en el path el nombre de la unidad por su path real.
+     *
+     * @param path
+     * @return
+     */
+    public static String normalize(String path) {
+        if (path.indexOf("[") >= 0) {
+            DataSource ds = DataSource.getDSFromName(path);
+
+            if (ds == null) {
+                return null;
+            }
+
+            path = path.substring(0, path.indexOf("[")) + ds.getPath() +
+                   path.substring(path.indexOf("]") + 1);
+
+        }
+
+        return path;
+    }
+
+    public String toString() {
+        return "[" + counter + "]";
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/GeoFile.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/GeoFile.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/GeoFile.java	(revision 1291)
@@ -0,0 +1,178 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.io;
+
+import java.awt.geom.AffineTransform;
+import java.util.Date;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.px.IObjList;
+
+
+/**
+ * Ancestro de todos los formatos geogr�ficos
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>* @author administrador
+ */
+public abstract class GeoFile implements Projected, Extent.Has {
+    IProjection proj = null;
+    /**
+     * Extent completo del raster. Este contiene las coordenadas reales tanto
+     * para un raster rotado como sin rotar. Este extent coincide con requestExtent
+     * cuando el raster no tiene rotaci�n.
+     */
+    protected Extent extent = null;
+    /**
+     * Este es el extent sobre el que se ajusta una petici�n para que esta no exceda el
+     * extent m�ximo del raster. Para un raster sin rotar ser� igual al extent
+     * pero para un raster rotado ser� igual al extent del raster como si no
+     * tuviera rotaci�n. Esto ha de ser as� ya que la rotaci�n solo se hace sobre la
+     * vista y las peticiones han de hacerse en coordenadas de la imagen sin shearing
+     * aplicado.
+     */
+    protected Extent requestExtent = null;
+    /**
+     * Esto corresponde a la transformaci�n del extent de la imagen. Se calcula a partir del extent
+     * guardado en el fichero .rmf asociado a la imagen.  En caso de que no exista este fichero no habr�
+     * transformaci�n
+     */
+    protected AffineTransform	transformRMF = null;
+    /**
+     * Esto corresponde a la transformaci�n del extent de la imagen. Se calcula a partir del extent
+     * guardado en el fichero .tfw asociado a la imagen o en la cabecera de la misma.
+     */
+    protected AffineTransform	transformTFW = null;
+
+
+    protected boolean			rmfExists = false;
+    long fileSize = 0;
+    protected long bytesReaded = 0;
+    protected long lineCnt = 0;
+    String name;
+
+    public GeoFile() {
+    }
+
+    public GeoFile(IProjection p, String n) {
+        proj = p;
+        name = n;
+
+        if (name != null) {
+            name = DataSource.normalize(name);
+        }
+        extent = new Extent();
+      	transformRMF = new AffineTransform();
+    	transformTFW = new AffineTransform();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String n) {
+        name = n;
+    }
+
+    public long getFileSize() {
+        return fileSize;
+    }
+
+    public void setFileSize(long sz) {
+        fileSize = sz;
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    abstract public void reProject(ICoordTrans rp);
+
+    /**
+     * Extent completo del raster. Este contiene las coordenadas reales tanto
+     * para un raster rotado como sin rotar. Este extent coincide con requestExtent
+     * cuando el raster no tiene rotaci�n.
+     * @return Extent
+     */
+    public Extent getExtent() {
+        return extent;
+    }
+
+    /**
+     * Este es el extent sobre el que se ajusta una petici�n para que esta no exceda el
+     * extent m�ximo del raster. Para un raster sin rotar ser� igual al extent
+     * pero para un raster rotado ser� igual al extent del raster como si no
+     * tuviera rotaci�n. Esto ha de ser as� ya que la rotaci�n solo se hace sobre la
+     * vista y las peticiones han de hacerse en coordenadas de la imagen sin shearing
+     * aplicado.
+     * @return Extent
+     */
+    public Extent getExtentForRequest() {
+        return requestExtent;
+    }
+
+    abstract public GeoFile load() throws Exception;
+
+    abstract public void close();
+
+    abstract public IObjList getObjects();
+
+    /**
+     * Filtra espacios en blanco. Deja solo uno por
+     */
+    public static String filterWS(String buf) {
+        boolean lastCharWhite = false;
+        String str = "";
+        buf = buf.trim();
+
+        for (int i = 0; i < buf.length(); i++) {
+            char c = buf.charAt(i);
+
+            if (Character.isWhitespace(c)) {
+                if (lastCharWhite) {
+                    continue;
+                }
+
+                lastCharWhite = true;
+                c = ' ';
+            } else {
+                lastCharWhite = false;
+            }
+
+            str += c;
+        }
+
+        return str;
+    }
+
+    protected long getTime() {
+        return (new Date()).getTime();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/FileFolder.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/FileFolder.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/FileFolder.java	(revision 1291)
@@ -0,0 +1,51 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.io;
+
+
+/**
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>* @author administrador
+ */
+abstract public class FileFolder {
+    static String[] supportedFolders = { "zip://" };
+
+    abstract public int count();
+
+    /**
+     * Analiza un nombre de fichero en formato zip://zipname.zip?file.ext
+     * @param urlName
+     */
+    public static boolean isUrl(String name) {
+        String str = name.substring(0, 6);
+        str.toLowerCase();
+
+        for (int i = 0; i < supportedFolders.length; i++)
+            if (str.compareTo(supportedFolders[i]) == 0) {
+                return true;
+            }
+
+        return false;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfGroup.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfGroup.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfGroup.java	(revision 1291)
@@ -0,0 +1,348 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.io;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.Locale;
+
+
+/**
+ * Grupo Dxf (code, data). Auxiliar para leer ficheros dxf
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author "Michel Michaud" (code from)
+ */
+public class DxfGroup {
+    /*
+    def get_group(handle):
+    _code = int(handle.readline())
+    _dfun = get_data_type(_code)
+    _data = _dfun(handle.readline())
+    return (_code, _data)
+     */
+    private static final DecimalFormatSymbols dfs = new DecimalFormatSymbols(Locale.US);
+    private static final DecimalFormat[] decimalFormats = new DecimalFormat[] {
+                                                              new DecimalFormat("#0",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.0",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.00",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.0000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.00000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.0000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.00000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.000000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.0000000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.00000000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.000000000000",
+                                                                                dfs)
+                                                          };
+    int code;
+    Object data;
+    
+    /**
+     * Constructor por defecto.
+     */
+    public DxfGroup() {
+        code = -1;
+        data = null;
+    }
+    
+    /**
+     * Constructor habitual. Representa una entidad individual dentro del DXF
+     * @param code, �ndice del dato dentro del DxfGroup
+     * @param data, el propio dato que queda almacenado en el DxfGroup
+     */
+    public DxfGroup(int code, String data) {
+        this.code = code;
+        this.data = data;
+    }
+    
+    /**
+     * Lee una entidad del DXF y la empaqueta en un DxfGroup.
+     * @param fi, BufferedReader mediante el cual accedemos al DXF
+     * @return DxfGroup con la informaci�n procedente del DXF
+     * @throws NumberFormatException
+     * @throws IOException
+     */
+    public static DxfGroup read(BufferedReader fi)
+                         throws NumberFormatException, IOException {
+        DxfGroup grp = null;
+        String txt = fi.readLine();
+
+        if (txt != null) {
+            if (!txt.equals("")) {
+                grp = new DxfGroup();
+                grp.code = Integer.parseInt(txt.trim());
+                grp.readData(fi);
+            } else {
+                // Se trata de una linea en blanco y no se hace nada.
+            }
+        }
+
+        return grp;
+    }
+    
+    /**
+     * Devuelve el code
+     * @return
+     */
+    public int getCode() {
+        return code;
+    }
+    
+    /**
+     * Devuelve data
+     * @return
+     */
+    public Object getData() {
+        return data;
+    }
+    
+    /**
+     * Lee un dato individual dentro de un DxfGroup
+     * @param fi, BufferedReader
+     * @throws IOException
+     */
+    private void readData(BufferedReader fi) throws IOException {
+        String txt = fi.readLine().trim();
+
+        if ((0 <= code) && (code <= 9)) {
+            data = txt; //_dfun = string_data
+        } else if ((10 <= code) && (code <= 59)) {
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data
+        } else if ((60 <= code) && (code <= 79)) {
+            try {
+                data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 16-bit int
+            } catch (java.lang.NumberFormatException e) {
+                data = new Integer((int) Double.parseDouble(txt));
+            }
+        } else if ((90 <= code) && (code <= 99)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 32-bit int
+        } else if (code == 100) {
+            data = txt; //_dfun = unicode_data
+        } else if (code == 102) {
+            // Fran: Comentado para ganar velocidad.
+            //System.err. ("Dxf: codigo " + code + " no implementado."); //_dfun = unicode_data
+        } else if (code == 105) {
+            data = txt;
+            ; //_dfun = handle_data
+        } else if ((110 <= code) && (code <= 139)) {
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data // not in dxf spec
+        } else if ((140 <= code) && (code <= 149)) { // says 147 in dxf spec
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data
+        } else if ((170 <= code) && (code <= 179)) { // says 175 in dxf spec
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 16-bit int
+        } else if ((210 <= code) && (code <= 239)) {
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data // del TEXT procendente de exportacion de microstation 
+        } else if ((270 <= code) && (code <= 279)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // not in dxf spec
+        } else if ((280 <= code) && (code <= 289)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 8-bit int
+        } else if ((290 <= code) && (code <= 299)) {
+            data = new Boolean(Boolean.getBoolean(txt)); //_dfun = bool_data
+        } else if ((300 <= code) && (code <= 309)) {
+            data = txt; //_dfun = string_data
+        } else if ((310 <= code) && (code <= 319)) {
+            //_dfun = bin_data
+            //throw new IOException("Dxf: codigo "+code+" no implementado.");
+        } else if ((320 <= code) && (code <= 329)) {
+            //_dfun = handle_data
+            //throw new IOException("Dxf: codigo "+code+" no implementado.");
+        } else if ((330 <= code) && (code <= 369)) {
+            // Fran: Comentado para ganar velocidad.
+            //System.err.   ("Dxf: codigo " + code + " no implementado."); //_dfun = hex_data
+        } else if ((370 <= code) && (code <= 379)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 8-bit int
+        } else if ((380 <= code) && (code <= 389)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 8-bit int
+        } else if ((390 <= code) && (code <= 399)) {
+            data = txt; //_dfun = handle_data
+        } else if ((400 <= code) && (code <= 409)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 16-bit int
+        } else if ((410 <= code) && (code <= 419)) {
+            data = txt; //_dfun = string_data
+        } else if (code == 999) {
+            data = txt; //_dfun = string_data // comment
+        } else if ((1000 <= code) && (code <= 1009)) {
+            data = txt; //_dfun = string_data
+        } else if ((1010 <= code) && (code <= 1059)) {
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data
+        } else if ((1060 <= code) && (code <= 1070)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 16-bit int
+        } else if (code == 1071) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data # 32-bit int
+        } else {
+            throw new IOException("DxfReader: c�digo " + code +
+                                  " desconocido.");
+
+            //raise ValueError, "Unexpected code: %d" % code
+        }
+
+        //return _dfun
+    }
+    
+    /**
+     * Permite comparar dos objetos de la clase DxfGroup
+     * @param c, code
+     * @param s, data
+     * @return boolean
+     */
+    public boolean equals(int c, String s) {
+        if ((c == code) && (s.compareTo((String) data) == 0)) {
+            return true;
+        }
+
+        return false;
+    }
+    
+    /**
+     * Devuelve un dato concreto en forma de String tabulado
+     * @param code
+     * @return String
+     */
+    public static String int34car(int code) {
+        if (code < 10) {
+            return "  " + Integer.toString(code);
+        } else if (code < 100) {
+            return " " + Integer.toString(code);
+        } else {
+            return Integer.toString(code);
+        }
+    }
+    
+    /**
+     * Devuelve un dato concreto en forma de String tabulado
+     * @param value
+     * @return String
+     */
+    public static String int6car(int value) {
+        String s = "     " + Integer.toString(value);
+
+        return s.substring(s.length() - 6, s.length());
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @return String
+     */
+    public static String toString(int code, String value) {
+        return int34car(code) + "\r\n" + value + "\r\n";
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @return String
+     */
+    public static String toString(int code, int value) {
+        return int34car(code) + "\r\n" + int6car(value) + "\r\n";
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @param decimalPartLength
+     * @return String
+     */
+    public static String toString(int code, float value, int decimalPartLength) {
+        return int34car(code) + "\r\n" +
+               decimalFormats[decimalPartLength].format((double) value) +
+               "\r\n";
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @param decimalPartLength
+     * @return String
+     */
+    public static String toString(int code, double value, int decimalPartLength) {
+        return int34car(code) + "\r\n" +
+               decimalFormats[decimalPartLength].format(value) + "\r\n";
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @return String
+     */
+    public static String toString(int code, Object value) {
+        if (value instanceof String) {
+            return toString(code, (String) value);
+        } else if (value instanceof Integer) {
+            return toString(code, ((Integer) value).intValue());
+        } else if (value instanceof Double) {
+            return toString(code, ((Double) value).floatValue(), 3);
+        } else if (value instanceof Double) {
+            return toString(code, ((Double) value).doubleValue(), 6);
+        } else {
+            return toString(code, value.toString());
+        }
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     */
+    public String toString() {
+        return toString(code, data);
+    }
+
+    /**
+     * jmorell: Permite rellenar los datos. �til en la escritura de DXFs.
+     * @param data The data to set.
+     */
+    public void setData(Object data) {
+        this.data = data;
+    }
+
+    /**
+     * jmorell: Permite rellenar los c�digos. �til en la escritura de DXFs.
+     * @param code The code to set.
+     */
+    public void setCode(int code) {
+        this.code = code;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/ZipFileFolder.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/ZipFileFolder.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/ZipFileFolder.java	(revision 1291)
@@ -0,0 +1,109 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.io;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>* @author administrador
+ */
+public class ZipFileFolder extends FileFolder {
+    String zName = null;
+    public ZipFile file = null;
+
+    public ZipFileFolder() {
+        super();
+    }
+
+    /**
+     * Constructor.
+     *
+     * @param fname
+     */
+    public ZipFileFolder(String fName) throws IOException {
+        fName = DataSource.normalize(fName);
+
+        if (isUrl(fName)) {
+            zName = getZName(fName);
+        } else {
+            zName = fName;
+        }
+
+        file = new ZipFile(zName);
+    }
+
+    /**
+     * Analiza un nombre de fichero en formato zip://zipname.zip?file.ext
+     * @param urlName
+     */
+    public static boolean isUrl(String name) {
+        String str = name.substring(0, 3);
+        str.toLowerCase();
+
+        if (str.compareTo("zip") == 0) {
+            return true;
+        }
+
+        return false;
+    }
+
+    private String getZName(String urlName) {
+        return urlName.substring(6, urlName.indexOf("?"));
+    }
+
+    private String getFName(String urlName) {
+        return urlName.substring(urlName.indexOf("?") + 1);
+    }
+
+    public ZipEntry getZipEntry(String fName) throws IOException {
+        InputStream is = null;
+
+        if (isUrl(fName)) {
+            fName = getFName(fName);
+        }
+
+        return file.getEntry(fName);
+    }
+
+    public InputStream getInputStream(String fName) throws IOException {
+        return file.getInputStream(getZipEntry(fName));
+    }
+
+    public InputStream getInputStream(ZipEntry ze) throws IOException {
+        return file.getInputStream(ze);
+    }
+
+    public int count() {
+        return file.size();
+    }
+
+    public Enumeration entries() {
+        return file.entries();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfFile.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfFile.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfFile.java	(revision 1291)
@@ -0,0 +1,1813 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.io;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.util.Date;
+import java.util.Hashtable;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.px.IObjList;
+import org.gvsig.dxf.px.dxf.DxfEntityMaker;
+import org.gvsig.dxf.px.dxf.DxfHeaderManager;
+import org.gvsig.dxf.px.dxf.DxfHeaderVariables;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Clase que representa un fichero en formato DXF. Contiene los interfaces y
+ * m�todos necesarios para acceder a la informaci�n almacenada en su
+ * interior.
+ *
+ * @author jmorell
+ */
+public class DxfFile extends GeoFile {
+
+    public static Logger logger = LoggerFactory.getLogger(DxfFile.class);
+
+    private boolean cadFlag = true;
+
+    long lineNr = 0;
+
+    String buf = null;
+
+    BufferedReader fi;
+    long l = 0;
+    int count = 0;
+    DxfGroup grp = null;
+
+    EntityFactory entityMaker = null;
+    VarSettings headerManager;
+    private boolean dxf3DFlag;
+
+    /**
+     * Crea los objetos en el Modelo correspondiente.
+     *
+     * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+     */
+    public interface EntityFactory extends Projected {
+
+        /**
+         * Permite saber si se est�n a�adiendo elementos a un bloque
+         *
+         * @param booleano que indica si se est�n a�adiendo elementos a un
+         * bloque
+         */
+        public void setAddingToBlock(boolean a);
+
+        /**
+         * Crea una nueva capa partiendo de la informaci�n almacenada en el
+         * DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n de la
+         * nueva capa
+         * @throws Exception
+         */
+        public void createLayer(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea una nueva polil�nea partiendo de la informaci�n almacenada
+         * en el DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n de la
+         * nueva polil�nea
+         * @throws Exception
+         */
+        public void createPolyline(DxfGroupVector v) throws Exception;
+
+        /**
+         * A�ade un v�rtice a la polil�nea que se est� creando
+         *
+         * @param DxfGroupVector con la informaci�n necesaria para la
+         * adici�n del v�rtice
+         * @throws Exception
+         */
+        public void addVertex(DxfGroupVector v) throws Exception;
+
+        /**
+         * Fin de secuencia
+         *
+         * @throws Exception
+         */
+        public void endSeq() throws Exception;
+
+        /**
+         * Crea una nueva LwPolyline partiendo de la informaci�n almacenada en
+         * el DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n de la
+         * nueva polil�nea
+         * @throws Exception
+         */
+        public void createLwPolyline(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea una nueva l�nea partiendo de la informaci�n almacenada en el
+         * DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n de la
+         * nueva l�nea
+         * @throws Exception
+         */
+        public void createLine(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo texto partiendo de la informaci�n almacenada en el
+         * DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n del
+         * nuevo texto
+         * @throws Exception
+         */
+        public void createText(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo MText partiendo de la informaci�n almacenada en el
+         * DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n del
+         * nuevo MText
+         * @throws Exception
+         */
+        public void createMText(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo punto partiendo de la informaci�n almacenada en el
+         * DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n del
+         * nuevo punto
+         * @throws Exception
+         */
+        public void createPoint(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo c�rculo partiendo de la informaci�n almacenada en
+         * el DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n del
+         * nuevo c�rculo
+         * @throws Exception
+         */
+        public void createCircle(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea una nueva elipse partiendo de la informaci�n almacenada en el
+         * DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n de la
+         * nueva elipse
+         * @throws Exception
+         */
+        public void createEllipse(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo arco partiendo de la informaci�n almacenada en el DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n del
+         * nuevo arco
+         * @throws Exception
+         */
+        public void createArc(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo punto de inserci�n partiendo de la informaci�n
+         * almacenada en el DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n del
+         * nuevo punto de inserci�n
+         * @throws Exception
+         */
+        public void createInsert(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo s�lido 2D partiendo de la informaci�n almacenada en
+         * el DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n del
+         * nuevo s�lido
+         * @throws Exception
+         */
+        public void createSolid(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo Spline partiendo de la informaci�n almacenada en el
+         * DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n del
+         * nuevo Spline
+         * @throws Exception
+         */
+        public void createSpline(DxfGroupVector v) throws Exception;
+
+        /**
+         * Construye la definici�n de un nuevo atributo partiendo de la
+         * informaci�n almacenada en el DXF
+         *
+         * @param DxfGroupVector con informaci�n para la construcci�n de la
+         * definici�n del nuevo atributo
+         * @throws Exception
+         */
+        public void createAttdef(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un nuevo atributo partiendo de la informaci�n almacenada en el
+         * DXF
+         *
+         * @param DxfGroupVector con informaci�n para la creaci�n del nuevo
+         * atributo
+         * @throws Exception
+         */
+        public void createAttrib(DxfGroupVector v) throws Exception;
+
+        /**
+         * Crea un bloque
+         *
+         * @param DxfGroupVector con informaci�n para la creaci�n del nuevo
+         * elemento
+         * @throws Exception
+         */
+        public void createBlock(DxfGroupVector v) throws Exception;
+
+        /**
+         * Fin de la definici�n de un bloqe
+         *
+         * @param DxfGroupVector con informaci�n referente al final de un
+         * bloque
+         * @throws Exception
+         */
+        public void endBlk(DxfGroupVector v) throws Exception;
+
+        /**
+         * Gestiona los bloques que no se han tratado en la primera vuelta
+         */
+        void testBlocks();
+
+        /**
+         * Devuelve el extent
+         *
+         * @return el extent
+         */
+        public Extent getExtent();
+
+        /**
+         * Devuelve la lista de bloques
+         *
+         * @return la lista de bloques
+         */
+        public Vector getBlkList();
+
+        /**
+         * Permite la gesti�n de los atributos almacenados en unn DXF
+         *
+         * @return un Vector con la lista de atributos
+         */
+        public Vector getAttributes();
+
+        /**
+         * Borra los atributos repetidos
+         */
+        public void depureAttributes();
+
+        /**
+         * Devuelve los objetos almacenados en el DXF
+         *
+         * @return IObjList con los objetos procedentes del DXF
+         */
+        public IObjList getObjects();
+
+        /**
+         * Permite saber si se trata de un fichero DXF en 2D o en 3D
+         *
+         * @return booleano que indica si se trata de un fichero DXF 3D
+         */
+        public boolean isDxf3DFile();
+    };
+
+    /**
+     * Establece el estado de las variables propias de un DXF que est�n
+     * definidas en la secci�n HEADER. Por ejemplo, la versi�n del DXF.
+     *
+     * @author jmorell (jose.morell@gmail.com)
+     * @version 15-dic-2004
+     */
+    public interface VarSettings {
+
+        /**
+         * Establece la versi�n de Autocad en la que fue generado el DXF.
+         *
+         * @param informaci�n de base
+         * @throws Exception
+         */
+        public void setAcadVersion(DxfGroupVector v) throws Exception;
+
+        /**
+         * Devuelve la versi�n de Autocad en la que fue generado el DXF.
+         *
+         * @return
+         */
+        public String getAcadVersion();
+
+        /**
+         * Devuelve el estado de las variables propias de un DXF
+         *
+         * @return
+         */
+        public DxfHeaderVariables getDxfHeaderVars();
+
+        public boolean isWritedDxf3D();
+
+        public void loadMinZFromHeader(double d);
+
+        public void loadMaxZFromHeader(double d);
+    };
+
+    /**
+     * Constructor de la clase
+     *
+     * @param proj, la proyecci�n cartogr�fica
+     * @param name, el path absoluto hasta el fichero DXF
+     * @param maker, el interface que permite la construcci�n de las entidades
+     * procedentes del DXF
+     */
+    public DxfFile(IProjection proj, String name, EntityFactory maker) {
+        super(proj, name);
+        entityMaker = maker;
+        headerManager = new DxfHeaderManager();
+    }
+
+    /**
+     * Constructor de la clase que adem�s incorpora la capacidad de leer una
+     * porci�n del HEADER
+     *
+     * @param proj, la proyecci�n cartogr�fica
+     * @param name, el path absoluto hasta el fichero DXF
+     * @param maker, el interface que permite la construcci�n de las entidades
+     * procedentes del DXF
+     * @param dxfVars, el interface que permite la lectura del HEADER de un DXF
+     */
+    public DxfFile(IProjection proj, String name, EntityFactory maker, VarSettings dxfVars) {
+        super(proj, name);
+        entityMaker = maker;
+        headerManager = dxfVars;
+    }
+
+    /**
+     * Carga un fichero en formato DXF
+     *
+     * @throws Exception
+     */
+    public GeoFile load() throws Exception {
+        logger.debug("Dxf: Cargando " + name + " ...");
+        if (ZipFileFolder.isUrl(name)) {
+            ZipFileFolder zFolder = new ZipFileFolder(name);
+            InputStream is = zFolder.getInputStream(name);
+            return load(new InputStreamReader(is));
+        } else {
+            return load(new FileReader(name));
+        }
+
+    }
+
+    /**
+     * Carga un fichero en formato DXF tomando un Reader como par�metro
+     *
+     * @param fr, Reader que se le pasa como par�metro
+     * @return devuelve un objeto GeoFile, padre de DxfFile
+     * @throws Exception
+     * @throws Exception
+     */
+    public GeoFile load(Reader fr) throws Exception {
+        logger.debug("Dxf: Cargando '" + name + "' ...");
+        fi = new BufferedReader(fr);
+        while ((grp = readGrp()) != null) {
+            l += 2;
+
+            if (grp.equals(0, "EOF")) {
+                break;
+            }
+            if (grp.equals(0, "SECTION")) {
+                readSection();
+            }
+        }
+        fi.close();
+        extent.add(entityMaker.getExtent());
+        logger.debug("Dxf: '" + name + "' cargado. (" + l + " l�neas).");
+        this.lineNr = l;
+        return this;
+    }
+
+    /**
+     * El fichero DXF se divide en grupos. Este m�todo permite leer cada grupo
+     * individualmente
+     *
+     * @return devuelve la informaci�n del DXF en forma de objetos de la clase
+     * DxfGroup
+     * @throws NumberFormatException
+     * @throws IOException
+     */
+    private DxfGroup readGrp() throws NumberFormatException, IOException {
+        DxfGroup g = DxfGroup.read(fi);
+        if (g != null) {
+            l += 2;
+        }
+        /*if (g.code == 8)
+         if (((String) g.data).length() < 1) {
+         logger.error("a que un layer no puede ser ''?");
+         System.exit(1);
+         }*/
+        return g;
+    }
+
+    /**
+     * El fichero DXF se divide en varias secciones. Este m�todo se encarga de
+     * leer cada una de ellas
+     *
+     * @throws NumberFormatException
+     * @throws Exception
+     */
+    private void readSection() throws NumberFormatException, Exception {
+        while (true) {
+            grp = readGrp();
+            logger.debug("-1:" + grp);
+            if (grp.code == 2) {
+                if (((String) grp.data).compareTo("HEADER") == 0) {
+                    readHeader();
+                } else if (((String) grp.data).compareTo("CLASSES") == 0) {
+                    readAnySection();
+                } else if (((String) grp.data).compareTo("TABLES") == 0) {
+                    readTables();
+                } else if (((String) grp.data).compareTo("BLOCKS") == 0) {
+                    readBlocks();
+                } else if (((String) grp.data).compareTo("ENTITIES") == 0) {
+                    readEntities();
+                } else if (((String) grp.data).compareTo("OBJECTS") == 0) {
+                    readAnySection();
+                } else {
+                    logger.debug("DxfRead: Seccion " + grp.data);
+                    readAnySection();
+                }
+            } else {
+                logger.debug("Dxf: Codigo/Seccion desconocidos" + grp);
+            }
+            if (grp.equals(0, "EOF")) {
+                break;
+            }
+            if (grp.equals(0, "ENDSEC")) {
+                break;
+            }
+        }
+    }
+
+    /**
+     * Habilita la lectura de la secci�n de TABLES
+     *
+     * @throws NumberFormatException
+     * @throws Exception
+     */
+    private void readTables() throws NumberFormatException, Exception {
+        logger.debug("Dxf: Seccion TABLAS, linea " + l + "grp =" + grp);
+        int layerCnt = 0;
+        String tableAct = "NONAME";
+
+        Hashtable tables = new Hashtable();
+        Vector table = new Vector();
+        DxfGroupVector v = new DxfGroupVector();
+
+        grp = readGrp();
+        // logger.debug("0:"+grp);
+        while (true) {
+            if (grp.code == 0) {
+                String data = (String) grp.getData();
+                if (data.compareTo("ENDSEC") == 0 || data.compareTo("EOF") == 0) {
+                    break;
+                } else if (data.compareTo("ENDTAB") == 0) {
+                    tables.put(tableAct, table);
+                    table = new Vector();
+                    grp = readGrp();
+					// logger.debug("1:"+grp);
+
+                    /**/                    if (tableAct.compareTo("LAYER") == 0 && v.size() > 0) {
+                        entityMaker.createLayer(v);
+                        logger.debug("Dxf: Layer " + v.getDataAsString(2));
+                        layerCnt++;
+                        v.clear();
+                    }/**/
+
+                    continue;
+                } else {
+                    if (table.size() == 1) {
+                        tableAct = v.getDataAsString(2);
+                        logger.debug("Dxf: Tabla " + tableAct);
+                    } else if (tableAct.compareTo("LAYER") == 0 && v.size() > 0) {
+                        entityMaker.createLayer(v);
+                        logger.debug("Dxf: Layer " + v.getDataAsString(2));
+                        layerCnt++;
+                    }
+
+                    v.clear();
+                    v.add(grp);
+                }
+                while (true) {
+                    grp = readGrp();
+                    // logger.debug("2:"+grp);
+                    if (grp.code == 0) {
+                        break;
+                    }
+                    v.add(grp);
+                }
+                table.add(v);
+            } else {
+                logger.debug("Dxf: Error de secuencia");
+                grp = readGrp();
+                //logger.debug("3:"+grp);
+            }
+        }
+        logger.debug("Dxf: Seccion TABLAS: " + layerCnt + " Capas. ");
+    }
+
+    /**
+     * M�todo de lectura de secci�n por defecto. Se utiliza mientras se
+     * realiza la implementaci�n correspondiente
+     *
+     * @throws NumberFormatException
+     * @throws IOException
+     */
+    private void readAnySection() throws NumberFormatException, IOException {
+        logger.debug("Dxf: Seccion '" + ((String) grp.getData()) + "', linea " + l);
+        while (true) {
+            grp = readGrp();
+            if (grp.equals(0, "ENDSEC")) {
+                break;
+            } else if (grp.equals(0, "EOF")) {
+                break;
+            }
+        }
+    }
+
+    /**
+     * Primera aproximaci�n a la implementaci�n de la lectura del HEADER. En
+     * principio interesa que se lea la versi�n del DXF. Para implementar esta
+     * parte del lector se ha optado por incluir el m�todo setAcadVersion en
+     * el interface EntityFactory. A lo mejor conviene implementar un nuevo
+     * interface VarSettings.
+     *
+     * @throws NumberFormatException
+     * @throws Exception
+     */
+    private void readHeader() throws NumberFormatException, Exception {
+        logger.debug("Dxf: Seccion HEADER, linea " + l);
+        int variableCnt = 0;
+        int cntVeces = 0;
+        DxfGroupVector v = new DxfGroupVector();
+        grp = readGrp();
+        while (true) {
+            if (grp.equals(0, "EOF")) {
+                break;
+            } else if (grp.code == 9 || grp.code == 0) {
+                if (v.size() > 0) {
+                    String lastVariable = (String) ((DxfGroup) v.get(0)).data;
+                    //logger.debug(lastVariable);
+                    if (lastVariable.compareTo("$ACADVER") == 0) {
+                        //logger.debug("Aqui llega.");
+                        headerManager.setAcadVersion(v);
+                    } else if (lastVariable.compareTo("$EXTMIN") == 0) {
+                        if (v.hasCode(30)) {
+                            headerManager.loadMinZFromHeader((Double)v.getData(30));
+                        }
+                    } else if (lastVariable.compareTo("$EXTMAX") == 0) {
+                        if (v.hasCode(30)) {
+                            headerManager.loadMaxZFromHeader((Double)v.getData(30));
+                        }
+                    } else if (lastVariable.compareTo("ENDSEC") == 0) {
+                        //logger.debug("Llega al ENDSEC.");
+                        break;
+                    } /*else
+                     logger.debug("Dxf: Variable "+lastVariable+" desconocida.");*/
+
+                }
+                v.clear();
+                v.add(grp);
+                while (true) {
+                    grp = readGrp();
+                    if (grp.code == 9 || grp.code == 0) {
+                        break;
+                    }
+                    v.add(grp);
+                }
+                variableCnt++;
+            }
+            cntVeces++;
+        }
+        logger.debug("Dxf: Seccion HEADER, " + variableCnt + " variables, " + cntVeces + " veces.");
+        //logger.debug("Seccion HEADER, linea "+ l+ " (SALGO)");
+        logger.debug("readHeader: ACAD Version: " + headerManager.getDxfHeaderVars().getAcadVersion());
+    }
+
+    /**
+     * Permite leer la secci�n ENTITIES del DXF, donde se encuentran las
+     * entidades geom�tricas del DXF que no aparecen dentro de ning�n bloque
+     *
+     * @throws NumberFormatException
+     * @throws Exception
+     */
+    private void readEntities() throws NumberFormatException, Exception {
+        logger.debug("Dxf: Seccion ENTITIES, linea " + l);
+        int entityCnt = 0;
+        int cntVeces = 0;
+        DxfGroupVector v = new DxfGroupVector();
+        grp = readGrp();
+        while (true) {
+            if (grp.equals(0, "EOF")) {
+                break;
+            } else if (grp.code == 0) {
+                if (v.size() > 0) {
+                    String lastEntity = (String) ((DxfGroup) v.get(0)).data;
+                    if (lastEntity.compareTo("POLYLINE") == 0) {
+                        entityMaker.createPolyline(v);
+                    } else if (lastEntity.compareTo("VERTEX") == 0) {
+                        entityMaker.addVertex(v);
+                    } else if (lastEntity.compareTo("SEQEND") == 0) {
+                        entityMaker.endSeq();
+                    } else if (lastEntity.compareTo("LWPOLYLINE") == 0) {
+                        entityMaker.createLwPolyline(v);
+                    } else if (lastEntity.compareTo("LINE") == 0) {
+                        entityMaker.createLine(v);
+                    } else if (lastEntity.compareTo("TEXT") == 0) {
+                        entityMaker.createText(v);
+                    } else if (lastEntity.compareTo("MTEXT") == 0) {
+                        entityMaker.createMText(v);
+                    } else if (lastEntity.compareTo("POINT") == 0) {
+                        entityMaker.createPoint(v);
+                    } else if (lastEntity.compareTo("CIRCLE") == 0) {
+                        entityMaker.createCircle(v);
+                    } else if (lastEntity.compareTo("ELLIPSE") == 0) {
+                        entityMaker.createEllipse(v);
+                    } else if (lastEntity.compareTo("ARC") == 0) {
+                        entityMaker.createArc(v);
+                    } else if (lastEntity.compareTo("INSERT") == 0) {
+                        entityMaker.createInsert(v);
+                    } else if (lastEntity.compareTo("SOLID") == 0) {
+                        entityMaker.createSolid(v);
+                    } else if (lastEntity.compareTo("SPLINE") == 0) {
+                        entityMaker.createSpline(v);
+                    } else if (lastEntity.compareTo("ATTRIB") == 0) {
+                        entityMaker.createAttrib(v);
+                    } else if (lastEntity.compareTo("ENDSEC") == 0) {
+                        break;
+                    } else {
+                        logger.debug("Dxf: Entidad " + lastEntity + " desconocida.");
+                    }
+                }
+                v.clear();
+                v.add(grp);
+                while (true) {
+                    grp = readGrp();
+                    if (grp.code == 0) {
+                        break;
+                    }
+                    v.add(grp);
+                }
+                entityCnt++;
+            }
+            cntVeces++;
+        }
+        logger.debug("Dxf: Seccion ENTITIES, " + entityCnt + " entidades, " + cntVeces + " veces.");
+        //logger.debug("Seccion ENTITIES, linea "+ l+ " (SALGO)");
+    }
+
+    /**
+     * Permite la secci�n BLOCKS del DXF, donde se encuentran las definiciones
+     * de los bloques que componen el DXF
+     *
+     * @throws NumberFormatException
+     * @throws Exception
+     */
+    private void readBlocks() throws NumberFormatException, Exception {
+        logger.debug("Dxf: Seccion BLOCKS, linea " + l);
+        int blkCnt = 0;
+        int cntVeces = 0;
+        DxfGroupVector v = new DxfGroupVector();
+        grp = readGrp();
+        while (true) {
+            if (grp.equals(0, "EOF")) {
+                break;
+            } else if (grp.code == 0) {
+                if (v.size() > 0) {
+                    String lastEntity = (String) ((DxfGroup) v.get(0)).data;
+                    if (lastEntity.compareTo("BLOCK") == 0) {
+                        //logger.debug("readBlocks(): Empezamos a leer un bloque");
+                        entityMaker.createBlock(v);
+                    } else if (lastEntity.compareTo("POLYLINE") == 0) {
+                        //logger.debug("readBlocks(): A�adimos una polilinea al bloque");
+                        entityMaker.createPolyline(v);
+                    } else if (lastEntity.compareTo("VERTEX") == 0) {
+                        //logger.debug("readBlocks(): A�adimos un vertice a la polilinea");
+                        entityMaker.addVertex(v);
+                    } else if (lastEntity.compareTo("SEQEND") == 0) {
+                        //logger.debug("readBlocks(): Cerramos una polilinea");
+                        entityMaker.endSeq();
+                    } else if (lastEntity.compareTo("LWPOLYLINE") == 0) {
+                        //logger.debug("readBlocks(): A�adimos una lwpolilinea al bloque");
+                        entityMaker.createLwPolyline(v);
+                    } else if (lastEntity.compareTo("LINE") == 0) {
+                        //logger.debug("readBlocks(): A�adimos una linea al bloque");
+                        entityMaker.createLine(v);
+                    } else if (lastEntity.compareTo("TEXT") == 0) {
+                        //logger.debug("readBlocks(): A�adimos un texto al bloque");
+                        entityMaker.createText(v);
+                    } else if (lastEntity.compareTo("MTEXT") == 0) {
+                        //logger.debug("readBlocks(): A�adimos un m-texto al bloque");
+                        entityMaker.createMText(v);
+                    } else if (lastEntity.compareTo("POINT") == 0) {
+                        //logger.debug("readBlocks(): A�adimos un punto al bloque");
+                        entityMaker.createPoint(v);
+                    } else if (lastEntity.compareTo("CIRCLE") == 0) {
+                        //logger.debug("readBlocks(): A�adimos un circulo al bloque");
+                        entityMaker.createCircle(v);
+                    } else if (lastEntity.compareTo("ARC") == 0) {
+                        //logger.debug("readBlocks(): A�adimos un arco al bloque");
+                        entityMaker.createArc(v);
+                    } else if (lastEntity.compareTo("INSERT") == 0) {
+                        //logger.debug("readBlocks(): A�adimos un insert al bloque");
+                        entityMaker.createInsert(v);
+                    } else if (lastEntity.compareTo("SOLID") == 0) {
+                        //logger.debug("readBlocks(): A�adimos un solido al bloque");
+                        entityMaker.createSolid(v);
+                    } else if (lastEntity.compareTo("SPLINE") == 0) {
+                        entityMaker.createSpline(v);
+                    } else if (lastEntity.compareTo("ATTDEF") == 0) {
+                        entityMaker.createAttdef(v);
+                    } else if (lastEntity.compareTo("ENDBLK") == 0) {
+                        //logger.debug("readBlocks(): Cerramos un bloque"+v);
+                        entityMaker.endBlk(v);
+                    } else if (lastEntity.compareTo("ENDSEC") == 0) {
+                        break;
+                    } else {
+                        logger.debug("Dxf: Entidad de bloque " + lastEntity + " desconocida.");
+                    }
+                }
+                v.clear();
+                v.add(grp);
+                while (true) {
+                    grp = readGrp();
+                    if (grp.code == 0) {
+                        break;
+                    }
+                    v.add(grp);
+                }
+                blkCnt++;
+            }
+            cntVeces++;
+        }
+
+        entityMaker.testBlocks();
+		// Cuando termina de leer la secci�n de bloques se asegura de que todos los campos
+        // son distintos.
+        //logger.debug("readBlocks(): entityMaker.getAttributes().size() = " + entityMaker.getAttributes().size());
+        entityMaker.depureAttributes();
+        //logger.debug("readBlocks(): entityMaker.getAttributes().size() = " + entityMaker.getAttributes().size());
+        logger.debug("Dxf: Seccion BLOCKS, " + blkCnt + " elementos de bloque. " + cntVeces + " veces.");
+    }
+
+    /**
+     * Devuelve los objetos geom�tricos obtenidos de un DXF
+     */
+    public IObjList getObjects() {
+        return this.entityMaker.getObjects();
+    }
+
+    /**
+     * jmorell: M�todo que permite salvar capas al formato DXF2000. Este
+     * m�todo ha sido actualizado en el proceso de implementaci�n del piloto
+     * de CAD. En este piloto deb�a existir soporte para elipses, y este es
+     * uno de los motivos que nos llevan a implementar ahora para DXF2000,
+     * puesto que el DXF R12 no soporta elipses.
+     *
+     * @param fName
+     * @throws IOException
+     */
+    public void save(String fName) throws IOException {
+        logger.debug("save: fName = " + fName);
+        long t2, t1;
+        t1 = getTime();
+        fName = DataSource.normalize(fName);
+        FileWriter fw = new FileWriter(fName);
+        // COMMENTAIRES DU TRADUCTEUR
+//		fw.write(DxfGroup.toString(999, Integer.toString(features.size()) + " features"));
+        fw.write(DxfGroup.toString(999, "TRANSLATION BY geo.cresques.io.DxfFile"));
+        fw.write(DxfGroup.toString(999, "DATE : " + (new Date()).toString()));
+        writeHeader(fw);
+        writeTables(fw);
+        writeBlocks(fw);
+        writeEntities(fw);
+        writeObjects(fw);
+        fw.write(DxfGroup.toString(0, "EOF"));
+        fw.flush();
+        fw.close();
+        t2 = getTime();
+        logger.debug("DxfFile.save(): Tiempo salvando: " + (t2 - t1) / 1000 + " seg.");
+    }
+
+    /**
+     * Escritor de la cabecera de un DXF. jmorell: Actualizaci�n del escritor
+     * de DXF de R12 a 2000.
+     *
+     * @param fw, un FileWriter para escribir ficheros
+     * @throws IOException
+     */
+    public void writeHeader(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "SECTION"));
+        fw.write(DxfGroup.toString(2, "HEADER"));
+        fw.write(DxfGroup.toString(9, "$ACADVER"));
+        //fw.write(DxfGroup.toString(1, "AC1009"));			// DXF R12
+        fw.write(DxfGroup.toString(1, "AC1015"));			// DXF 2000
+        fw.write(DxfGroup.toString(9, "$INSBASE"));
+        fw.write(DxfGroup.toString(10, 0.0, 1));
+        fw.write(DxfGroup.toString(20, 0.0, 1));
+        fw.write(DxfGroup.toString(30, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$EXTMIN"));
+        fw.write(DxfGroup.toString(10, extent.minX(), 6));
+        fw.write(DxfGroup.toString(20, extent.minY(), 6));
+        if (dxf3DFlag) {
+            fw.write(DxfGroup.toString(30, extent.minX(), 6));
+        } else {
+            fw.write(DxfGroup.toString(30, 0.0, 6));
+        }
+        fw.write(DxfGroup.toString(9, "$EXTMAX"));
+        fw.write(DxfGroup.toString(10, extent.maxX(), 6));
+        fw.write(DxfGroup.toString(20, extent.maxY(), 6));
+        if (dxf3DFlag) {
+            fw.write(DxfGroup.toString(30, extent.maxX(), 6));
+        } else {
+            fw.write(DxfGroup.toString(30, 0.0, 6));
+        }
+        fw.write(DxfGroup.toString(9, "$LIMMIN"));
+        fw.write(DxfGroup.toString(10, extent.minX(), 6));
+        fw.write(DxfGroup.toString(20, extent.minY(), 6));
+        fw.write(DxfGroup.toString(9, "$LIMMAX"));
+        fw.write(DxfGroup.toString(10, extent.maxX(), 6));
+        fw.write(DxfGroup.toString(20, extent.maxY(), 6));
+        fw.write(DxfGroup.toString(9, "$ORTHOMODE") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$REGENMODE") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$FILLMODE") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$QTEXTMODE") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$MIRRTEXT") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$DRAGMODE") + DxfGroup.toString(70, 2));
+        fw.write(DxfGroup.toString(9, "$LTSCALE") + DxfGroup.toString(40, 1.0, 1));
+        fw.write(DxfGroup.toString(9, "$OSMODE") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$ATTMODE") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$TEXTSIZE") + DxfGroup.toString(40, 0.2, 1));
+        fw.write(DxfGroup.toString(9, "$TRACEWID") + DxfGroup.toString(40, 0.05, 2));
+        fw.write(DxfGroup.toString(9, "$TEXTSTYLE") + DxfGroup.toString(7, "STANDARD"));
+        fw.write(DxfGroup.toString(9, "$CLAYER") + DxfGroup.toString(8, "0"));
+        fw.write(DxfGroup.toString(9, "$CELTYPE") + DxfGroup.toString(6, "CONTINUOUS"));
+        fw.write(DxfGroup.toString(9, "$CECOLOR") + DxfGroup.toString(62, 256));
+        fw.write(DxfGroup.toString(9, "$DIMSCALE") + DxfGroup.toString(40, 1.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMASZ") + DxfGroup.toString(40, 0.18, 2));
+        fw.write(DxfGroup.toString(9, "$DIMEXO") + DxfGroup.toString(40, 0.0625, 4));
+        fw.write(DxfGroup.toString(9, "$DIMDLI") + DxfGroup.toString(40, 0.38, 2));
+        fw.write(DxfGroup.toString(9, "$DIMRND") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMDLE") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMEXE") + DxfGroup.toString(40, 0.18, 2));
+        fw.write(DxfGroup.toString(9, "$DIMTP") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMTM") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMTXT") + DxfGroup.toString(40, 0.18, 2));
+        fw.write(DxfGroup.toString(9, "$DIMCEN") + DxfGroup.toString(40, 0.09, 2));
+        fw.write(DxfGroup.toString(9, "$DIMTSZ") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMTOL") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMLIM") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMTIH") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$DIMTOH") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$DIMSE1") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMSE2") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMTAD") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMZIN") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMBLK") + DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(9, "$DIMASO") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$DIMSHO") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$DIMPOST") + DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(9, "$DIMAPOST") + DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(9, "$DIMALT") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMALTD") + DxfGroup.toString(70, 2));
+        fw.write(DxfGroup.toString(9, "$DIMALTF") + DxfGroup.toString(40, 25.4, 1));
+        fw.write(DxfGroup.toString(9, "$DIMLFAC") + DxfGroup.toString(40, 1.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMTOFL") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMTVP") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMTIX") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMSOXD") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMSAH") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMBLK1") + DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(9, "$DIMBLK2") + DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(9, "$DIMSTYLE") + DxfGroup.toString(2, "STANDARD"));
+        fw.write(DxfGroup.toString(9, "$DIMCLRD") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMCLRE") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMCLRT") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$DIMTFAC") + DxfGroup.toString(40, 1.0, 1));
+        fw.write(DxfGroup.toString(9, "$DIMGAP") + DxfGroup.toString(40, 0.09, 2));
+        fw.write(DxfGroup.toString(9, "$LUNITS") + DxfGroup.toString(70, 2));
+        fw.write(DxfGroup.toString(9, "$LUPREC") + DxfGroup.toString(70, 4));
+        fw.write(DxfGroup.toString(9, "$AXISMODE") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$AXISUNIT"));
+        fw.write(DxfGroup.toString(10, 0.0, 1));
+        fw.write(DxfGroup.toString(20, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$SKETCHINC") + DxfGroup.toString(40, 0.1, 1));
+        fw.write(DxfGroup.toString(9, "$FILLETRAD") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$AUNITS") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$AUPREC") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$MENU") + DxfGroup.toString(1, "acad"));
+        fw.write(DxfGroup.toString(9, "$ELEVATION") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$PELEVATION") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$THICKNESS") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$LIMCHECK") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$BLIPMODE") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$CHAMFERA") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$CHAMFERB") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$SKPOLY") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$TDCREATE") + DxfGroup.toString(40, 2453116.436828704, 9));
+        fw.write(DxfGroup.toString(9, "$TDUPDATE") + DxfGroup.toString(40, 2453116.436828704, 9));
+        fw.write(DxfGroup.toString(9, "$TDINDWG") + DxfGroup.toString(40, 0.0000000000, 10));
+        fw.write(DxfGroup.toString(9, "$TDUSRTIMER") + DxfGroup.toString(40, 0.0000000000, 10));
+        fw.write(DxfGroup.toString(9, "$USRTIMER") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$ANGBASE") + DxfGroup.toString(50, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$ANGDIR") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$PDMODE") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$PDSIZE") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$PLINEWID") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$COORDS") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$SPLFRAME") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$SPLINETYPE") + DxfGroup.toString(70, 6));
+        fw.write(DxfGroup.toString(9, "$SPLINESEGS") + DxfGroup.toString(70, 10));
+        fw.write(DxfGroup.toString(9, "$ATTDIA") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$ATTREQ") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$HANDLING") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$HANDSEED") + DxfGroup.toString(5, "394B"));
+        fw.write(DxfGroup.toString(9, "$SURFTAB1") + DxfGroup.toString(70, 6));
+        fw.write(DxfGroup.toString(9, "$SURFTAB2") + DxfGroup.toString(70, 6));
+        fw.write(DxfGroup.toString(9, "$SURFTYPE") + DxfGroup.toString(70, 6));
+        fw.write(DxfGroup.toString(9, "$SURFU") + DxfGroup.toString(70, 6));
+        fw.write(DxfGroup.toString(9, "$SURFV") + DxfGroup.toString(70, 6));
+        fw.write(DxfGroup.toString(9, "$UCSNAME") + DxfGroup.toString(2, ""));
+        fw.write(DxfGroup.toString(9, "$UCSORG"));
+        fw.write(DxfGroup.toString(10, 0.0, 1));
+        fw.write(DxfGroup.toString(20, 0.0, 1));
+        fw.write(DxfGroup.toString(30, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$UCSXDIR"));
+        fw.write(DxfGroup.toString(10, 1.0, 1));
+        fw.write(DxfGroup.toString(20, 0.0, 1));
+        fw.write(DxfGroup.toString(30, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$UCSYDIR"));
+        fw.write(DxfGroup.toString(10, 0.0, 1));
+        fw.write(DxfGroup.toString(20, 1.0, 1));
+        fw.write(DxfGroup.toString(30, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$PUCSNAME") + DxfGroup.toString(2, ""));
+        fw.write(DxfGroup.toString(9, "$PUCSORG"));
+        fw.write(DxfGroup.toString(10, 0.0, 1));
+        fw.write(DxfGroup.toString(20, 0.0, 1));
+        fw.write(DxfGroup.toString(30, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$PUCSXDIR"));
+        fw.write(DxfGroup.toString(10, 1.0, 1));
+        fw.write(DxfGroup.toString(20, 0.0, 1));
+        fw.write(DxfGroup.toString(30, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$PUCSYDIR"));
+        fw.write(DxfGroup.toString(10, 0.0, 1));
+        fw.write(DxfGroup.toString(20, 1.0, 1));
+        fw.write(DxfGroup.toString(30, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$USERI1") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$USERI2") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$USERI3") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$USERI4") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$USERI5") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$USERR1") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$USERR2") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$USERR3") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$USERR4") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$USERR5") + DxfGroup.toString(40, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$WORLDVIEW") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$SHADEDGE") + DxfGroup.toString(70, 3));
+        fw.write(DxfGroup.toString(9, "$SHADEDIF") + DxfGroup.toString(70, 70));
+        fw.write(DxfGroup.toString(9, "$TILEMODE") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$MAXACTVP") + DxfGroup.toString(70, 16));
+        fw.write(DxfGroup.toString(9, "$PINSBASE"));
+        fw.write(DxfGroup.toString(10, 0.0, 1));
+        fw.write(DxfGroup.toString(20, 0.0, 1));
+        fw.write(DxfGroup.toString(30, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$PLIMCHECK") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$PEXTMIN"));
+        fw.write(DxfGroup.toString(10, "-1.000000E+20"));
+        fw.write(DxfGroup.toString(20, "-1.000000E+20"));
+        fw.write(DxfGroup.toString(30, "-1.000000E+20"));
+        fw.write(DxfGroup.toString(9, "$PEXTMAX"));
+        fw.write(DxfGroup.toString(10, "-1.000000E+20"));
+        fw.write(DxfGroup.toString(20, "-1.000000E+20"));
+        fw.write(DxfGroup.toString(30, "-1.000000E+20"));
+        fw.write(DxfGroup.toString(9, "$PLIMMIN"));
+        fw.write(DxfGroup.toString(10, 0.0, 1));
+        fw.write(DxfGroup.toString(20, 0.0, 1));
+        fw.write(DxfGroup.toString(9, "$PLIMMAX"));
+        fw.write(DxfGroup.toString(10, 12.0, 1));
+        fw.write(DxfGroup.toString(20, 9.0, 1));
+        fw.write(DxfGroup.toString(9, "$UNITMODE") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$VISRETAIN") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$PLINEGEN") + DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(9, "$PSLTSCALE") + DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(9, "$TREEDEPTH") + DxfGroup.toString(70, 3020));
+        fw.write(DxfGroup.toString(9, "$DWGCODEPAGE") + DxfGroup.toString(3, "ansi_1252"));
+        /*
+         fw.write(DxfGroup.toString(9, "$ELEVATION"));
+         fw.write(DxfGroup.toString(40, 0.0, 3));
+         fw.write(DxfGroup.toString(9, "$LIMCHECK"));
+         fw.write(DxfGroup.toString(70, 1));
+         fw.write(DxfGroup.toString(9, "$LUNITS"));
+         fw.write(DxfGroup.toString(70, 2));
+         fw.write(DxfGroup.toString(9, "$LUPREC"));
+         fw.write(DxfGroup.toString(70, 2));*/
+        fw.write(DxfGroup.toString(0, "ENDSEC"));
+    }
+
+    /**
+     * Escritor de la secci�n TABLES de un DXF.
+     *
+     * @param fw, FileWriter
+     * @throws IOException
+     */
+    public void writeTables(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "SECTION"));
+        fw.write(DxfGroup.toString(2, "TABLES"));
+        // esta tampoco.
+        writeVPortTable(fw);
+        writeLTypeTable(fw);
+        writeLayerTable(fw);
+        writeStyleTable(fw);
+        // estas no son las provocan el pete.
+        writeViewTable(fw);
+        writeUCSTable(fw);
+		// esta provoca el pete. Y si no se pone las tablas aparecen
+        // incompletas y acad no abre el fichero ...
+        writeAppidTable(fw);
+        writeDimStyleTable(fw);
+        // esta no provoca pete.
+        writeBlockRecordTable(fw);
+        fw.write(DxfGroup.toString(0, "ENDSEC"));
+    }
+
+    /**
+     * Escritor de la tabla VPORT.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeVPortTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "VPORT"));
+        fw.write(DxfGroup.toString(5, 8));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 0));
+        /*fw.write(DxfGroup.toString(70, 1));
+         fw.write(DxfGroup.toString(0, "VPORT"));
+         fw.write(DxfGroup.toString(5, 30));
+         fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+         fw.write(DxfGroup.toString(100, "AcDbViewportTableRecord"));
+         fw.write(DxfGroup.toString(2, "*Active"));
+         fw.write(DxfGroup.toString(70, 0));
+         fw.write(DxfGroup.toString(10, 0.0, 4));
+         fw.write(DxfGroup.toString(20, 0.0, 4));
+         fw.write(DxfGroup.toString(11, 1.0, 4));
+         fw.write(DxfGroup.toString(21, 1.0, 4));
+         fw.write(DxfGroup.toString(12, 286.30555555555549, 10));
+         fw.write(DxfGroup.toString(22, 148.5, 4));
+         fw.write(DxfGroup.toString(13, 0.0, 4));
+         fw.write(DxfGroup.toString(23, 0.0, 4));
+         fw.write(DxfGroup.toString(14, 10.0, 4));
+         fw.write(DxfGroup.toString(24, 10.0, 4));
+         fw.write(DxfGroup.toString(15, 10.0, 4));
+         fw.write(DxfGroup.toString(25, 10.0, 4));
+         fw.write(DxfGroup.toString(16, 0.0, 4));
+         fw.write(DxfGroup.toString(26, 0.0, 4));
+         fw.write(DxfGroup.toString(36, 1.0, 4));
+         fw.write(DxfGroup.toString(17, 0.0, 4));
+         fw.write(DxfGroup.toString(27, 0.0, 4));
+         fw.write(DxfGroup.toString(37, 0.0, 4));
+         fw.write(DxfGroup.toString(40, 297.0, 4));
+         fw.write(DxfGroup.toString(41, 1.92798353909465, 10));
+         fw.write(DxfGroup.toString(42, 50.0, 4));
+         fw.write(DxfGroup.toString(43, 0.0, 4));
+         fw.write(DxfGroup.toString(44, 0.0, 4));
+         fw.write(DxfGroup.toString(50, 0.0, 4));
+         fw.write(DxfGroup.toString(51, 0.0, 4));
+         fw.write(DxfGroup.toString(71, 0));
+         fw.write(DxfGroup.toString(72, 100));
+         fw.write(DxfGroup.toString(73, 1));
+         fw.write(DxfGroup.toString(74, 3));
+         fw.write(DxfGroup.toString(75, 1));
+         fw.write(DxfGroup.toString(76, 1));
+         fw.write(DxfGroup.toString(77, 0));
+         fw.write(DxfGroup.toString(78, 0));
+         fw.write(DxfGroup.toString(281, 0));
+         fw.write(DxfGroup.toString(65, 1));
+         fw.write(DxfGroup.toString(110, 0.0, 4));
+         fw.write(DxfGroup.toString(120, 0.0, 4));
+         fw.write(DxfGroup.toString(130, 0.0, 4));
+         fw.write(DxfGroup.toString(111, 1.0, 4));
+         fw.write(DxfGroup.toString(121, 0.0, 4));
+         fw.write(DxfGroup.toString(131, 0.0, 4));
+         fw.write(DxfGroup.toString(112, 0.0, 4));
+         fw.write(DxfGroup.toString(122, 1.0, 4));
+         fw.write(DxfGroup.toString(132, 0.0, 4));
+         fw.write(DxfGroup.toString(79, 0));
+         fw.write(DxfGroup.toString(146, 0.0, 4));*/
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la tabla LTYPE.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeLTypeTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "LTYPE"));
+        fw.write(DxfGroup.toString(5, 5));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 1));
+		// Aqui hay que crear un objeto DxfLType como el DxfLayer tambi�n basado en
+        // el lector de DXF de Mich.
+		/*DxfTABLE_LTYPE_ITEM ltype =
+         new DxfTABLE_LTYPE_ITEM("CONTINUE", 0, "", 65, 0f, new float[0]);
+         fw.write(ltype.toString());*/
+        fw.write(DxfGroup.toString(0, "LTYPE"));
+        fw.write(DxfGroup.toString(5, 14));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        fw.write(DxfGroup.toString(100, "AcDbLinetypeTableRecord"));
+        fw.write(DxfGroup.toString(2, "ByBlock"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(3, ""));
+        fw.write(DxfGroup.toString(72, 65));
+        fw.write(DxfGroup.toString(73, 0));
+        fw.write(DxfGroup.toString(40, 0.0, 4));
+        fw.write(DxfGroup.toString(0, "LTYPE"));
+        fw.write(DxfGroup.toString(5, 15));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        fw.write(DxfGroup.toString(100, "AcDbLinetypeTableRecord"));
+        fw.write(DxfGroup.toString(2, "ByLayer"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(3, ""));
+        fw.write(DxfGroup.toString(72, 65));
+        fw.write(DxfGroup.toString(73, 0));
+        fw.write(DxfGroup.toString(40, 0.0, 4));
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la tabla LAYER.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeLayerTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "LAYER"));
+        fw.write(DxfGroup.toString(5, 2));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 1));
+		//layer = new DxfLayer(layerName, 0, 131, "CONTINUOUS");
+        //fw.write(layer.toString());
+        //fw.write(((DxfEntityMaker) entityMaker).getLayers().toDxfString());
+        fw.write(DxfGroup.toString(0, "LAYER"));
+        fw.write(DxfGroup.toString(5, 10));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        fw.write(DxfGroup.toString(100, "AcDbLayerTableRecord"));
+        fw.write(DxfGroup.toString(2, "0"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(62, 7));
+        fw.write(DxfGroup.toString(6, "CONTINUOUS"));
+        fw.write(DxfGroup.toString(390, "F"));
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la tabla STYLE.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeStyleTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "STYLE"));
+        fw.write(DxfGroup.toString(5, 3));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 0));
+        /*fw.write(DxfGroup.toString(70, 1));
+         DxfTABLE_STYLE_ITEM style =
+         new DxfTABLE_STYLE_ITEM("STANDARD", 0, 0f, 1f, 0f, 0, 1.0f, "xxx.txt", "yyy.txt");
+         fw.write(style.toString());*/
+        fw.write(DxfGroup.toString(0, "STYLE"));
+        fw.write(DxfGroup.toString(5, 11));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        fw.write(DxfGroup.toString(100, "AcDbTextStyleTableRecord"));
+        fw.write(DxfGroup.toString(2, "Standard"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(71, 0));
+        fw.write(DxfGroup.toString(40, 0.0, 4));
+        fw.write(DxfGroup.toString(41, 1.0, 4));
+        fw.write(DxfGroup.toString(42, 2.5, 4));
+        fw.write(DxfGroup.toString(50, 0.0, 4));
+        fw.write(DxfGroup.toString(3, "txt"));
+        fw.write(DxfGroup.toString(4, ""));
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la tabla VIEW.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeViewTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "VIEW"));
+        fw.write(DxfGroup.toString(5, 6));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la tabla UCS.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeUCSTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "UCS"));
+        fw.write(DxfGroup.toString(5, 7));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la tabla APPID.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeAppidTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "APPID"));
+        fw.write(DxfGroup.toString(5, 9));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(0, "APPID"));
+        fw.write(DxfGroup.toString(5, 12));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        fw.write(DxfGroup.toString(100, "AcDbRegAppTableRecord"));
+        fw.write(DxfGroup.toString(2, "ACAD"));
+        fw.write(DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la tabla DIMSTYLE.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeDimStyleTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "DIMSTYLE"));
+        fw.write(DxfGroup.toString(5, "A"));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(100, "AcDbDimStyleTable"));
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la tabla BLOCK_RECORD.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeBlockRecordTable(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "TABLE"));
+        fw.write(DxfGroup.toString(2, "BLOCK_RECORD"));
+        fw.write(DxfGroup.toString(5, 1));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTable"));
+        fw.write(DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(0, "BLOCK_RECORD"));
+        fw.write(DxfGroup.toString(5, "1F"));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockTableRecord"));
+        fw.write(DxfGroup.toString(2, "*Model_Space"));
+        fw.write(DxfGroup.toString(340, "22"));
+        fw.write(DxfGroup.toString(0, "BLOCK_RECORD"));
+        fw.write(DxfGroup.toString(5, "1B"));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockTableRecord"));
+        fw.write(DxfGroup.toString(2, "*Paper_Space"));
+        fw.write(DxfGroup.toString(340, "1E"));
+        fw.write(DxfGroup.toString(0, "BLOCK_RECORD"));
+        fw.write(DxfGroup.toString(5, "23"));
+        fw.write(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockTableRecord"));
+        fw.write(DxfGroup.toString(2, "*Paper_Space0"));
+        fw.write(DxfGroup.toString(340, "26"));
+        fw.write(DxfGroup.toString(0, "ENDTAB"));
+    }
+
+    /**
+     * Escritor de la secci�n de bloques por defecto de un DXF2000.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeBlocks(FileWriter fw) throws IOException {
+        fw.write(DxfGroup.toString(0, "SECTION"));
+        fw.write(DxfGroup.toString(2, "BLOCKS"));
+        fw.write(DxfGroup.toString(0, "BLOCK"));
+        fw.write(DxfGroup.toString(5, "20"));
+        fw.write(DxfGroup.toString(100, "AcDbEntity"));
+        fw.write(DxfGroup.toString(8, "0"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockBegin"));
+        fw.write(DxfGroup.toString(2, "*Model_Space"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(10, 0.0, 4));
+        fw.write(DxfGroup.toString(20, 0.0, 4));
+        fw.write(DxfGroup.toString(30, 0.0, 4));
+        fw.write(DxfGroup.toString(3, "*Model_Space"));
+        fw.write(DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(0, "ENDBLK"));
+        fw.write(DxfGroup.toString(5, "21"));
+        fw.write(DxfGroup.toString(100, "AcDbEntity"));
+        fw.write(DxfGroup.toString(8, "0"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockEnd"));
+        fw.write(DxfGroup.toString(0, "BLOCK"));
+        fw.write(DxfGroup.toString(5, "1C"));
+        fw.write(DxfGroup.toString(100, "AcDbEntity"));
+        fw.write(DxfGroup.toString(67, 1));
+        fw.write(DxfGroup.toString(8, "0"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockBegin"));
+        fw.write(DxfGroup.toString(2, "*Paper_Space"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(10, 0.0, 4));
+        fw.write(DxfGroup.toString(20, 0.0, 4));
+        fw.write(DxfGroup.toString(30, 0.0, 4));
+        fw.write(DxfGroup.toString(3, "*Paper_Space"));
+        fw.write(DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(0, "ENDBLK"));
+        fw.write(DxfGroup.toString(5, "1D"));
+        fw.write(DxfGroup.toString(100, "AcDbEntity"));
+        fw.write(DxfGroup.toString(67, 1));
+        fw.write(DxfGroup.toString(8, "0"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockEnd"));
+        fw.write(DxfGroup.toString(0, "BLOCK"));
+        fw.write(DxfGroup.toString(5, "24"));
+        fw.write(DxfGroup.toString(100, "AcDbEntity"));
+        fw.write(DxfGroup.toString(8, "0"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockBegin"));
+        fw.write(DxfGroup.toString(2, "*Paper_Space0"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(10, 0.0, 4));
+        fw.write(DxfGroup.toString(20, 0.0, 4));
+        fw.write(DxfGroup.toString(30, 0.0, 4));
+        fw.write(DxfGroup.toString(3, "*Paper_Space0"));
+        fw.write(DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(0, "ENDBLK"));
+        fw.write(DxfGroup.toString(5, "25"));
+        fw.write(DxfGroup.toString(100, "AcDbEntity"));
+        fw.write(DxfGroup.toString(8, "0"));
+        fw.write(DxfGroup.toString(100, "AcDbBlockEnd"));
+        fw.write(DxfGroup.toString(0, "ENDSEC"));
+    }
+
+    /**
+     * Escritor de la secci�n ENTITIES de entidades.
+     *
+     * @param fw
+     * @throws IOException
+     */
+    public void writeEntities(FileWriter fw) throws IOException {
+        // ECRITURE DES FEATURES
+        fw.write(DxfGroup.toString(0, "SECTION"));
+        fw.write(DxfGroup.toString(2, "ENTITIES"));
+        if (cadFlag) {
+            fw.write(((DxfEntityMaker) entityMaker).getEntities().toDxfString());
+        } else {
+            //fw.write(((DxfFeatureMaker) entityMaker).getObjects().toDxfString());
+        }
+        fw.write(DxfGroup.toString(0, "ENDSEC"));
+    }
+
+    /**
+     * 050224, jmorell: Escritura de la secci�n OBJECTS seg�n QCAD. Writes a
+     * objects section. This section is needed in VER_R13. Note that this method
+     * currently only writes a faked OBJECTS section to make the file readable
+     * by Aut*cad.
+     */
+    public void writeObjects(FileWriter fw) throws IOException {
+	    //int dicId, dicId2, dicId3, dicId4, dicId5;
+        //int dicId5;
+
+        fw.write(DxfGroup.toString(0, "SECTION"));
+        fw.write(DxfGroup.toString(2, "OBJECTS"));
+        fw.write(DxfGroup.toString(0, "DICTIONARY"));
+        //fw.write(DxfGroup.toString(5, 0xC);                            // C
+        fw.write(DxfGroup.toString(5, "C"));
+        //fw.write(DxfGroup.toString(330, 0);
+        fw.write(DxfGroup.toString(100, "AcDbDictionary"));
+        fw.write(DxfGroup.toString(280, 0));
+        fw.write(DxfGroup.toString(281, 1));
+        fw.write(DxfGroup.toString(3, "ACAD_GROUP"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle());          // D
+        fw.write(DxfGroup.toString(350, "D"));          // D
+        fw.write(DxfGroup.toString(3, "ACAD_LAYOUT"));
+        fw.write(DxfGroup.toString(350, "1A"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+0);        // 1A
+        fw.write(DxfGroup.toString(3, "ACAD_MLINESTYLE"));
+        fw.write(DxfGroup.toString(350, "17"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+1);        // 17
+        fw.write(DxfGroup.toString(3, "ACAD_PLOTSETTINGS"));
+        fw.write(DxfGroup.toString(350, "19"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+2);        // 19
+        fw.write(DxfGroup.toString(3, "ACAD_PLOTSTYLENAME"));
+        fw.write(DxfGroup.toString(350, "E"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+3);        // E
+        fw.write(DxfGroup.toString(3, "AcDbVariableDictionary"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()));        // 2C
+        fw.write(DxfGroup.toString(350, "2C"));        // 2C
+        fw.write(DxfGroup.toString(0, "DICTIONARY"));
+        fw.write(DxfGroup.toString(5, "D"));
+	    //dw.handle();                                    // D
+        //fw.write(DxfGroup.toString(330, 0xC);
+        fw.write(DxfGroup.toString(100, "AcDbDictionary"));
+        fw.write(DxfGroup.toString(280, 0));
+        fw.write(DxfGroup.toString(281, 1));
+        fw.write(DxfGroup.toString(0, "ACDBDICTIONARYWDFLT"));
+        fw.write(DxfGroup.toString(5, "E"));
+	    //dicId4 = dw.handle();                           // E
+        //fw.write(DxfGroup.toString(330, 0xC);                       // C
+        fw.write(DxfGroup.toString(100, "AcDbDictionary"));
+        fw.write(DxfGroup.toString(281, 1));
+        fw.write(DxfGroup.toString(3, "Normal"));
+        fw.write(DxfGroup.toString(350, "F"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+5);        // F
+        fw.write(DxfGroup.toString(100, "AcDbDictionaryWithDefault"));
+        fw.write(DxfGroup.toString(340, "F"));
+        //fw.write(DxfGroup.toString(340, dw.getNextHandle()+5);        // F
+        fw.write(DxfGroup.toString(0, "ACDBPLACEHOLDER"));
+        fw.write(DxfGroup.toString(5, "F"));
+	    //dw.handle();                                    // F
+        //fw.write(DxfGroup.toString(330, dicId4);                      // E
+        fw.write(DxfGroup.toString(0, "DICTIONARY"));
+        //dicId3 = dw.handle();                           // 17
+        fw.write(DxfGroup.toString(5, "17"));
+        //fw.write(DxfGroup.toString(330, 0xC);                       // C
+        fw.write(DxfGroup.toString(100, "AcDbDictionary"));
+        fw.write(DxfGroup.toString(280, 0));
+        fw.write(DxfGroup.toString(281, 1));
+        fw.write(DxfGroup.toString(3, "Standard"));
+        fw.write(DxfGroup.toString(350, "18"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+5);        // 18
+        fw.write(DxfGroup.toString(0, "MLINESTYLE"));
+        fw.write(DxfGroup.toString(5, "18"));
+	    //dw.handle();                                    // 18
+        //fw.write(DxfGroup.toString(330, dicId3);                      // 17
+        fw.write(DxfGroup.toString(100, "AcDbMlineStyle"));
+        fw.write(DxfGroup.toString(2, "STANDARD"));
+        fw.write(DxfGroup.toString(70, 0));
+        fw.write(DxfGroup.toString(3, ""));
+        fw.write(DxfGroup.toString(62, 256));
+        //dw.dxfReal( 51, 90.0);
+        fw.write(DxfGroup.toString(51, 90.0, 4));
+        fw.write(DxfGroup.toString(52, 90.0, 4));
+        fw.write(DxfGroup.toString(71, 2));
+        fw.write(DxfGroup.toString(49, 0.5, 4));
+        fw.write(DxfGroup.toString(62, 256));
+        fw.write(DxfGroup.toString(6, "BYLAYER"));
+        fw.write(DxfGroup.toString(49, -0.5, 4));
+        fw.write(DxfGroup.toString(62, 256));
+        fw.write(DxfGroup.toString(6, "BYLAYER"));
+        fw.write(DxfGroup.toString(0, "DICTIONARY"));
+        fw.write(DxfGroup.toString(5, "19"));
+	    //dw.handle();                           // 17
+        //fw.write(DxfGroup.toString(330, 0xC);                       // C
+        fw.write(DxfGroup.toString(100, "AcDbDictionary"));
+        fw.write(DxfGroup.toString(280, 0));
+        fw.write(DxfGroup.toString(281, 1));
+        fw.write(DxfGroup.toString(0, "DICTIONARY"));
+        //dicId2 = dw.handle();                           // 1A
+        fw.write(DxfGroup.toString(5, "1A"));
+        //fw.write(DxfGroup.toString(330, 0xC);
+        fw.write(DxfGroup.toString(100, "AcDbDictionary"));
+        fw.write(DxfGroup.toString(281, 1));
+        fw.write(DxfGroup.toString(3, "Layout1"));
+        fw.write(DxfGroup.toString(350, "1E"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+2);        // 1E
+        fw.write(DxfGroup.toString(3, "Layout2"));
+        fw.write(DxfGroup.toString(350, "26"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+4);        // 26
+        fw.write(DxfGroup.toString(3, "Model"));
+        fw.write(DxfGroup.toString(350, "22"));
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+5);        // 22
+
+        fw.write(DxfGroup.toString(0, "LAYOUT"));
+        fw.write(DxfGroup.toString(5, "1E"));
+	    //dw.handle();                                    // 1E
+        //fw.write(DxfGroup.toString(330, dicId2);                      // 1A
+        fw.write(DxfGroup.toString(100, "AcDbPlotSettings"));
+        fw.write(DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(2, "C:\\Program Files\\AutoCAD 2002\\plotters\\DWF ePlot (optimized for plotting).pc3"));
+        fw.write(DxfGroup.toString(4, ""));
+        fw.write(DxfGroup.toString(6, ""));
+        fw.write(DxfGroup.toString(40, 0.0, 4));
+        fw.write(DxfGroup.toString(41, 0.0, 4));
+        fw.write(DxfGroup.toString(42, 0.0, 4));
+        fw.write(DxfGroup.toString(43, 0.0, 4));
+        fw.write(DxfGroup.toString(44, 0.0, 4));
+        fw.write(DxfGroup.toString(45, 0.0, 4));
+        fw.write(DxfGroup.toString(46, 0.0, 4));
+        fw.write(DxfGroup.toString(47, 0.0, 4));
+        fw.write(DxfGroup.toString(48, 0.0, 4));
+        fw.write(DxfGroup.toString(49, 0.0, 4));
+        fw.write(DxfGroup.toString(140, 0.0, 4));
+        fw.write(DxfGroup.toString(141, 0.0, 4));
+        fw.write(DxfGroup.toString(142, 1.0, 4));
+        fw.write(DxfGroup.toString(143, 1.0, 4));
+        fw.write(DxfGroup.toString(70, 688));
+        fw.write(DxfGroup.toString(72, 0));
+        fw.write(DxfGroup.toString(73, 0));
+        fw.write(DxfGroup.toString(74, 5));
+        fw.write(DxfGroup.toString(7, ""));
+        fw.write(DxfGroup.toString(75, 16));
+        fw.write(DxfGroup.toString(147, 1.0, 4));
+        fw.write(DxfGroup.toString(148, 0.0, 4));
+        fw.write(DxfGroup.toString(149, 0.0, 4));
+        fw.write(DxfGroup.toString(100, "AcDbLayout"));
+        fw.write(DxfGroup.toString(1, "Layout1"));
+        fw.write(DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(71, 1));
+        fw.write(DxfGroup.toString(10, 0.0, 4));
+        fw.write(DxfGroup.toString(20, 0.0, 4));
+        fw.write(DxfGroup.toString(11, 420.0, 4));
+        fw.write(DxfGroup.toString(21, 297.0, 4));
+        fw.write(DxfGroup.toString(12, 0.0, 4));
+        fw.write(DxfGroup.toString(22, 0.0, 4));
+        fw.write(DxfGroup.toString(32, 0.0, 4));
+        fw.write(DxfGroup.toString(14, 1.000000000000000E+20, 4));
+        fw.write(DxfGroup.toString(24, 1.000000000000000E+20, 4));
+        fw.write(DxfGroup.toString(34, 1.000000000000000E+20, 4));
+        fw.write(DxfGroup.toString(15, -1.000000000000000E+20, 4));
+        fw.write(DxfGroup.toString(25, -1.000000000000000E+20, 4));
+        fw.write(DxfGroup.toString(35, -1.000000000000000E+20, 4));
+        fw.write(DxfGroup.toString(146, 0.0, 4));
+        fw.write(DxfGroup.toString(13, 0.0, 4));
+        fw.write(DxfGroup.toString(23, 0.0, 4));
+        fw.write(DxfGroup.toString(33, 0.0, 4));
+        fw.write(DxfGroup.toString(16, 1.0, 4));
+        fw.write(DxfGroup.toString(26, 0.0, 4));
+        fw.write(DxfGroup.toString(36, 0.0, 4));
+        fw.write(DxfGroup.toString(17, 0.0, 4));
+        fw.write(DxfGroup.toString(27, 1.0, 4));
+        fw.write(DxfGroup.toString(37, 0.0, 4));
+        fw.write(DxfGroup.toString(76, 0));
+        //fw.write(DxfGroup.toString(330, dw.getPaperSpaceHandle());    // 1B
+        fw.write(DxfGroup.toString(330, "1B"));
+        fw.write(DxfGroup.toString(0, "LAYOUT"));
+        fw.write(DxfGroup.toString(5, "22"));
+	    //dw.handle();                                    // 22
+        //fw.write(DxfGroup.toString(330, dicId2);                      // 1A
+        fw.write(DxfGroup.toString(100, "AcDbPlotSettings"));
+        fw.write(DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(2, "C:\\Program Files\\AutoCAD 2002\\plotters\\DWF ePlot (optimized for plotting).pc3"));
+        fw.write(DxfGroup.toString(4, ""));
+        fw.write(DxfGroup.toString(6, ""));
+        fw.write(DxfGroup.toString(40, 0.0, 4));
+        fw.write(DxfGroup.toString(41, 0.0, 4));
+        fw.write(DxfGroup.toString(42, 0.0, 4));
+        fw.write(DxfGroup.toString(43, 0.0, 4));
+        fw.write(DxfGroup.toString(44, 0.0, 4));
+        fw.write(DxfGroup.toString(45, 0.0, 4));
+        fw.write(DxfGroup.toString(46, 0.0, 4));
+        fw.write(DxfGroup.toString(47, 0.0, 4));
+        fw.write(DxfGroup.toString(48, 0.0, 4));
+        fw.write(DxfGroup.toString(49, 0.0, 4));
+        fw.write(DxfGroup.toString(140, 0.0, 4));
+        fw.write(DxfGroup.toString(141, 0.0, 4));
+        fw.write(DxfGroup.toString(142, 1.0, 4));
+        fw.write(DxfGroup.toString(143, 1.0, 4));
+        fw.write(DxfGroup.toString(70, 1712));
+        fw.write(DxfGroup.toString(72, 0));
+        fw.write(DxfGroup.toString(73, 0));
+        fw.write(DxfGroup.toString(74, 0));
+        fw.write(DxfGroup.toString(7, ""));
+        fw.write(DxfGroup.toString(75, 0));
+        fw.write(DxfGroup.toString(147, 1.0, 4));
+        fw.write(DxfGroup.toString(148, 0.0, 4));
+        fw.write(DxfGroup.toString(149, 0.0, 4));
+        fw.write(DxfGroup.toString(100, "AcDbLayout"));
+        fw.write(DxfGroup.toString(1, "Model"));
+        fw.write(DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(71, 0));
+        fw.write(DxfGroup.toString(10, 0.0, 4));
+        fw.write(DxfGroup.toString(20, 0.0, 4));
+        fw.write(DxfGroup.toString(11, 12.0, 4));
+        fw.write(DxfGroup.toString(21, 9.0, 4));
+        fw.write(DxfGroup.toString(12, 0.0, 4));
+        fw.write(DxfGroup.toString(22, 0.0, 4));
+        fw.write(DxfGroup.toString(32, 0.0, 4));
+        fw.write(DxfGroup.toString(14, 0.0, 4));
+        fw.write(DxfGroup.toString(24, 0.0, 4));
+        fw.write(DxfGroup.toString(34, 0.0, 4));
+        fw.write(DxfGroup.toString(15, 0.0, 4));
+        fw.write(DxfGroup.toString(25, 0.0, 4));
+        fw.write(DxfGroup.toString(35, 0.0, 4));
+        fw.write(DxfGroup.toString(146, 0.0, 4));
+        fw.write(DxfGroup.toString(13, 0.0, 4));
+        fw.write(DxfGroup.toString(23, 0.0, 4));
+        fw.write(DxfGroup.toString(33, 0.0, 4));
+        fw.write(DxfGroup.toString(16, 1.0, 4));
+        fw.write(DxfGroup.toString(26, 0.0, 4));
+        fw.write(DxfGroup.toString(36, 0.0, 4));
+        fw.write(DxfGroup.toString(17, 0.0, 4));
+        fw.write(DxfGroup.toString(27, 1.0, 4));
+        fw.write(DxfGroup.toString(37, 0.0, 4));
+        fw.write(DxfGroup.toString(76, 0));
+        //fw.write(DxfGroup.toString(330, dw.getModelSpaceHandle());    // 1F
+        fw.write(DxfGroup.toString(330, "1F"));
+        fw.write(DxfGroup.toString(0, "LAYOUT"));
+        //dw.handle();                                    // 26
+        fw.write(DxfGroup.toString(5, "26"));
+        //fw.write(DxfGroup.toString(330, dicId2);                      // 1A
+        fw.write(DxfGroup.toString(100, "AcDbPlotSettings"));
+        fw.write(DxfGroup.toString(1, ""));
+        fw.write(DxfGroup.toString(2, "C:\\Program Files\\AutoCAD 2002\\plotters\\DWF ePlot (optimized for plotting).pc3"));
+        fw.write(DxfGroup.toString(4, ""));
+        fw.write(DxfGroup.toString(6, ""));
+        fw.write(DxfGroup.toString(40, 0.0, 4));
+        fw.write(DxfGroup.toString(41, 0.0, 4));
+        fw.write(DxfGroup.toString(42, 0.0, 4));
+        fw.write(DxfGroup.toString(43, 0.0, 4));
+        fw.write(DxfGroup.toString(44, 0.0, 4));
+        fw.write(DxfGroup.toString(45, 0.0, 4));
+        fw.write(DxfGroup.toString(46, 0.0, 4));
+        fw.write(DxfGroup.toString(47, 0.0, 4));
+        fw.write(DxfGroup.toString(48, 0.0, 4));
+        fw.write(DxfGroup.toString(49, 0.0, 4));
+        fw.write(DxfGroup.toString(140, 0.0, 4));
+        fw.write(DxfGroup.toString(141, 0.0, 4));
+        fw.write(DxfGroup.toString(142, 1.0, 4));
+        fw.write(DxfGroup.toString(143, 1.0, 4));
+        fw.write(DxfGroup.toString(70, 688));
+        fw.write(DxfGroup.toString(72, 0));
+        fw.write(DxfGroup.toString(73, 0));
+        fw.write(DxfGroup.toString(74, 5));
+        fw.write(DxfGroup.toString(7, ""));
+        fw.write(DxfGroup.toString(75, 16));
+        fw.write(DxfGroup.toString(147, 1.0, 4));
+        fw.write(DxfGroup.toString(148, 0.0, 4));
+        fw.write(DxfGroup.toString(149, 0.0, 4));
+        fw.write(DxfGroup.toString(100, "AcDbLayout"));
+        fw.write(DxfGroup.toString(1, "Layout2"));
+        fw.write(DxfGroup.toString(70, 1));
+        fw.write(DxfGroup.toString(71, 2));
+        fw.write(DxfGroup.toString(10, 0.0, 4));
+        fw.write(DxfGroup.toString(20, 0.0, 4));
+        fw.write(DxfGroup.toString(11, 12.0, 4));
+        fw.write(DxfGroup.toString(21, 9.0, 4));
+        fw.write(DxfGroup.toString(12, 0.0, 4));
+        fw.write(DxfGroup.toString(22, 0.0, 4));
+        fw.write(DxfGroup.toString(32, 0.0, 4));
+        fw.write(DxfGroup.toString(14, 0.0, 4));
+        fw.write(DxfGroup.toString(24, 0.0, 4));
+        fw.write(DxfGroup.toString(34, 0.0, 4));
+        fw.write(DxfGroup.toString(15, 0.0, 4));
+        fw.write(DxfGroup.toString(25, 0.0, 4));
+        fw.write(DxfGroup.toString(35, 0.0, 4));
+        fw.write(DxfGroup.toString(146, 0.0, 4));
+        fw.write(DxfGroup.toString(13, 0.0, 4));
+        fw.write(DxfGroup.toString(23, 0.0, 4));
+        fw.write(DxfGroup.toString(33, 0.0, 4));
+        fw.write(DxfGroup.toString(16, 1.0, 4));
+        fw.write(DxfGroup.toString(26, 0.0, 4));
+        fw.write(DxfGroup.toString(36, 0.0, 4));
+        fw.write(DxfGroup.toString(17, 0.0, 4));
+        fw.write(DxfGroup.toString(27, 1.0, 4));
+        fw.write(DxfGroup.toString(37, 0.0, 4));
+        fw.write(DxfGroup.toString(76, 0));
+        //fw.write(DxfGroup.toString(330, dw.getPaperSpace0Handle());   // 23
+        fw.write(DxfGroup.toString(330, "23"));
+        fw.write(DxfGroup.toString(0, "DICTIONARY"));
+        fw.write(DxfGroup.toString(5, 0x2E));
+	    //dicId5 =
+        //dw.handle();                           // 2C
+        //fw.write(DxfGroup.toString(330, 0xC);                       // C
+        fw.write(DxfGroup.toString(100, "AcDbDictionary"));
+        fw.write(DxfGroup.toString(281, 1));
+        fw.write(DxfGroup.toString(3, "DIMASSOC"));
+	    //fw.write(DxfGroup.toString(350, 0x2F);
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle()+1);        // 2E
+        fw.write(DxfGroup.toString(350, 0x30));        // 2E
+        fw.write(DxfGroup.toString(3, "HIDETEXT"));
+	    //fw.write(DxfGroup.toString(350, 0x2E);
+        //fw.write(DxfGroup.toString(350, dw.getNextHandle());        // 2D
+        fw.write(DxfGroup.toString(350, 0x2F));        // 2D
+        fw.write(DxfGroup.toString(0, "DICTIONARYVAR"));
+        fw.write(DxfGroup.toString(5, 0x2F));
+	    //dw.handle();                                    // 2E
+        //fw.write(DxfGroup.toString(330, dicId5);                      // 2C
+        fw.write(DxfGroup.toString(100, "DictionaryVariables"));
+        fw.write(DxfGroup.toString(280, 0));
+        fw.write(DxfGroup.toString(1, 2));
+        fw.write(DxfGroup.toString(0, "DICTIONARYVAR"));
+        fw.write(DxfGroup.toString(5, 0x30));
+	    //dw.handle();                                    // 2D
+        //fw.write(DxfGroup.toString(330, dicId5);                      // 2C
+        fw.write(DxfGroup.toString(100, "DictionaryVariables"));
+        fw.write(DxfGroup.toString(280, 0));
+        fw.write(DxfGroup.toString(1, 1));
+        fw.write(DxfGroup.toString(0, "ENDSEC"));
+    }
+
+    /**
+     * Habilita la reproyecci�n cartogr�fica
+     */
+    public void reProject(ICoordTrans rp) {
+        logger.debug("Dxf: reproyectando ...");
+        entityMaker.reProject(rp);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.GeoFile#close()
+     */
+    public void close() {
+        // TODO Auto-generated method stub
+
+    }
+
+    /**
+     * Informa sobre si estamos trabajando con el modelo de datos GIS o con el
+     * de CAD
+     *
+     * @return Returns the cadFlag.
+     */
+    public boolean isCadFlag() {
+        return cadFlag;
+    }
+
+    /**
+     * Establece si trabajamos con el modelo de datos GIS o con el de CAD
+     *
+     * @param cadFlag The cadFlag to set.
+     */
+    public void setCadFlag(boolean cadFlag) {
+        this.cadFlag = cadFlag;
+    }
+
+    /**
+     * @return Returns the dxf3DFlag.
+     */
+    public boolean isDxf3DFlag() {
+        return dxf3DFlag;
+    }
+
+    /**
+     * @param dxf3DFlag The dxf3DFlag to set.
+     */
+    public void setDxf3DFlag(boolean dxf3DFlag) {
+        this.dxf3DFlag = dxf3DFlag;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfGroupVector.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfGroupVector.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/io/DxfGroupVector.java	(revision 1291)
@@ -0,0 +1,133 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.io;
+
+import java.util.Vector;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Vector de DxfGroup. Auxiliar para leer ficheros .dxf
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class DxfGroupVector extends Vector<Object> {
+    final private static long serialVersionUID = -3370601314380922368L;
+	private static Logger logger = LoggerFactory.getLogger(DxfGroupVector.class);
+
+    /**
+     * Valor del dato del codigo de grupo especificado.
+     *
+     * @param code C�digo de grupo dxf.
+     * @return Valor del data del grupo dxf, null si no existe.
+     */
+    public boolean hasCode(int code) {
+        DxfGroup grp = null;
+
+        for (int i = 0; i < size(); i++) {
+            grp = (DxfGroup) get(i);
+
+            if (grp.code == code) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Devuelve la informaci�n contenida en un DxfGroup.
+     * @param code la parte concreta del DxfGroup a la que queremos acceder
+     * @return the data
+     */
+    public Object getData(int code) {
+        DxfGroup grp = null;
+
+        for (int i = 0; i < size(); i++) {
+            grp = (DxfGroup) get(i);
+
+            if (grp.code == code) {
+                return grp.data;
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Obtiene la informaci�n contenida en un DxfGroup en forma de String
+     * @param code
+     * @return the data as String
+     */
+    public String getDataAsString(int code) {
+        return (String) getData(code);
+    }
+
+    /**
+     * Obtiene la informaci�n contenida en un DxfGroup en forma de double
+     * @param code
+     * @return the data as Double
+     */
+    public double getDataAsDouble(int code) {
+        Double f = (Double) getData(code);
+
+        if (f == null) {
+            logger.warn(this.toString());
+            return 0;
+        }
+
+        return f.doubleValue();
+    }
+
+    /**
+     * Obtiene la informaci�n contenida en un DxfGroup en forma de integer
+     * @param code
+     * @return the data as Int
+     */
+    public int getDataAsInt(int code) {
+        Integer i = (Integer) getData(code);
+
+        if (i == null) {
+        	logger.warn(this.toString());
+        }
+
+        return i.intValue();
+    }
+
+    /**
+     * Permite obtener el contenido de un DxfGroup en forma de String
+     */
+    public String toString() {
+        String str = "DxfGroupVector[";
+        DxfGroup grp = null;
+
+        for (int i = 0; i < size(); i++) {
+            grp = (DxfGroup) get(i);
+            str += ("(" + grp.code + ":" + grp.data + "),");
+        }
+
+        return str;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/ISize.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/ISize.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/ISize.java	(revision 1291)
@@ -0,0 +1,34 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+public interface ISize {
+    public int w();
+
+    public int w(int w);
+
+    public int h();
+
+    public int h(int h);
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxRect.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxRect.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxRect.java	(revision 1291)
@@ -0,0 +1,141 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+
+
+public class PxRect extends PxObj implements IPoint, ISize, Colored {
+    private int px = 0;
+    private int py = 0;
+    private int pw = 0;
+    private int ph = 0;
+    private Color pc;
+    private Color filColor = null;
+
+    public PxRect(IPoint p, ISize s, Color color, Color fc) {
+        x(p.x());
+        y(p.y());
+        w(s.w());
+        h(s.h());
+        c(color);
+        fillColor(fc);
+        extent = new Extent(x(), y(), x() + w(), y() + h());
+    }
+
+    public PxRect(int x, int y, int w, int h, Color color, Color fc) {
+        x(x);
+        y(y);
+        w(w);
+        h(h);
+        c(color);
+        fillColor(fc);
+        extent = new Extent(x(), y(), x() + w(), y() + h());
+    }
+
+    public int x() {
+        return px;
+    }
+
+    public int x(int x) {
+        px = x;
+
+        return px;
+    }
+
+    public int y() {
+        return py;
+    }
+
+    public int y(int y) {
+        py = y;
+
+        return py;
+    }
+
+    public int w() {
+        return pw;
+    }
+
+    public int w(int w) {
+        pw = w;
+
+        return pw;
+    }
+
+    public int h() {
+        return ph;
+    }
+
+    public int h(int h) {
+        ph = h;
+
+        return ph;
+    }
+
+    public Color c() {
+        return pc;
+    }
+
+    public Color c(Color color) {
+        pc = color;
+
+        return pc;
+    }
+
+    public Color fillColor() {
+        return filColor;
+    }
+
+    public Color fillColor(Color c) {
+        filColor = c;
+
+        return filColor;
+    }
+
+    /*        public void draw(Graphics2D g) {
+                    draw(g, g.getTransform(), null);
+            }
+
+            public void draw(Graphics2D g, AffineTransform mat, Extent sz) {
+    */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        AffineTransform msave = g.getTransform();
+        g.setTransform(vp.mat);
+
+        if (fillColor() != null) {
+            g.setColor(fillColor());
+            g.fillRect(x(), y(), w(), h());
+        }
+
+        g.setColor(c());
+        g.drawRect(x(), y(), w(), h());
+        g.setTransform(msave);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/Colored.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/Colored.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/Colored.java	(revision 1291)
@@ -0,0 +1,33 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+import java.awt.Color;
+
+
+public interface Colored {
+    public Color c();
+
+    public Color c(Color c);
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/package.html
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/package.html	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/package.html	(revision 1291)
@@ -0,0 +1,4 @@
+<html>
+	<body>Pixel: Clases para dibujar.
+</body>
+</html>
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/IObjList.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/IObjList.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/IObjList.java	(revision 1291)
@@ -0,0 +1,75 @@
+/*
+ * Created on 21-jun-2004
+ *
+ * To change the template for this generated file go to
+ * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ */
+/* gvSIG. Sistema de Informaci�n Geogr�fica de la Generalitat Valenciana
+ *
+ * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ *  Generalitat Valenciana
+ *   Conselleria d'Infraestructures i Transport
+ *   Av. Blasco Ib��ez, 50
+ *   46010 VALENCIA
+ *   SPAIN
+ *
+ *      +34 963862235
+ *   gvsig@gva.es
+ *      www.gvsig.gva.es
+ *
+ *    or
+ *
+ *   IVER T.I. S.A
+ *   Salamanca 50
+ *   46005 Valencia
+ *   Spain
+ *
+ *   +34 963163400
+ *   dac@iver.es
+ */
+package org.gvsig.dxf.px;
+
+import java.awt.geom.Point2D;
+import java.util.Iterator;
+
+import org.cresques.geo.Projected;
+import org.cresques.px.Extent;
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public interface IObjList extends Extent.Has, Projected {
+    public Iterator iterator();
+
+    public int size();
+
+    public void add(Extent.Has obj);
+
+    public void remove(Object obj);
+
+    public void clear();
+
+    public IObjList getAt(Point2D pt);
+
+    interface vector extends IObjList {
+        public Extent.Has get(int i);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxLine.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxLine.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxLine.java	(revision 1291)
@@ -0,0 +1,141 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Stroke;
+import java.awt.geom.AffineTransform;
+
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+
+
+public class PxLine extends PxObj implements IPoint, Colored {
+    private int px = 0;
+    private int py = 0;
+    private int px2 = 0;
+    private int py2 = 0;
+    private Color pc;
+
+    public PxLine(IPoint p, IPoint p2, Color color) {
+        x(p.x());
+        y(p.y());
+        x2(p2.x());
+        y2(p2.y());
+        c(color);
+        extent = new Extent(Math.min(x(), x2()), Math.min(y(), y2()),
+                            Math.max(x(), x2()), Math.max(y(), y2()));
+    }
+
+    public PxLine(int x, int y, int x2, int y2, Color color) {
+        x(x);
+        y(y);
+        x2(x2);
+        y2(y2);
+        c(color);
+        extent = new Extent(Math.min(x(), x2()), Math.min(y(), y2()),
+                            Math.max(x(), x2()), Math.max(y(), y2()));
+    }
+
+    public int x() {
+        return px;
+    }
+
+    public int x(int x) {
+        px = x;
+
+        return px;
+    }
+
+    public int y() {
+        return py;
+    }
+
+    public int y(int y) {
+        py = y;
+
+        return py;
+    }
+
+    public int x2() {
+        return px2;
+    }
+
+    public int x2(int x) {
+        px2 = x;
+
+        return px2;
+    }
+
+    public int y2() {
+        return py2;
+    }
+
+    public int y2(int y) {
+        py2 = y;
+
+        return py2;
+    }
+
+    public Color c() {
+        return pc;
+    }
+
+    public Color c(Color color) {
+        pc = color;
+
+        return pc;
+    }
+
+    public void setStroke(Stroke stroke) {
+        this.stroke = stroke;
+    }
+
+    /*        public void draw(Graphics2D g) {
+                    draw(g, g.getTransform(), null);
+            }
+
+            public void draw(Graphics2D g, AffineTransform mat, Extent sz) {
+    */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Stroke strkSave = null;
+
+        if (stroke != null) {
+            strkSave = g.getStroke();
+            g.setStroke(stroke);
+        }
+
+        AffineTransform msave = g.getTransform();
+        g.setTransform(vp.mat);
+        g.setColor(c());
+        g.drawLine(x(), y(), x2(), y2());
+
+        if (strkSave != null) {
+            g.setStroke(strkSave);
+        }
+
+        g.setTransform(msave);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/MultiGeometry.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/MultiGeometry.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/MultiGeometry.java	(revision 1291)
@@ -0,0 +1,85 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import java.awt.Graphics2D;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+
+
+/**
+ * Clase base para geometrias m�ltiples.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class MultiGeometry extends Geometry {
+    Vector data = null;
+
+    public MultiGeometry() {
+        super();
+        data = new Vector();
+    }
+
+    public void add(Geometry geometry) {
+        extent.add(geometry.getExtent());
+        data.add(geometry);
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        extent = new Extent();
+
+        Geometry geometry;
+        Iterator iter = data.iterator();
+
+        while (iter.hasNext()) {
+            geometry = (Geometry) iter.next();
+            geometry.reProject(rp);
+            extent.add(geometry.getExtent());
+        }
+
+        setProjection(rp.getPDest());
+    }
+
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Geometry geometry;
+        Iterator iter = data.iterator();
+
+        while (iter.hasNext()) {
+            geometry = (Geometry) iter.next();
+            geometry.draw(g, vp);
+        }
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/FeatureCollection.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/FeatureCollection.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/FeatureCollection.java	(revision 1291)
@@ -0,0 +1,193 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.px.IObjList;
+import org.gvsig.dxf.px.dxf.DxfEntityList;
+
+
+/**
+ * FeatureCollection de .gml y .shp
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * jmorell: A�adidas a FeatureCollection las capacidades de almacenamiento propias de
+ * Feature mediante herencia.
+ */
+public class FeatureCollection extends Feature implements IObjList.vector {
+    IProjection proj = null;
+    public Vector data = null;
+    
+    /**
+     * Constructor de FeatureCollection.
+     * @param proj, Proyecci�n cartogr�fica en la que se encuentra la FeatureCollection.
+     */
+    public FeatureCollection(IProjection proj) {
+        extent = new Extent();
+        data = new Vector();
+        property = new Hashtable();
+    }
+    
+    /**
+     * Permite a�adir un objeto gr�fico a la lista.
+     * @param obj, Objeto gr�fico que implemente el interface Extent.Has
+     */
+    public void add(Extent.Has feature) {
+        Extent ext = feature.getExtent();
+
+        if (extent != null) {
+            extent.add(ext);
+            data.add(feature);
+        }
+    }
+    
+    /**
+     * Devuelve los obhjetos gr�ficos de la lista cuyos extents contengan al
+     * punto que se le pasa como argumento.
+     * @param pt, punto para localizar los objetos gr�ficos.
+     * @return IObjList, Conjunto de objetos gr�ficos que contienen a pt.
+     */
+    public IObjList getAt(Point2D pt) {
+        IObjList oList = new DxfEntityList(proj);
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            Extent.Has o = (Extent.Has) iter.next();
+
+            if (o.getExtent().isAt(pt)) {
+                oList.add(o);
+            }
+        }
+
+        return oList;
+    }
+    
+    /**
+     * Devuelve un iterador para recorrer los elementos de la lista de objetos gr�ficos.
+     * @return Iterator, iterador.
+     */
+    public Iterator iterator() {
+        return data.iterator();
+    }
+    
+    /**
+     * Devuelve la cantidad de elementos que contiene la lista de objetos gr�ficos.
+     * @return int
+     */
+    public int size() {
+        return data.size();
+    }
+    
+    /**
+     * Permite eliminar un elemento de la lista de objetos gr�ficos.
+     * @param obj, Objeto que queremos eliminar.
+     */
+    public void remove(Object obj) {
+        data.remove(obj);
+    }
+    
+    /**
+     * Permite vac�ar la lista de objetos gr�ficos.
+     */
+    public void clear() {
+        extent = new Extent();
+        data.clear();
+    }
+    
+    /**
+     * Devuelve uno de los elementos de la lista de objetos gr�ficos.
+     * @param i, �ndice del elemento de la lista que queremos obtener.
+     * @return Extent.Has, elemento gr�fico que queremos obtener.
+     */
+    public Extent.Has get(int i) {
+        return (Extent.Has) data.get(i);
+    }
+    
+    /**
+     * Devuelve la proyecci�n cartogr�fica en la que se encuentra la FeatureCollection.
+     * @return IProjection, proyecci�n cartogr�fica.
+     */
+    public IProjection getProjection() {
+        return proj;
+    }
+    
+    /**
+     * Establece la proyecci�n cartogr�fica en la que se encuentra la FeatureCollection.
+     * @param p, Proyecci�n cartogr�fica.
+     */
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+    
+    /**
+     * Permite cambiar la proyecci�n en la que se encuentra la FeatureCollection a
+     * trav�s de un conjunto de coordenadas de transformaci�n.
+     * @param rp, Coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        extent = new Extent();
+
+        Feature f;
+        Geometry g;
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            f = (Feature) iter.next();
+            g = f.getGeometry();
+            g.reProject(rp);
+            extent.add(g.getExtent());
+        }
+
+        setProjection(rp.getPDest());
+    }
+    
+    /**
+     * Permite dibujar las Features que conforman la FeatureCollection.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            Feature f = (Feature) iter.next();
+            f.draw(g, vp);
+        }
+    }
+    
+    /**
+     * Permite obtener el extent de la FeatureCollection.
+     * @return Extent, rect�ngulo en donde se ubican las Features que conforman la
+     * FeatureCollection.
+     */
+    public Extent getExtent() {
+        return extent;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Polygon.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Polygon.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Polygon.java	(revision 1291)
@@ -0,0 +1,175 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.geo.Polygon2D;
+
+
+/**
+ * Geometria de tipo Polygon
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class Polygon extends Geometry {
+    final static Color colorBase = new Color(192, 64, 64);
+    final static Color fColorBase = new Color(192, 64, 64, 0x10); // new Color(255,192,192,64);
+    public static int pointNr = 0;
+    Polygon2D outPol = null;
+    Polygon2D inPol = null;
+    boolean outer = true;
+    private Color fillColor = fColorBase; //new Color(255,222,165,64);
+    private Color color = colorBase; //Color(255,214,132,255);
+
+    public Polygon() {
+        super();
+        outPol = new Polygon2D();
+        inPol = new Polygon2D();
+    }
+    
+    public boolean is3D() {
+        if( this.isEmpty() ) {
+            return false;
+        }
+        Object x = this.get(0);
+        return x instanceof Point3D;
+    }
+
+    public void add(Point2D pt) {
+        pointNr++;
+
+        if (outer) {
+            outPol.addPoint(pt);
+        } else {
+            inPol.addPoint(pt);
+        }
+
+        extent.add(pt);
+    }
+
+    public boolean isEmpty() {
+        if (outer) {
+            if( !outPol.isEmpty() ) {
+                return false;
+            }
+        }
+        return inPol.isEmpty();
+    }
+    
+    public Point2D get(int i) {
+        if (outer) {
+            return (Point2D) outPol.get(i);
+        }
+
+        return (Point2D) inPol.get(i);
+    }
+
+    public void remove(int i) {
+        if (outer) {
+            outPol.remove(i);
+        } else {
+            inPol.remove(i);
+        }
+    }
+
+    public int pointNr() {
+        if (outer) {
+            return outPol.size();
+        }
+
+        return inPol.size();
+    }
+
+    public void setOuterBoundary() {
+        outer = true;
+    }
+
+    public void setInnerBoundary() {
+        outer = false;
+    }
+
+    public Color c() {
+        return color;
+    }
+
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+
+    public Color fillColor() {
+        return fillColor;
+    }
+
+    public Color fillColor(Color c) {
+        fillColor = c;
+
+        return fillColor;
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        Polygon2D savePol = outPol;
+
+        outPol = new Polygon2D();
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePol.size(); i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) savePol.get(i), ptDest);
+            outPol.addPoint(ptDest);
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+
+    public void draw(Graphics2D g, ViewPortData vp) {
+        // relleno el poligono si es preciso
+        if (fillColor() != null) {
+            g.setColor(fillColor());
+            outPol.fill(g, vp);
+        }
+
+        // pinto el poligono si es preciso
+        g.setColor(c());
+        outPol.draw(g, vp);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Point.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Point.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Point.java	(revision 1291)
@@ -0,0 +1,113 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Line2D;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+
+
+/**
+ * Geometria de tipo Point
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class Point extends Geometry {
+    public static int pointNr = 0;
+    public String text = null;
+    private boolean textPoint;
+    private Color fColor = null; //new Color(255,222,165,64);
+    private Color color = new Color(255, 0, 0); //Color(255,214,132,255);
+
+    public Point() {
+        super();
+    }
+
+    public void add(Point2D pt) {
+        pointNr++;
+        super.add(pt);
+    }
+
+    public Color c() {
+        return color;
+    }
+
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+
+    public Color fillColor() {
+        return fColor;
+    }
+
+    public Color fillColor(Color c) {
+        fColor = c;
+
+        return fColor;
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        // TODO metodo reProject pendiente de implementar
+    }
+
+    public void draw(Graphics2D g, ViewPortData vp) {
+        g.setColor(c());
+
+        Point2D pt = new Point2D.Double(0D, 0D);
+        vp.mat.transform((Point2D) data.get(0), pt);
+        g.draw(new Line2D.Double(pt, pt));
+
+        if (text != null) {
+            g.drawString(text, (int) pt.getX(), (int) pt.getY());
+        }
+    }
+
+    /**
+     * @return Returns the textPoint.
+     */
+    public boolean isTextPoint() {
+        return textPoint;
+    }
+
+    /**
+     * @param textPoint The textPoint to set.
+     */
+    public void setTextPoint(boolean textPoint) {
+        this.textPoint = textPoint;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/InsPoint3D.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/InsPoint3D.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/InsPoint3D.java	(revision 1291)
@@ -0,0 +1,59 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import org.gvsig.dxf.geo.Point3D;
+
+
+/**
+ * Extensi�n 3D de InsPoint.
+ * @author jmorell
+ */
+public class InsPoint3D extends InsPoint {
+    
+    /**
+     * Constructor de InsPoint3D.
+     */
+    public InsPoint3D() {
+        super();
+    }
+    
+    /**
+     * Permite a�adir un punto en 3D.
+     * @param pt, punto en 3D.
+     */
+    public void add(Point3D pt) {
+        pointNr++;
+        super.add(pt);
+    }
+    
+    /**
+     * Devuelve un punto 3D dado por un �ndice.
+     * @param i, �ndice.
+     * @return Point3D, punto 3D.
+     */
+    public Point3D getPoint3D(int i) {
+        return (Point3D) data.get(i);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Feature.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Feature.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Feature.java	(revision 1291)
@@ -0,0 +1,110 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import java.awt.Graphics2D;
+import java.util.Hashtable;
+
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.px.PxObj;
+
+
+/**
+ * Feature de .gml y .shp
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class Feature extends PxObj {
+    Hashtable property = null;
+    Geometry geometry = null;
+    
+    /**
+     * Constructor de la clase Feature.
+     */
+    public Feature() {
+        property = new Hashtable();
+    }
+    
+    /**
+     * Establece los atributos de las Features.
+     * @param prop, Nombre del atributo.
+     * @param value, Valor que toma este atributo para esta Feature.
+     */
+    public void setProp(String prop, String value) {
+        property.put(prop, value);
+    }
+    
+    /**
+     * Devuelve el valor de un determinado atributo del Feature.
+     * @param prop, Nombre del atributo del cual queremos conocer el valor.
+     * @return String, Valor del atributo para esta Feature.
+     */
+    public String getProp(String prop) {
+        return (String) property.get(prop);
+    }
+    
+    /**
+     * Establece la geometr�a a la que est� asociada este Feature.
+     * @param geom, la geometr�a que caracteriza a este Feature.
+     */
+    public void setGeometry(Geometry geom) {
+        geometry = geom;
+    }
+    
+    /**
+     * Devuelve la geometr�a asociada a este Feature.
+     * @return Geometry, la geometr�a que caracteriza a este Feature.
+     */
+    public Geometry getGeometry() {
+        return geometry;
+    }
+    
+    /**
+     * Devuelve el extent de la geometr�a que caracteriza al Feature.
+     * @return Extent, rect�ngulo en el que est� ubicado la geometr�a caracter�stica
+     * del Feature.
+     */
+    public Extent getExtent() {
+        if (geometry != null) {
+            return geometry.getExtent();
+        }
+
+        return null;
+    }
+    
+    /**
+     * Permite dibujar le geometr�a caracter�stica del Feature.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Geometry geo = getGeometry();
+
+        if (geo != null) {
+            if (geo instanceof Point) {
+                ((Point) geo).text = getProp("NOMBRE");
+            }
+
+            geo.draw(g, vp);
+        }
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Geometry.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Geometry.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Geometry.java	(revision 1291)
@@ -0,0 +1,117 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.px.PxObj;
+
+
+/**
+ * Clase base para geometr�as.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+abstract public class Geometry extends PxObj implements Projected {
+    protected IProjection proj;
+
+    //	protected Extent extent = null;
+    Vector data = null;
+    
+    /**
+     * Constructor de Geometry.
+     */
+    public Geometry() {
+        extent = new Extent();
+        data = new Vector();
+    }
+    
+    /**
+     * Permite a�adir un punto a la Geometry.
+     * @param pt
+     */
+    public void add(Point2D pt) {
+        extent.add(pt);
+        data.add(pt);
+    }
+    
+    /**
+     * Devuelve un punto de la Geometry dado por su �ndice.
+     * @param i, �ndice.
+     * @return Point2D.
+     */
+    public Point2D get(int i) {
+        return (Point2D) data.get(i);
+    }
+    
+    /**
+     * Devuelve el n�mero de puntos que componen la Geometry.
+     * @return int
+     */
+    public int pointNr() {
+        return data.size();
+    }
+    
+    /**
+     * Devuelve el conjunto de objetos que conforman la Geometry en forma de Vector.
+     * @return Vector de objetos.
+     */
+    public Vector getData() {
+        return data;
+    }
+    
+    /**
+     * Devuelve el extent de la Geometry.
+     * @return Extent, el rect�ngulo que contiene la Geometry.
+     */
+    public Extent getExtent() {
+        return extent;
+    }
+    
+    /**
+     * Devuelve la proyecci�n cartogr�fica en la que se encuentra la Geometry.
+     * @return IProjection, la proyecci�n cartogr�fica.
+     */
+    abstract public IProjection getProjection();
+    
+    /**
+     * Permite reproyectar la Geometry en funci�n de unas coordenadas de transformaci�n.
+     * @param rp, Coordenadas de transformaci�n.
+     */
+    abstract public void reProject(ICoordTrans rp);
+    
+    /**
+     * Permite dibujar la Geometry.
+     * @param g, Graphics2D.
+     * @param vp, ViewPortData.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/LineString.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/LineString.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/LineString.java	(revision 1291)
@@ -0,0 +1,140 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Line2D;
+import java.awt.geom.Point2D;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+
+
+/**
+ * Geometria de tipo Polygon
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class LineString extends Geometry {
+    public static int pointNr = 0;
+    private Color fColor = null; //new Color(255,222,165,64);
+    private Color color = new Color(255, 0, 0); //Color(255,214,132,255);
+
+    public LineString() {
+        super();
+    }
+
+    public void add(Point2D pt) {
+        pointNr++;
+        super.add(pt);
+    }
+
+    public void remove(int i) {
+        getData().remove(i);
+    }
+
+    public Color c() {
+        return color;
+    }
+
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+
+    public Color fillColor() {
+        return fColor;
+    }
+
+    public Color fillColor(Color c) {
+        fColor = c;
+
+        return fColor;
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        Vector saveLine = data;
+
+        data = new Vector();
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < saveLine.size(); i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) saveLine.get(i), ptDest);
+            data.add(ptDest);
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+
+    public void draw(Graphics2D g, ViewPortData vp) {
+        AffineTransform msave = g.getTransform();
+        g.setTransform(vp.mat);
+
+        // relleno el marco si es preciso
+        if (fillColor() != null) {
+            g.setColor(fillColor());
+
+            //			outPol.fill(g);
+        }
+
+        // pinto el marco si es preciso
+        g.setColor(c());
+        drawLine2D(g, data);
+        g.setTransform(msave);
+    }
+
+    void drawLine2D(Graphics2D g, Vector v) {
+        Point2D pt = null;
+        Point2D pt1 = null;
+        Iterator iter = v.iterator();
+
+        while (iter.hasNext()) {
+            pt1 = (Point2D) iter.next();
+
+            if (pt != null) {
+                g.draw(new Line2D.Double(pt, pt1));
+            }
+
+            pt = pt1;
+        }
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Polygon3D.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Polygon3D.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Polygon3D.java	(revision 1291)
@@ -0,0 +1,60 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import org.gvsig.dxf.geo.Point3D;
+
+
+/**
+ * @author jmorell
+ */
+public class Polygon3D extends Polygon {
+    public Polygon3D() {
+        super();
+    }
+
+    public boolean is3D() {
+        return true;
+    }
+    
+    public void add(Point3D pt) {
+        pointNr++;
+
+        if (outer) {
+            outPol.addPoint(pt);
+        } else {
+            inPol.addPoint(pt);
+        }
+
+        extent.add(pt);
+    }
+
+    public Point3D getPoint3D(int i) {
+        if (outer) {
+            return (Point3D) outPol.get(i);
+        }
+
+        return (Point3D) inPol.get(i);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/package.html
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/package.html	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/package.html	(revision 1291)
@@ -0,0 +1,4 @@
+<html>
+	<body>Dxf: Clases para el acceso al formato gml.
+</body>
+</html>
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Point3D.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Point3D.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/Point3D.java	(revision 1291)
@@ -0,0 +1,43 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+
+/**
+ * @author jmorell
+ */
+public class Point3D extends Point {
+    public Point3D() {
+        super();
+    }
+
+    public void add(org.gvsig.dxf.geo.Point3D pt) {
+        pointNr++;
+        super.add(pt);
+    }
+
+    public org.gvsig.dxf.geo.Point3D getPoint3D(int i) {
+        return (org.gvsig.dxf.geo.Point3D) data.get(i);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/MultiPolygon.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/MultiPolygon.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/MultiPolygon.java	(revision 1291)
@@ -0,0 +1,36 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+
+/**
+ * Geometr�a de tipo MultiPolygon.
+ * Permite guardar un conjunto de poligonos en unas sola geometr�a.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class MultiPolygon extends MultiGeometry {
+    public MultiPolygon() {
+        super();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/InsPoint.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/InsPoint.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/InsPoint.java	(revision 1291)
@@ -0,0 +1,269 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.Line2D;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.gvsig.dxf.geo.Point3D;
+
+/**
+ * Punto de inserci�n. Se trata de un Point al que se le han a�adido los atributos
+ * necesarios para hacer referencia a un conjunto de objetos gr�ficos o bloque.
+ * Las funciones de gesti�n de bloques estan basadas en la clase DxfInsert.
+ * @author jmorell
+ */
+public class InsPoint extends Geometry {
+    public static int pointNr = 0;
+    public String text = null;
+    String blockName;
+    Point3D scaleFactor;
+    double rotAngle;
+    private FeatureCollection block = new FeatureCollection(proj);
+    Vector blkList;
+    boolean blockFound = false;
+    private Color fColor = null; //new Color(255,222,165,64);
+    private Color color = new Color(255, 0, 0); //Color(255,214,132,255);
+    
+    /**
+     * Constructor de la clase.
+     */
+    public InsPoint() {
+        super();
+    }
+    
+    /**
+     * Permite a�adir un punto.
+     * @param pt, Punto.
+     */
+    public void add(Point2D pt) {
+        pointNr++;
+        super.add(pt);
+    }
+    
+    /**
+     * Devuelve el �ngulo de rotaci�n que se aplica al bloque.
+     * @return double. �ngulo de rotaci�n.
+     */
+    public double getRotAngle() {
+        return rotAngle;
+    }
+    
+    /**
+     * Devuelve el factor de escala que se aplica al bloque.
+     * @return Point3D. Contiene el factor de escala en X, en Y y en Z.
+     */
+    public Point3D getScaleFactor() {
+        return scaleFactor;
+    }
+    
+    /**
+     * Devuelve la lista de bloques.
+     * @return Vector, la lista de bloques.
+     */
+    public Vector getBlkList() {
+        return blkList;
+    }
+    
+    /**
+     * Informa sobre si el bloque ya ha sido encontrado.
+     * @return boolean, true si el bloque ya ha sido encontrado.
+     */
+    public boolean getBlockFound() {
+        return blockFound;
+    }
+    
+    /**
+     * Establece el bloque al que hace referencia este punto de inserci�n.
+     * @param block, bloque.
+     */
+    public void setBlock(FeatureCollection block) {
+        this.block = block;
+    }
+    
+    /**
+     * Establece si el bloque ya ha sido encontrado.
+     * @param found, true si el bloque ya ha sido encontrado.
+     */
+    public void setBlockFound(boolean found) {
+        blockFound = found;
+    }
+    
+    /**
+     * Establece la lista de bloques.
+     * @param blkList, Vector con la lista de bloques.
+     */
+    public void setBlkList(Vector blkList) {
+        this.blkList = blkList;
+    }
+    
+    /**
+     * Devuelve el bloque al que hace referencia el punto de inserci�n.
+     * @return FeatureCollection, el bloque.
+     */
+    public FeatureCollection getBlock() {
+        return block;
+    }
+    
+    /**
+     * Establece el nombre del bloque.
+     * @param blockName, nombre del bloque.
+     */
+    public void setBlockName(String blockName) {
+        this.blockName = blockName;
+    }
+    
+    /**
+     * Devuelve el nombre del bloque al que hace referencia el punto de inserci�n.
+     * @return String, nombre del bloque.
+     */
+    public String getBlockName() {
+        return blockName;
+    }
+    
+    /**
+     * Establece el factor de escala para el bloque.
+     * @param scaleFactor, factor de escala en X, en Y y en Z.
+     */
+    public void setScaleFactor(Point3D scaleFactor) {
+        this.scaleFactor = scaleFactor;
+    }
+    
+    /**
+     * Establece el �ngulo de rotaci�n para el bloque.
+     * @param rotAngle, �ngulo de rotaci�n.
+     */
+    public void setRotAngle(double rotAngle) {
+        this.rotAngle = rotAngle;
+    }
+    
+    /**
+     * M�todo para cargar el bloque al que hace referencia el punto de inserci�n, en el
+     * propio InsPoint.
+     * @param blockName, nombre del bloque que estamos buscando.
+     * @return boolean, true si hemos encontrado el bloque que buscabamos y ha sido
+     * cargado.
+     */
+    public boolean encuentraBloque(String blockName) {
+        int i = 0;
+
+        while ((i < blkList.size()) && (blockFound == false)) {
+            if (((FeatureCollection) blkList.get(i)).getProp("blockName")
+                     .equals(blockName)) {
+                block = (FeatureCollection) blkList.get(i);
+                blockFound = true;
+            } else {
+                blockFound = false;
+            }
+
+            i++;
+        }
+
+        return blockFound;
+    }
+    
+    /**
+     * Devuelve el color del punto de inserci�n.
+     * @return Color
+     */
+    public Color c() {
+        return color;
+    }
+    
+    /**
+     * Establece el color del punto de inserci�n.
+     * @param color
+     * @return Color
+     */
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+    
+    /**
+     * Devuelve el color del relleno.
+     * @return Color
+     */
+    public Color fillColor() {
+        return fColor;
+    }
+    
+    /**
+     * Establece el color de relleno.
+     * @param c, color.
+     * @return Color
+     */
+    public Color fillColor(Color c) {
+        fColor = c;
+
+        return fColor;
+    }
+    
+    /**
+     * Devuelve la proyecci�n cartogr�fica en la que se encuentra el InsPoint.
+     * @return IProjection, proyecci�n cartogr�fica.
+     */
+    public IProjection getProjection() {
+        return proj;
+    }
+    
+    /**
+     * Establece la proyecci�n cartogr�fica en la que se encuentra el InsPoint.
+     * @param p, proyecci�n cartogr�fica.
+     */
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+    
+    /**
+     * Permite cambiar la proyecci�n cartogr�fica del InsPoint a trav�s de unas
+     * coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        // TODO metodo reProject pendiente de implementar
+    }
+    
+    /**
+     * Permite dibujar el InsPoint.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        g.setColor(c());
+
+        Point2D pt = new Point2D.Double(0D, 0D);
+        vp.mat.transform((Point2D) data.get(0), pt);
+        g.draw(new Line2D.Double(pt, pt));
+
+        if (text != null) {
+            g.drawString(text, (int) pt.getX(), (int) pt.getY());
+        }
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/LineString3D.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/LineString3D.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/gml/LineString3D.java	(revision 1291)
@@ -0,0 +1,45 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.gml;
+
+import org.gvsig.dxf.geo.Point3D;
+
+
+/**
+ * @author jmorell
+ */
+public class LineString3D extends LineString {
+    public LineString3D() {
+        super();
+    }
+
+    public void add(Point3D pt) {
+        pointNr++;
+        super.add(pt);
+    }
+
+    public Point3D getPoint3D(int i) {
+        return (Point3D) data.get(i);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/Drawable.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/Drawable.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/Drawable.java	(revision 1291)
@@ -0,0 +1,35 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+
+//import java.awt.geom.AffineTransform;
+import java.awt.Graphics2D;
+
+import org.cresques.geo.ViewPortData;
+
+
+public interface Drawable {
+    public void draw(Graphics2D g, ViewPortData vp);
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxContour.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxContour.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxContour.java	(revision 1291)
@@ -0,0 +1,253 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+import java.awt.Color;
+import java.awt.FontMetrics;
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.geo.Polygon2D;
+import org.gvsig.dxf.geo.cover.Hoja;
+import org.gvsig.dxf.io.DxfGroupVector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class PxContour extends PxObj implements Projected {
+	private static Logger logger = LoggerFactory.getLogger(PxContour.class);
+
+    final static Color colorBase = new Color(0, 64, 128, 255); //Color(255,214,132,255);
+    final static Color fColorBase = new Color(64, 128, 192, 255); //Color(255,222,165,64);
+    IProjection proj = null;
+    protected String name;
+    protected String fName;
+    private Color fColor = fColorBase;
+    private Color pc = colorBase;
+    private Polygon2D polygon = null;
+
+    public PxContour(Extent e, String fName, String name, IProjection proj) {
+        this.fName = fName;
+        this.name = name;
+        this.proj = proj;
+
+        Point2D[] v = new Point2D[4];
+        v[0] = proj.createPoint(e.minX(), e.minY());
+        v[1] = proj.createPoint(e.maxX(), e.minY());
+        v[2] = proj.createPoint(e.maxX(), e.maxY());
+        v[3] = proj.createPoint(e.minX(), e.maxY());
+        setContour(v);
+    }
+
+    public PxContour(Hoja h) {
+        name = h.getCode();
+        setContour(h.getVertex());
+    }
+
+    public PxContour(Point2D[] v, String name) {
+        this.name = name;
+        setContour(v);
+    }
+
+    public void _PxContour(Point2D pt1, Point2D pt2, String fName, String name) {
+        this.fName = fName;
+        this.name = name;
+        extent = new Extent(pt1, pt2);
+    }
+
+    public void _PxContour(Point2D[] v, String fName, String name) {
+        this.fName = fName;
+        this.name = name;
+        setContour(v);
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    private void setContour(Point2D[] v) {
+        extent = new Extent();
+        polygon = new Polygon2D();
+
+        for (int i = 0; i < v.length; i++) {
+            polygon.addPoint(v[i]);
+            extent.add(v[i]);
+        }
+    }
+
+    /**
+     * Vertices de un contorno.
+     * @return
+     */
+    public Vector getVertex() {
+        return polygon;
+    }
+
+    public Point2D[] getPtList() {
+        Point2D[] v = new Point2D[polygon.size()];
+
+        for (int i = 0; i < polygon.size(); i++)
+            v[i] = (Point2D) polygon.get(i);
+
+        return v;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Color c() {
+        return pc;
+    }
+
+    public Color c(Color color) {
+        this.pc = color;
+
+        return pc;
+    }
+
+    public Color fillColor() {
+        return fColor;
+    }
+
+    public Color fillColor(Color c) {
+        fColor = c;
+
+        return fColor;
+    }
+
+    public void setColor(Color color) {
+        pc = color;
+    }
+
+    public Color getColor() {
+        return pc;
+    }
+
+    public void setFillColor(Color color) {
+        fColor = color;
+    }
+
+    public Color getFillColor() {
+        return fColor;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        Polygon2D savePol = polygon;
+
+        polygon = new Polygon2D();
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePol.size(); i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) savePol.get(i), ptDest);
+            polygon.addPoint(ptDest);
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+
+    public void draw(Graphics2D g, ViewPortData vp, ICoordTrans rp) {
+        IProjection saveProj = proj;
+        Polygon2D savePol = polygon;
+        Extent saveExt = extent;
+
+        reProject(rp);
+        draw(g, vp);
+
+        polygon = savePol;
+        extent = saveExt;
+        proj = saveProj;
+    }
+
+    public void draw(Graphics2D g, ViewPortData vp) {
+        //AffineTransform msave=g.getTransform();
+        //g.setTransform(vp.mat);
+        // relleno el marco si es preciso
+        if (fColor != null) {
+            g.setColor(fColor);
+
+            if (polygon == null) {
+                g.fillRect((int) extent.minX(), (int) extent.minY(),
+                           (int) extent.width(), (int) extent.height());
+            } else {
+                polygon.fill(g, vp);
+            }
+        }
+
+        // pinto el marco si es preciso
+        if (pc != null) {
+            g.setColor(pc);
+        }
+
+        if (polygon != null) {
+            polygon.draw(g, vp);
+        } else {
+            g.drawRect((int) extent.minX(), (int) extent.minY(),
+                       (int) extent.width(), (int) extent.height());
+        }
+
+        //g.setTransform(msave);
+        // Pinto el name
+        FontMetrics fm = g.getFontMetrics();
+        int w = fm.stringWidth(name);
+        int h = fm.getAscent();
+        Point2D.Double pt = new Point2D.Double((extent.minX() +
+                                               (extent.width() / 2.0)),
+                                               (extent.minY() +
+                                               (extent.height() / 2.0)));
+
+        try {
+            Point2D.Double min = new Point2D.Double(extent.minX(), extent.minY());
+            Point2D.Double max = new Point2D.Double(extent.maxX(), extent.minY());
+            vp.mat.transform(min, min);
+            vp.mat.transform(max, max);
+
+            if ((max.getX() - min.getX()) < w) {
+                return;
+            }
+
+            vp.mat.transform(pt, pt);
+
+            //if ((int)(pt2.getY()-pt1.getY()) >= g.getFontMetrics().getAscent())
+            g.drawString(name, (int) pt.getX() - (w / 2),
+                         (int) pt.getY() + (h / 2));
+        } catch (Exception e) {
+        	logger.warn("Error drawing", e);
+        }
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxPoint.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxPoint.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxPoint.java	(revision 1291)
@@ -0,0 +1,55 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+
+public class PxPoint implements IPoint {
+    private int px = 0;
+    private int py = 0;
+
+    public PxPoint(int x, int y) {
+        this.px = x;
+        this.py = y;
+    }
+
+    public int x() {
+        return px;
+    }
+
+    public int x(int x) {
+        px = x;
+
+        return px;
+    }
+
+    public int y() {
+        return py;
+    }
+
+    public int y(int y) {
+        py = y;
+
+        return py;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfHeaderVariables.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfHeaderVariables.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfHeaderVariables.java	(revision 1291)
@@ -0,0 +1,103 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+
+
+/**
+ * Definici�n de las variables que definen un DXF. Estas variables est�n
+ * establecidas en la secci�n HEADER del propio fichero DXF.
+ * @author jmorell (jose.morell@gmail.com)
+ * @version 15-dic-2004
+ */
+public class DxfHeaderVariables {
+    private String acadVersion;
+    private String acadMaintVer;
+    private boolean writedDxf3D;
+    private double minZFromHeader;
+    private double maxZFromHeader;
+
+    /**
+     * Constructor de DxfHeaderVariables.
+     */
+    public DxfHeaderVariables() {
+    }
+
+    /**
+     * Devuelve la versi�n del fichero DXF.
+     * @return String
+     */
+    public String getAcadVersion() {
+        return acadVersion;
+    }
+
+    /**
+     * Establece la versi�n del fichero DXF.
+     * @param acadVersion
+     */
+    public void setAcadVersion(String acadVersion) {
+        this.acadVersion = acadVersion;
+    }
+
+    /**
+     * Transforma la nomenclatura interna de versiones de ficheros DXF en la
+     * nomenclatura habitual de versiones de AutoCAD.
+     * @param codedVersion, versi�n seg�n la nomenclatura interna.
+     * @return String con la versi�n en la nomenclatura m�s habitual.
+     */
+    public String decodeAcadVersion(String codedVersion) {
+        if (codedVersion.equals("AC1006")) {
+            return new String("R10");
+        } else if (codedVersion.equals("AC1009")) {
+            return new String("R11&R12");
+        } else if (codedVersion.equals("AC1012")) {
+            return new String("R13");
+        } else if (codedVersion.equals("AC1014")) {
+            return new String("R14");
+        } else if (codedVersion.equals("AC1015")) {
+            return new String("ACAD2000");
+        } else if (codedVersion.equals("AC1018")) {
+            return new String("ACAD2004");
+        } else {
+            return new String("Unknown codedVersion");
+        }
+    }
+    
+    public boolean isWritedDxf3D() {
+        // si los ext son como los escribimos devolver true
+        writedDxf3D = false;
+        double z1 = minZFromHeader;
+        double z2 = maxZFromHeader;
+        if (z1==999999999.0 && z2==-999999999.0) writedDxf3D = true;
+        return writedDxf3D;
+    }
+    
+    public void loadMinZFromHeader(double d) {
+        minZFromHeader = d;
+    }
+    
+    public void loadMaxZFromHeader(double d) {
+        maxZFromHeader = d;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCalXtru.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCalXtru.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCalXtru.java	(revision 1291)
@@ -0,0 +1,131 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import org.gvsig.dxf.geo.Point3D;
+
+/**
+ * La clase DxfCalXtru se emplea para aplicar los par�metros de extrusi�n de las
+ * entidades de un DXF. Esta transformaci�n provoca alteraciones en las coordenadas de
+ * estos elementos.
+ * @author jmorell
+ */
+public class DxfCalXtru {
+    
+    /**
+     * Aplica a un punto en 3D sus correspondientes par�metros de extrusi�n.
+     * @param coord_in, punto antes de aplicar la extrusi�n.
+     * @param xtru, par�metros de extrusi�n en X, en Y y en Z.
+     * @return Point3D, punto 3D afectado de extrusi�n.
+     */
+    public static Point3D CalculateXtru(Point3D coord_in, Point3D xtru) {
+        Point3D coord_out = new Point3D();
+
+        double dxt0 = 0D;
+        double dyt0 = 0D;
+        double dzt0 = 0D;
+        double dvx1;
+        double dvx2;
+        double dvx3;
+        double dvy1;
+        double dvy2;
+        double dvy3;
+        double dmod;
+        double dxt;
+        double dyt;
+        double dzt;
+
+        double aux = 1D / 64D; //LWS
+        double aux1 = Math.abs(xtru.getX());
+        double aux2 = Math.abs(xtru.getY());
+
+        dxt0 = coord_in.getX();
+        dyt0 = coord_in.getY();
+        dzt0 = coord_in.getZ();
+
+        double xtruX;
+        double xtruY;
+        double xtruZ;
+        xtruX = xtru.getX();
+        xtruY = xtru.getY();
+        xtruZ = xtru.getZ();
+
+        if ((aux1 < aux) && (aux2 < aux)) {
+            dmod = Math.sqrt((xtruZ * xtruZ) + (xtruX * xtruX));
+            dvx1 = xtruZ / dmod;
+            dvx2 = 0;
+            dvx3 = -xtruX / dmod;
+        } else {
+            dmod = Math.sqrt((xtruY * xtruY) + (xtruX * xtruX));
+            dvx1 = -xtruY / dmod;
+            dvx2 = xtruX / dmod;
+            dvx3 = 0;
+        }
+
+        dvy1 = (xtruY * dvx3) - (xtruZ * dvx2);
+        dvy2 = (xtruZ * dvx1) - (xtruX * dvx3);
+        dvy3 = (xtruX * dvx2) - (xtruY * dvx1);
+
+        dmod = Math.sqrt((dvy1 * dvy1) + (dvy2 * dvy2) + (dvy3 * dvy3));
+
+        dvy1 = dvy1 / dmod;
+        dvy2 = dvy2 / dmod;
+        dvy3 = dvy3 / dmod;
+
+        dxt = (dvx1 * dxt0) + (dvy1 * dyt0) + (xtruX * dzt0);
+        dyt = (dvx2 * dxt0) + (dvy2 * dyt0) + (xtruY * dzt0);
+        dzt = (dvx3 * dxt0) + (dvy3 * dyt0) + (xtruZ * dzt0);
+
+        coord_out.setLocation(dxt, dyt, dzt);
+
+        //coord_out.z = dzt;
+        dxt0 = 0;
+        dyt0 = 0;
+        dzt0 = 0;
+
+        return coord_out;
+    }
+    
+    /**
+     * Devuelve el coseno de un �ngulo introducido en grados sexagesimales.
+     * @param alfa, �ngulo.
+     * @return double, valor del coseno.
+     */
+    public static double cosDeg(double alfa) {
+        final double toRad = Math.PI / (double) 180.0;
+
+        return Math.cos(alfa * toRad);
+    }
+    
+    /**
+     * Devuelve el seno de un �ngulo introducido en grados sexagesimales.
+     * @param alfa, �ngulo.
+     * @return double, valor del seno.
+     */
+    public static double sinDeg(double alfa) {
+        final double toRad = Math.PI / (double) 180.0;
+
+        return Math.sin(alfa * toRad);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfHeaderManager.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfHeaderManager.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfHeaderManager.java	(revision 1291)
@@ -0,0 +1,82 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import org.gvsig.dxf.io.DxfFile;
+import org.gvsig.dxf.io.DxfGroupVector;
+
+
+/**
+ * La clase DxfHeaderManager gestiona las variables definidas en la secci�n HEADER de
+ * un fichero DXF.
+ * @author jmorell (jose.morell@gmail.com)
+ * @version 15-dic-2004
+ */
+public class DxfHeaderManager implements DxfFile.VarSettings {
+    private DxfHeaderVariables dxfHeadVars;
+
+    /**
+     * Constructor sin par�metros. Inicializa el vector de variables que
+     * caracterizan un DXF.
+     */
+    public DxfHeaderManager() {
+        dxfHeadVars = new DxfHeaderVariables();
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.VarSettings#getDxfHeaderVars()
+     */
+    public DxfHeaderVariables getDxfHeaderVars() {
+        return dxfHeadVars;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.VarSettings#setAcadVersion(org.cresques.io.DxfGroupVector)
+     */
+    public void setAcadVersion(DxfGroupVector v) throws Exception {
+        if (v.hasCode(1)) {
+            String codedVersion = new String(v.getDataAsString(1));
+            dxfHeadVars.setAcadVersion(dxfHeadVars.decodeAcadVersion(codedVersion));
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.VarSettings#getAcadVersion()
+     */
+    public String getAcadVersion() {
+        return dxfHeadVars.getAcadVersion();
+    }
+
+    public boolean isWritedDxf3D() {
+        return dxfHeadVars.isWritedDxf3D();
+    }
+
+    public void loadMinZFromHeader(double d) {
+        dxfHeadVars.loadMinZFromHeader(d);
+    }
+
+    public void loadMaxZFromHeader(double d) {
+        dxfHeadVars.loadMaxZFromHeader(d);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/Unicode.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/Unicode.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/Unicode.java	(revision 1291)
@@ -0,0 +1,452 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ * 
+ * Copyright (C) 2004-5. 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ * 
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+/**
+ * La clase Unicode permite convertir textos Unicode en textos codificados seg�n la
+ * especificaci�n DOS437.
+ * @author jmorell
+ */
+class Unicode {
+    static final char UCNONE = 65535;
+    static final char unicode[][] = {
+        {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\177', '\200', '\201', 
+            '\202', '\203', '\204', '\205', '\206', '\207', '\210', '\211', '\212', '\213', 
+            '\214', '\215', '\216', '\217', '\220', '\221', '\222', '\223', '\224', '\225', 
+            '\226', '\227', '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', 
+            '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', '\250', '\251', 
+            '\252', '\253', '\254', '\255', '\256', '\257', '\260', '\261', '\262', '\263', 
+            '\264', '\265', '\266', '\267', '\270', '\271', '\272', '\273', '\274', '\275', 
+            '\276', '\277', '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', 
+            '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', '\320', '\321', 
+            '\322', '\323', '\324', '\325', '\326', '\327', '\330', '\331', '\332', '\333', 
+            '\334', '\335', '\336', '\337', '\340', '\341', '\342', '\343', '\344', '\345', 
+            '\346', '\347', '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', 
+            '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', '\370', '\371', 
+            '\372', '\373', '\374', '\375', '\376', '\377'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\177', '\200', '\201', 
+            '\202', '\203', '\204', '\205', '\206', '\207', '\210', '\211', '\212', '\213', 
+            '\214', '\215', '\216', '\217', '\220', '\221', '\222', '\223', '\224', '\225', 
+            '\226', '\227', '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', 
+            '\240', '\u0104', '\u02D8', '\u0141', '\244', '\u013D', '\u015A', '\247', '\250', '\u0160', 
+            '\u015E', '\u0164', '\u0179', '\255', '\u017D', '\u017B', '\260', '\u0105', '\u02DB', '\u0142', 
+            '\264', '\u013E', '\u015B', '\u02C7', '\270', '\u0161', '\u015F', '\u0165', '\u017A', '\u02DD', 
+            '\u017E', '\u017C', '\u0154', '\301', '\302', '\u0102', '\304', '\u0139', '\u0106', '\307', 
+            '\u010C', '\311', '\u0118', '\313', '\u011A', '\315', '\316', '\u010E', '\u0110', '\u0143', 
+            '\u0147', '\323', '\324', '\u0150', '\326', '\327', '\u0158', '\u016E', '\332', '\u0170', 
+            '\334', '\335', '\u0162', '\337', '\u0155', '\341', '\342', '\u0103', '\344', '\u013A', 
+            '\u0107', '\347', '\u010D', '\351', '\u0119', '\353', '\u011B', '\355', '\356', '\u010F', 
+            '\u0111', '\u0144', '\u0148', '\363', '\364', '\u0151', '\366', '\367', '\u0159', '\u016F', 
+            '\372', '\u0171', '\374', '\375', '\u0163', '\u02D9'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\307', '\374', 
+            '\351', '\342', '\344', '\340', '\345', '\347', '\352', '\353', '\350', '\357', 
+            '\356', '\354', '\304', '\305', '\311', '\346', '\306', '\364', '\366', '\362', 
+            '\373', '\371', '\377', '\326', '\334', '\242', '\243', '\245', '\u20A7', '\u0192', 
+            '\341', '\355', '\363', '\372', '\361', '\321', '\252', '\272', '\277', '\u2310', 
+            '\254', '\275', '\274', '\241', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\u2561', '\u2562', '\u2556', '\u2555', '\u2563', '\u2551', '\u2557', '\u255D', '\u255C', 
+            '\u255B', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\u255E', '\u255F', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\u2567', '\u2568', '\u2564', 
+            '\u2565', '\u2559', '\u2558', '\u2552', '\u2553', '\u256B', '\u256A', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\u258C', '\u2590', '\u2580', '\u03B1', '\337', '\u0393', '\u03C0', '\u03A3', '\u03C3', 
+            '\265', '\u03C4', '\u03A6', '\u0398', '\u03A9', '\u03B4', '\u221E', '\u03C6', '\u03B5', '\u2229', 
+            '\u2261', '\261', '\u2265', '\u2264', '\u2320', '\u2321', '\367', '\u2248', '\260', '\u2219', 
+            '\267', '\u221A', '\u207F', '\262', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\307', '\374', 
+            '\351', '\342', '\344', '\340', '\345', '\347', '\352', '\353', '\350', '\357', 
+            '\356', '\354', '\304', '\305', '\311', '\346', '\306', '\364', '\366', '\362', 
+            '\373', '\371', '\377', '\326', '\334', '\370', '\243', '\330', '\327', '\u0192', 
+            '\341', '\355', '\363', '\372', '\361', '\321', '\252', '\272', '\277', '\256', 
+            '\254', '\275', '\274', '\241', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\301', '\302', '\300', '\251', '\u2563', '\u2551', '\u2557', '\u255D', '\242', 
+            '\245', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\343', '\303', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\244', '\360', '\320', 
+            '\312', '\313', '\310', '\u0131', '\315', '\316', '\317', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\246', '\314', '\u2580', '\323', '\337', '\324', '\322', '\365', '\325', 
+            '\265', '\376', '\336', '\332', '\333', '\331', '\375', '\335', '\257', '\264', 
+            '\255', '\261', '\u2017', '\276', '\266', '\247', '\367', '\270', '\260', '\250', 
+            '\267', '\271', '\263', '\262', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\307', '\374', 
+            '\351', '\342', '\344', '\u016F', '\u0107', '\347', '\u0142', '\353', '\u0150', '\u0151', 
+            '\356', '\u0179', '\304', '\u0106', '\311', '\u0139', '\u013A', '\364', '\366', '\u013D', 
+            '\u013E', '\u015A', '\u015B', '\326', '\334', '\u0164', '\u0165', '\u0141', '\327', '\u010D', 
+            '\341', '\355', '\363', '\372', '\u0104', '\u0105', '\u017D', '\u017E', '\u0118', '\u0119', 
+            '\254', '\u017A', '\u010C', '\u015F', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\301', '\302', '\u011A', '\u015E', '\u2563', '\u2551', '\u2557', '\u255D', '\u017B', 
+            '\u017C', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\u0102', '\u0103', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\244', '\u0111', '\u0110', 
+            '\u010E', '\313', '\u010F', '\u0147', '\315', '\316', '\u011B', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\u0162', '\u016E', '\u2580', '\323', '\337', '\324', '\u0143', '\u0144', '\u0148', 
+            '\u0160', '\u0161', '\u0154', '\332', '\u0155', '\u0170', '\375', '\335', '\u0163', '\264', 
+            '\255', '\u02DD', '\u02DB', '\u02C7', '\u02D8', '\247', '\367', '\270', '\260', '\250', 
+            '\u02D9', '\u0171', '\u0158', '\u0159', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\u0452', '\u0402', 
+            '\u0453', '\u0403', '\u0451', '\u0401', '\u0454', '\u0404', '\u0455', '\u0405', '\u0456', '\u0406', 
+            '\u0457', '\u0407', '\u0456', '\u0408', '\u0459', '\u0409', '\u045A', '\u040A', '\u045B', '\u040B', 
+            '\u045C', '\u040C', '\u045E', '\u040E', '\u045F', '\u040F', '\u044E', '\u042E', '\u044A', '\u042A', 
+            '\u0430', '\u0410', '\u0431', '\u0411', '\u0446', '\u0426', '\u0434', '\u0414', '\u0435', '\u0415', 
+            '\u0444', '\u0424', '\u0433', '\u0413', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\u0445', '\u0425', '\u0438', '\u0418', '\u2563', '\u2551', '\u2557', '\u255D', '\u0439', 
+            '\u0419', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\u043A', '\u041A', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\244', '\u043B', '\u041B', 
+            '\u043C', '\u041C', '\u043D', '\u041D', '\u043E', '\u041E', '\u043F', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\u041F', '\u044F', '\u2580', '\u042F', '\u0440', '\u0420', '\u0441', '\u0421', '\u0442', 
+            '\u0422', '\u0443', '\u0423', '\u0436', '\u0416', '\u0432', '\u0412', '\u044C', '\u042C', '\u2116', 
+            '\255', '\u044B', '\u042B', '\u0437', '\u0417', '\u0448', '\u0428', '\u044D', '\u042D', '\u0449', 
+            '\u0429', '\u0447', '\u0427', '\uFFFF', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\307', '\374', 
+            '\351', '\342', '\344', '\340', '\345', '\347', '\352', '\353', '\350', '\357', 
+            '\356', '\u0131', '\304', '\305', '\311', '\346', '\306', '\364', '\366', '\362', 
+            '\373', '\371', '\u0130', '\326', '\334', '\370', '\243', '\330', '\u015E', '\u015F', 
+            '\341', '\355', '\363', '\372', '\361', '\321', '\u011E', '\u011F', '\277', '\256', 
+            '\254', '\275', '\274', '\241', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\301', '\302', '\300', '\251', '\u2563', '\u2551', '\u2557', '\u255D', '\242', 
+            '\245', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\343', '\303', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\244', '\272', '\252', 
+            '\312', '\313', '\310', '\uFFFF', '\315', '\316', '\317', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\246', '\314', '\u2580', '\323', '\337', '\324', '\322', '\365', '\325', 
+            '\265', '\uFFFF', '\327', '\332', '\333', '\331', '\354', '\377', '\257', '\264', 
+            '\255', '\261', '\uFFFF', '\276', '\266', '\247', '\367', '\270', '\260', '\250', 
+            '\267', '\271', '\263', '\262', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\307', '\374', 
+            '\351', '\342', '\343', '\340', '\301', '\347', '\352', '\312', '\350', '\315', 
+            '\324', '\354', '\303', '\302', '\311', '\300', '\310', '\364', '\365', '\362', 
+            '\332', '\371', '\314', '\325', '\334', '\242', '\243', '\331', '\u20A7', '\323', 
+            '\341', '\355', '\363', '\372', '\361', '\321', '\252', '\272', '\277', '\322', 
+            '\254', '\275', '\274', '\241', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\u2561', '\u2562', '\u2556', '\u2555', '\u2563', '\u2551', '\u2557', '\u255D', '\u255C', 
+            '\u255B', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\u255E', '\u255F', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\u2567', '\u2568', '\u2564', 
+            '\u2565', '\u2559', '\u2558', '\u2552', '\u2553', '\u256B', '\u256A', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\u258C', '\u2590', '\u2580', '\u03B1', '\337', '\u0393', '\u03C0', '\u03A3', '\u03C3', 
+            '\265', '\u03C4', '\u03A6', '\u0398', '\u03A9', '\u03B4', '\u221E', '\u03C6', '\u03B5', '\u2229', 
+            '\u2261', '\261', '\u2265', '\u2264', '\u2320', '\u2321', '\367', '\u2248', '\260', '\u2219', 
+            '\267', '\u221A', '\u207F', '\262', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\307', '\374', 
+            '\351', '\342', '\343', '\340', '\345', '\347', '\352', '\353', '\350', '\320', 
+            '\360', '\336', '\304', '\305', '\311', '\346', '\306', '\364', '\366', '\376', 
+            '\373', '\335', '\375', '\326', '\334', '\370', '\243', '\330', '\u20A7', '\u0192', 
+            '\341', '\355', '\363', '\372', '\301', '\315', '\323', '\332', '\277', '\u2310', 
+            '\254', '\275', '\274', '\241', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\u2561', '\u2562', '\u2556', '\u2555', '\u2563', '\u2551', '\u2557', '\u255D', '\u255C', 
+            '\u255B', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\u255E', '\u255F', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\u2567', '\u2568', '\u2564', 
+            '\u2565', '\u2559', '\u2558', '\u2552', '\u2553', '\u256B', '\u256A', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\u258C', '\u2590', '\u2580', '\u03B1', '\337', '\u0393', '\u03C0', '\u03A3', '\u03C3', 
+            '\265', '\u03C4', '\u03A6', '\u0398', '\u03A9', '\u03B4', '\u221E', '\u03C6', '\u03B5', '\u2229', 
+            '\u2261', '\261', '\u2265', '\u2264', '\u2320', '\u2321', '\367', '\u2248', '\260', '\u2219', 
+            '\267', '\u221A', '\u207F', '\262', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\307', '\374', 
+            '\351', '\342', '\343', '\340', '\266', '\347', '\352', '\353', '\350', '\357', 
+            '\356', '\u2017', '\300', '\247', '\311', '\310', '\312', '\364', '\313', '\317', 
+            '\373', '\371', '\244', '\324', '\334', '\242', '\243', '\331', '\333', '\u0192', 
+            '\246', '\264', '\363', '\372', '\250', '\270', '\263', '\257', '\316', '\u2310', 
+            '\254', '\275', '\274', '\276', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\u2561', '\u2562', '\u2556', '\u2555', '\u2563', '\u2551', '\u2557', '\u255D', '\u255C', 
+            '\u255B', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\u255E', '\u255F', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\u2567', '\u2568', '\u2564', 
+            '\u2565', '\u2559', '\u2558', '\u2552', '\u2553', '\u256B', '\u256A', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\u258C', '\u2590', '\u2580', '\u03B1', '\337', '\u0393', '\u03C0', '\u03A3', '\u03C3', 
+            '\265', '\u03C4', '\u03A6', '\u0398', '\u03A9', '\u03B4', '\u221E', '\u03C6', '\u03B5', '\u2229', 
+            '\u2261', '\261', '\u2265', '\u2264', '\u2320', '\u2321', '\367', '\u2248', '\260', '\u2219', 
+            '\267', '\u221A', '\u207F', '\262', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\260', '\267', 
+            '\u2219', '\u221A', '\u2592', '\u2500', '\u2502', '\u253C', '\u2524', '\u252C', '\u251C', '\u2534', 
+            '\u2510', '\u250C', '\u2514', '\u2518', '\u03B2', '\u221E', '\u03C6', '\261', '\275', '\274', 
+            '\u2248', '\253', '\273', '\uFEF7', '\uFEF8', '\uFFFF', '\uFFFF', '\uFEFB', '\uFEFC', '\uFFFF', 
+            '\240', '\255', '\uFE82', '\243', '\244', '\uFE84', '\uFFFF', '\uFFFF', '\uFE8E', '\uFE8F', 
+            '\uFE95', '\uFE99', '\u060C', '\uFE9D', '\uFEA1', '\uFEA5', '\u0660', '\u0661', '\u0662', '\u0663', 
+            '\u0664', '\u0665', '\u0666', '\u0667', '\u0668', '\u0669', '\uFED1', '\u061B', '\uFEB1', '\uFEB5', 
+            '\uFEB9', '\u061F', '\242', '\uFE80', '\uFE81', '\uFE83', '\uFE85', '\uFECC', '\uFE8A', '\uFE8D', 
+            '\uFE90', '\uFE93', '\uFE96', '\uFE9A', '\uFE9E', '\uFEA2', '\uFEA6', '\uFEA9', '\uFEAB', '\uFEAD', 
+            '\uFEAF', '\uFEB2', '\uFEB6', '\uFEBA', '\uFEBE', '\uFEC1', '\uFEC5', '\uFECA', '\uFECE', '\246', 
+            '\254', '\367', '\327', '\uFEC9', '\u0640', '\uFED2', '\uFED6', '\uFEDA', '\uFEDE', '\uFEE2', 
+            '\uFEE6', '\uFEEA', '\uFEED', '\uFEEF', '\uFEF2', '\uFEBD', '\uFECB', '\uFED0', '\uFECD', '\uFEE1', 
+            '\uFE7D', '\u0651', '\uFEE5', '\uFEE9', '\uFEEB', '\uFEF0', '\uFEF4', '\uFECF', '\uFED5', '\uFEF5', 
+            '\uFEF6', '\uFEDD', '\uFED9', '\uFEF1', '\u25A0', '\uFFFF'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\307', '\374', 
+            '\351', '\342', '\344', '\340', '\265', '\347', '\352', '\353', '\350', '\357', 
+            '\356', '\354', '\304', '\305', '\311', '\346', '\306', '\364', '\366', '\362', 
+            '\373', '\371', '\377', '\326', '\334', '\370', '\243', '\330', '\u20A7', '\u0192', 
+            '\341', '\355', '\363', '\372', '\361', '\321', '\252', '\272', '\277', '\u2310', 
+            '\254', '\275', '\274', '\241', '\253', '\244', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\u2561', '\u2562', '\u2556', '\u2555', '\u2563', '\u2551', '\u2557', '\u255D', '\u255C', 
+            '\u255B', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\u255E', '\u255F', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\u2567', '\u2568', '\u2564', 
+            '\u2565', '\u2559', '\u2558', '\u2552', '\u2553', '\u256B', '\u256A', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\u258C', '\u2590', '\u2580', '\u03B1', '\337', '\u0393', '\u03C0', '\u03A3', '\u03C3', 
+            '\265', '\u03C4', '\u03A6', '\u0398', '\u03A9', '\u03B4', '\u221E', '\u03C6', '\u03B5', '\u2229', 
+            '\u2261', '\261', '\u2265', '\u2264', '\u2320', '\u2321', '\367', '\u2248', '\260', '\u2219', 
+            '\267', '\u221A', '\u207F', '\262', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\u2302', '\uFFFF', '\uFFFF', 
+            '\uFFFF', '\uFFFF', '\uFFFF', '\uFFFF', '\u0386', '\uFFFF', '\267', '\254', '\246', '\u2018', 
+            '\u2019', '\u0388', '\u2015', '\u0389', '\u038A', '\u03AA', '\u038C', '\uFFFF', '\uFFFF', '\u038E', 
+            '\u03AB', '\251', '\u038F', '\262', '\263', '\u03AC', '\243', '\u03AD', '\u03AE', '\u03AF', 
+            '\u03CA', '\u0390', '\u03CC', '\u03CD', '\u0391', '\u0392', '\u0393', '\u0394', '\u0395', '\u0396', 
+            '\u0397', '\275', '\u0398', '\u0399', '\253', '\273', '\u2591', '\u2592', '\u2593', '\u2502', 
+            '\u2524', '\u039A', '\u039B', '\u039C', '\u039D', '\u2563', '\u2551', '\u2557', '\u255D', '\u039E', 
+            '\u039F', '\u2510', '\u2514', '\u2534', '\u252C', '\u251C', '\u2500', '\u253C', '\u03A0', '\u03A1', 
+            '\u255A', '\u2554', '\u2569', '\u2566', '\u2560', '\u2550', '\u256C', '\u03A3', '\u03A4', '\u03A5', 
+            '\u03A6', '\u03A7', '\u03A8', '\u03A9', '\u03B1', '\u03B2', '\u03B3', '\u2518', '\u250C', '\u2588', 
+            '\u2584', '\u03B4', '\u03B5', '\u2580', '\u03B6', '\u03B7', '\u03B8', '\u03B9', '\u03BA', '\u03BB', 
+            '\u03BC', '\u03BD', '\u03BE', '\u03BF', '\u03C0', '\u03C1', '\u03C3', '\u03C2', '\u03C4', '\264', 
+            '\255', '\261', '\u03C5', '\u03C6', '\u03C7', '\247', '\u03C8', '\u03F4', '\260', '\250', 
+            '\u03C9', '\u03CB', '\u03B0', '\u03CE', '\u25A0', '\240'
+        }, {
+            '\0', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\b', '\t', 
+            '\n', '\013', '\f', '\r', '\016', '\017', '\020', '\021', '\022', '\023', 
+            '\024', '\025', '\026', '\027', '\030', '\031', '\032', '\033', '\034', '\035', 
+            '\036', '\037', ' ', '!', '"', '#', '$', '%', '&', '\'', 
+            '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', 
+            '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', 
+            '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 
+            'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 
+            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 
+            'Z', '[', '\\', ']', '^', '_', '`', 'a', 'b', 'c', 
+            'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 
+            'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 
+            'x', 'y', 'z', '{', '|', '}', '~', '\177', '\304', '\305', 
+            '\307', '\311', '\321', '\326', '\334', '\341', '\340', '\342', '\344', '\343', 
+            '\345', '\347', '\351', '\350', '\352', '\353', '\355', '\354', '\356', '\357', 
+            '\361', '\363', '\362', '\364', '\366', '\365', '\372', '\371', '\373', '\374', 
+            '\u2020', '\260', '\242', '\243', '\247', '\u2022', '\266', '\337', '\256', '\251', 
+            '\u2122', '\264', '\250', '\u2260', '\306', '\330', '\u221E', '\261', '\u2264', '\u2265', 
+            '\245', '\265', '\u2202', '\u2211', '\u220F', '\u03C0', '\u222B', '\252', '\272', '\u2126', 
+            '\346', '\370', '\277', '\241', '\254', '\u221A', '\u0192', '\u2248', '\u2206', '\253', 
+            '\273', '\u2026', '\240', '\300', '\303', '\325', '\u0152', '\u0153', '\u2010', '\u2014', 
+            '\u201C', '\u201D', '\u2018', '\u2019', '\367', '\u25CA', '\377', '\u0178', '\u2044', '\244', 
+            '\u2039', '\u203A', 'f', 'f', '\u2021', '\267', '\u201A', '\u201E', '\u2030', '\302', 
+            '\312', '\301', '\313', '\310', '\315', '\316', '\317', '\314', '\323', '\324', 
+            '\uFDFF', '\322', '\332', '\333', '\331', '\u0131', '\u02C6', '\u02DC', '\257', '\u02D8', 
+            '\u02D9', '\u02DA', '\270', '\u02DD', '\u02DB', '\u02C7'
+        }
+    };
+    static char unicode2DOS437[];
+    
+    /**
+     * M�todo que permite convertir textos Unicode en textos codificados seg�n la
+     * especificaci�n DOS437.
+     * @param stringbuffer, la cadena a transformar.
+     * @param i, 2 por defecto.
+     * @param c, '?' por defecto.
+     * @return
+     */
+    static String char2DOS437(StringBuffer stringbuffer, int i, char c)
+    {
+        if(unicode2DOS437 == null)
+        {
+            unicode2DOS437 = new char[0x10000];
+            for(int j = 0; j < 256; j++)
+            {
+                char c1;
+                if((c1 = unicode[2][j]) != '\uFFFF')
+                    unicode2DOS437[c1] = (char)j;
+            }
+
+        }
+        if(i != 2)
+        {
+            StringBuffer stringbuffer1 = new StringBuffer(stringbuffer.length());
+            for(int k = 0; k < stringbuffer.length(); k++)
+            {
+                char c2 = unicode2DOS437[stringbuffer.charAt(k)];
+                stringbuffer1.append(c2 == 0 ? c : c2);
+            }
+
+            return new String(stringbuffer1);
+        } else
+        {
+            return new String(stringbuffer);
+        }
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfText.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfText.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfText.java	(revision 1291)
@@ -0,0 +1,282 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad TEXT de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ * jmorell, 050406: El segundo punto es opcional.
+ */
+public class DxfText extends DxfEntity {
+    public final static int ALIGN_LEFT = 0;
+    public final static int ALIGN_CENTER = 1;
+    public final static int ALIGN_RIGHT = 2;
+    public final static int ALIGN_ALIGNED = 3;
+    public final static int ALIGN_MIDDLE = 4;
+    public final static int ALIGN_FIT = 5;
+    private String text = null;
+    Point2D[] pts;
+    private Point2D pt;
+    private double rot = 0.0;
+    private double h = 1.0;
+    int align = ALIGN_LEFT;
+    private boolean twoPointsFlag;
+
+    /**
+     * Constructor de DxfText.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfText.
+     * @param layer, capa del DXF en la que se encuentra el DxfText.
+     * @param txt, texto.
+     */
+    public DxfText(IProjection proj, DxfLayer layer, String txt) {
+        super(proj, layer);
+
+        extent = new Extent();
+        text = txt;
+        pts = new Point2D[2];
+        pt = new Point2D.Double();
+        twoPointsFlag = false;
+    }
+
+    /**
+     * Establece el punto de inserci�n del DxfText.
+     * @param pt, punto de inserci�n.
+     */
+    public void setPt(Point2D pt) {
+        this.pt = pt;
+    }
+
+    /**
+     * @return Returns the pt.
+     */
+    public Point2D getPt() {
+        return pt;
+    }
+
+    /**
+     * Establece si el texto se situa a trav�s de dos puntos de inserci�n. Estos dos
+     * puntos definir�n su orientaci�n.
+     * @param f
+     */
+    public void setTwoPointsFlag(boolean f) {
+        twoPointsFlag = f;
+    }
+
+    /**
+     * Informa sobre si el texto se situa a trav�s de dos puntos de inserci�n. Estos dos
+     * puntos definir�n su orientaci�n.
+     * @return boolean
+     */
+    public boolean getTwoPointsFlag() {
+        return twoPointsFlag;
+    }
+
+    /**
+     * Establece el primer punto de inserci�n del texto cuando este se inserta a trav�s
+     * de dos puntos de inserci�n.
+     * @param pt
+     */
+    public void setPt1(Point2D pt) {
+        pts[0] = pt;
+        extent.add(pt);
+    }
+
+    /**
+     * Obtiene el primer punto de inserci�n del texto cuando este se inserta a trav�s
+     * de dos puntos de inserci�n.
+     * @return Point2D
+     */
+    public Point2D getPt1() {
+        return pts[0];
+    }
+
+    /**
+     * Establece el segundo punto de inserci�n del texto cuando este se inserta a trav�s
+     * de dos puntos de inserci�n.
+     * @param pt
+     */
+    public void setPt2(Point2D pt) {
+        pts[1] = pt;
+        extent.add(pt);
+    }
+
+    /**
+     * Obtiene el segundo punto de inserci�n del texto cuando este se inserta a trav�s
+     * de dos puntos de inserci�n.
+     * @return Point2D
+     */
+    public Point2D getPt2() {
+        return pts[1];
+    }
+
+    /**
+     * Establece la altura del texto.
+     * @param h, altura del texto.
+     */
+    public void setHeight(double h) {
+        this.h = h;
+    }
+
+    /**
+     * Establece la inclinaci�n del texto.
+     * @param r, �ngulo de inclinaci�n del texto.
+     */
+    public void setRotation(double r) {
+        rot = r;
+    }
+
+    /**
+     * Devuelve la inclinaci�n del texto.
+     * @return double
+     */
+    public double getRotation() {
+        return rot;
+    }
+
+    /**
+     * Devuelve el texto.
+     * @return String
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * Permite reproyectar un DxfText dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Point2D[] savePts = pts;
+
+        pts = new Point2D[2];
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePts.length; i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+
+            if (savePts[i] == null) {
+                ptDest = null;
+            } else {
+                ptDest = rp.convert((Point2D) savePts[i], ptDest);
+                extent.add(ptDest);
+            }
+
+            pts[i] = ptDest;
+        }
+
+        // Reproyecto la altura del texto
+        Point2D ptOrig = rp.getPOrig().createPoint(savePts[0].getX(),
+                                                   savePts[0].getY() + h);
+        ptDest = rp.getPDest().createPoint(0D, 0D);
+        ptDest = rp.convert(ptOrig, ptDest);
+        h = ptDest.getY() - pts[0].getY();
+        setProjection(rp.getPDest());
+    }
+
+    /**
+     * Permite dibujar un DxfText.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        if (dxfColor == AcadColor.BYLAYER) {
+            g.setColor(layer.getColor());
+        } else {
+            g.setColor(AcadColor.getColor(dxfColor));
+        }
+
+        Font fntSave = g.getFont();
+        Font fnt;
+        Point2D ptT0 = new Point2D.Double(pts[0].getX(), pts[0].getY());
+        Point2D ptT1 = new Point2D.Double(pts[0].getX() + h, pts[0].getY() + h);
+        vp.mat.transform(ptT0, ptT0);
+        vp.mat.transform(ptT1, ptT1);
+        fnt = new Font(fntSave.getName(), fntSave.getStyle(),
+                       (int) (ptT1.getX() - ptT0.getX()));
+        g.setFont(fnt);
+        ptT0.setLocation(pts[0].getX(), pts[0].getY());
+        vp.mat.transform(ptT0, ptT0);
+
+        // Codigo para implementar rotacion de textos.
+        // Falta depurar.
+        /*
+        //angle = pathLen.angleAtLength(midDistance);
+        rot = Math.toRadians(rot);
+        if (rot < 0) rot = rot + 2.0*Math.PI;
+        if ((rot > (Math.PI/2)) && (rot < (3 * Math.PI /2))) rot = rot - (Math.PI/2.0);
+        rot = Math.toDegrees(rot);
+        //theLabel.setRotation(Math.toDegrees(angle));
+        AffineTransform transfRot = AffineTransform.getRotateInstance(rot, ptT0.getX(), ptT0.getY());
+        AffineTransform ant = g.getTransform();
+        g.setTransform(transfRot);*/
+        g.drawString(text, (int) ptT0.getX(), (int) ptT0.getY());
+        g.setFont(fntSave);
+
+        //g.setTransform(ant);
+    }
+    public double getHeight(){
+    	return h;
+    }
+    /**
+     * Permite la escritura de entidades DxfText en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * del DxfText.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "TEXT"));
+        
+        
+        sb.append(DxfGroup.toString(5, getHandle()));
+
+//        sb.append(DxfGroup.toString(100, "AcDbText"));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+//        sb.append(DxfGroup.toString(100, "AcDbText"));
+        sb.append(DxfGroup.toString(100, "AcDbText"));
+        sb.append(DxfGroup.toString(10, pt.getX(), 6));
+        sb.append(DxfGroup.toString(20, pt.getY(), 6));
+        sb.append(DxfGroup.toString(30, 0.0, 6));
+        sb.append(DxfGroup.toString(40, getHeight(), 6));
+        sb.append(DxfGroup.toString(1, getText()));
+        sb.append(DxfGroup.toString(50, getRotation(), 6));
+        sb.append(DxfGroup.toString(100, "AcDbText"));
+
+
+        return sb.toString();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/AcadColor.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/AcadColor.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/AcadColor.java	(revision 1291)
@@ -0,0 +1,350 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Color;
+
+
+/**
+ * Colores RGB a partir de c�digos de color de AutoCAD
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class AcadColor {
+    public final static int BYLAYER = 256;
+    public final static int BYBLOCK = 0;
+    private static AcadColor[] colores = initTable();
+    int code;
+    float r0;
+    float g0;
+    float b0;
+    int r;
+    int g;
+    int b;
+    Color color = null;
+    
+    /**
+     * Constructor de AcadColor.
+     * @param code, c�digo de color de AutoCAD.
+     * @param r0, componente de color rojo (0-1).
+     * @param g0, componente de color verde (0-1).
+     * @param b0, componente de color azul (0-1).
+     * @param r, componente de color rojo (0-255).
+     * @param g, componente de color verde (0-255).
+     * @param b, compponente de color azul (0-255).
+     */
+    public AcadColor(int code, double r0, double g0, double b0, double r,
+                     double g, double b) {
+        this.code = code;
+        this.r0 = (float) r0;
+        this.g0 = (float) g0;
+        this.b0 = (float) b0;
+        this.r = (int) r;
+        this.g = (int) g;
+        this.b = (int) b;
+        this.color = new Color(this.r, this.g, this.b);
+        colores[code] = this;
+    }
+    
+    /**
+     * Devuelve el color de java correspondiente a un c�digo de color de AutoCAD que
+     * se le pasa como argumento.
+     * @param code, c�digo de color de AutoCAD.
+     * @return Color
+     */
+    public static Color getColor(int code) {
+        return colores[code].color;
+    }
+    
+    /**
+     * Devuelve un array de objetos AcadColor que sirven de base para establecer
+     * la relaci�n entre colores de AutoCAD y colores de java.
+     * @return AcadColor[], array de objetos AcadColor con las correspondencias entre
+     * los colores de AutoCAD y los colores java.
+     */
+    public static AcadColor[] initTable() {
+        colores = new AcadColor[256];
+
+        new AcadColor(0, 0, 0, 0, 0, 0, 0);
+
+        new AcadColor(1, 1, 0, 0, 255, 0, 0);
+        new AcadColor(2, 1, 1, 0, 255, 255, 0);
+        new AcadColor(3, 0, 1, 0, 0, 255, 0);
+        new AcadColor(4, 0, 1, 1, 0, 255, 255);
+        new AcadColor(5, 0, 0, 1, 0, 0, 255);
+        new AcadColor(6, 1, 0, 1, 255, 0, 255);
+        new AcadColor(7, 0, 0, 0, 0, 0, 0);
+        new AcadColor(8, 0, 0, 0, 0, 0, 0);
+        new AcadColor(9, 0, 0, 0, 0, 0, 0);
+        new AcadColor(10, 1, 0, 0, 255, 0, 0);
+        new AcadColor(11, 1.0, 0.5, 0.5, 255.0, 127.5, 127.5);
+        new AcadColor(12, 0.65, 0, 0, 165.75, 0, 0);
+        new AcadColor(13, 0.65, 0.325, 0.325, 165.75, 82.875, 82.875);
+        new AcadColor(14, 0.5, 0, 0, 127.5, 0, 0);
+        new AcadColor(15, 0.5, 0.25, 0.25, 127.5, 63.75, 63.75);
+        new AcadColor(16, 0.3, 0, 0, 76.5, 0, 0);
+        new AcadColor(17, 0.3, 0.15, 0.15, 76.5, 38.25, 38.25);
+        new AcadColor(18, 0.15, 0, 0, 38.25, 0, 0);
+        new AcadColor(19, 0.15, 0.075, 0.075, 38.25, 19.125, 19.125);
+        new AcadColor(20, 1, 0.25, 0, 255, 63.75, 0);
+        new AcadColor(21, 1, 0.625, 0.5, 255, 159.375, 127.5);
+        new AcadColor(22, 0.65, 0.1625, 0, 165.75, 41.4375, 0);
+        new AcadColor(23, 0.65, 0.4063, 0.325, 165.75, 103.6065, 82.875);
+        new AcadColor(24, 0.5, 0.125, 0, 127.5, 31.875, 0);
+        new AcadColor(25, 0.5, 0.3125, 0.25, 127.5, 79.6875, 63.75);
+        new AcadColor(26, 0.3, 0.075, 0, 76.5, 19.125, 0);
+        new AcadColor(27, 0.3, 0.1875, 0.15, 76.5, 47.8125, 38.25);
+        new AcadColor(28, 0.15, 0.0375, 0, 38.25, 9.5625, 0);
+        new AcadColor(29, 0.15, 0.0938, 0.075, 38.25, 23.919, 19.125);
+        new AcadColor(30, 1, 0.5, 0, 255, 127.5, 0);
+        new AcadColor(31, 1, 0.75, 0.5, 255, 191.25, 127.5);
+        new AcadColor(32, 0.65, 0.325, 0, 165.75, 82.875, 0);
+        new AcadColor(33, 0.65, 0.4875, 0.325, 165.75, 124.3125, 82.875);
+        new AcadColor(34, 0.5, 0.25, 0, 127.5, 63.75, 0);
+        new AcadColor(35, 0.5, 0.375, 0.25, 127.5, 95.625, 63.75);
+        new AcadColor(36, 0.3, 0.15, 0, 76.5, 38.25, 0);
+        new AcadColor(37, 0.3, 0.225, 0.15, 76.5, 57.375, 38.25);
+        new AcadColor(38, 0.15, 0.075, 0, 38.25, 19.125, 0);
+        new AcadColor(39, 0.15, 0.1125, 0.075, 38.25, 28.6875, 19.125);
+        new AcadColor(40, 1, 0.75, 0, 255, 191.25, 0);
+        new AcadColor(41, 1, 0.875, 0.5, 255, 223.125, 127.5);
+        new AcadColor(42, 0.65, 0.4875, 0, 165.75, 124.3125, 0);
+        new AcadColor(43, 0.65, 0.5688, 0.325, 165.75, 145.044, 82.875);
+        new AcadColor(44, 0.5, 0.375, 0, 127.5, 95.625, 0);
+        new AcadColor(45, 0.5, 0.4375, 0.25, 127.5, 111.5625, 63.75);
+        new AcadColor(46, 0.3, 0.225, 0, 76.5, 57.375, 0);
+        new AcadColor(47, 0.3, 0.2625, 0.15, 76.5, 66.9375, 38.25);
+        new AcadColor(48, 0.15, 0.1125, 0, 38.25, 28.6875, 0);
+        new AcadColor(49, 0.15, 0.1313, 0.075, 38.25, 33.4815, 19.125);
+        new AcadColor(50, 1, 1, 0, 255, 255, 0);
+        new AcadColor(51, 1, 1, 0.5, 255, 255, 127.5);
+        new AcadColor(52, 0.65, 0.65, 0, 165.75, 165.75, 0);
+        new AcadColor(53, 0.65, 0.65, 0.325, 165.75, 165.75, 82.875);
+        new AcadColor(54, 0.5, 0.5, 0, 127.5, 127.5, 0);
+        new AcadColor(55, 0.5, 0.5, 0.25, 127.5, 127.5, 63.75);
+        new AcadColor(56, 0.3, 0.3, 0, 76.5, 76.5, 0);
+        new AcadColor(57, 0.3, 0.3, 0.15, 76.5, 76.5, 38.25);
+        new AcadColor(58, 0.15, 0.15, 0, 38.25, 38.25, 0);
+        new AcadColor(59, 0.15, 0.15, 0.075, 38.25, 38.25, 19.125);
+        new AcadColor(60, 0.75, 1, 0, 191.25, 255, 0);
+        new AcadColor(61, 0.875, 1, 0.5, 223.125, 255, 127.5);
+        new AcadColor(62, 0.4875, 0.65, 0, 124.3125, 165.75, 0);
+        new AcadColor(63, 0.5688, 0.65, 0.325, 145.044, 165.75, 82.875);
+        new AcadColor(64, 0.375, 0.5, 0, 95.625, 127.5, 0);
+        new AcadColor(65, 0.4375, 0.5, 0.25, 111.5625, 127.5, 63.75);
+        new AcadColor(66, 0.225, 0.3, 0, 57.375, 76.5, 0);
+        new AcadColor(67, 0.2625, 0.3, 0.15, 66.9375, 76.5, 38.25);
+        new AcadColor(68, 0.1125, 0.15, 0, 28.6875, 38.25, 0);
+        new AcadColor(69, 0.1313, 0.15, 0.075, 33.4815, 38.25, 19.125);
+        new AcadColor(70, 0.5, 1, 0, 127.5, 255, 0);
+        new AcadColor(71, 0.75, 1, 0.5, 191.25, 255, 127.5);
+        new AcadColor(72, 0.325, 0.65, 0, 82.875, 165.75, 0);
+        new AcadColor(73, 0.4875, 0.65, 0.325, 124.3125, 165.75, 82.875);
+        new AcadColor(74, 0.25, 0.5, 0, 63.75, 127.5, 0);
+        new AcadColor(75, 0.375, 0.5, 0.25, 95.625, 127.5, 63.75);
+        new AcadColor(76, 0.15, 0.3, 0, 38.25, 76.5, 0);
+        new AcadColor(77, 0.225, 0.3, 0.15, 57.375, 76.5, 38.25);
+        new AcadColor(78, 0.075, 0.15, 0, 19.125, 38.25, 0);
+        new AcadColor(79, 0.1125, 0.15, 0.075, 28.6875, 38.25, 19.125);
+        new AcadColor(80, 0.25, 1, 0, 63.75, 255, 0);
+        new AcadColor(81, 0.625, 1, 0.5, 159.375, 255, 127.5);
+        new AcadColor(82, 0.1625, 0.65, 0, 41.4375, 165.75, 0);
+        new AcadColor(83, 0.4063, 0.65, 0.325, 103.6065, 165.75, 82.875);
+        new AcadColor(84, 0.125, 0.5, 0, 31.875, 127.5, 0);
+        new AcadColor(85, 0.3125, 0.5, 0.25, 79.6875, 127.5, 63.75);
+        new AcadColor(86, 0.075, 0.3, 0, 19.125, 76.5, 0);
+        new AcadColor(87, 0.1875, 0.3, 0.15, 47.8125, 76.5, 38.25);
+        new AcadColor(88, 0.0375, 0.15, 0, 9.5625, 38.25, 0);
+        new AcadColor(89, 0.0938, 0.15, 0.075, 23.919, 38.25, 19.125);
+        new AcadColor(90, 0, 1, 0, 0, 255, 0);
+        new AcadColor(91, 0.5, 1, 0.5, 127.5, 255, 127.5);
+        new AcadColor(92, 0, 0.65, 0, 0, 165.75, 0);
+        new AcadColor(93, 0.325, 0.65, 0.325, 82.875, 165.75, 82.875);
+        new AcadColor(94, 0, 0.5, 0, 0, 127.5, 0);
+        new AcadColor(95, 0.25, 0.5, 0.25, 63.75, 127.5, 63.75);
+        new AcadColor(96, 0, 0.3, 0, 0, 76.5, 0);
+        new AcadColor(97, 0.15, 0.3, 0.15, 38.25, 76.5, 38.25);
+        new AcadColor(98, 0, 0.15, 0, 0, 38.25, 0);
+        new AcadColor(99, 0.075, 0.15, 0.075, 19.125, 38.25, 19.125);
+        new AcadColor(100, 0, 1, 0.25, 0, 255, 63.75);
+        new AcadColor(101, 0.5, 1, 0.625, 127.5, 255, 159.375);
+        new AcadColor(102, 0, 0.65, 0.1625, 0, 165.75, 41.4375);
+        new AcadColor(103, 0.325, 0.65, 0.4063, 82.875, 165.75, 103.6065);
+        new AcadColor(104, 0, 0.5, 0.125, 0, 127.5, 31.875);
+        new AcadColor(105, 0.25, 0.5, 0.3125, 63.75, 127.5, 79.6875);
+        new AcadColor(106, 0, 0.3, 0.075, 0, 76.5, 19.125);
+        new AcadColor(107, 0.15, 0.3, 0.1875, 38.25, 76.5, 47.8125);
+        new AcadColor(108, 0, 0.15, 0.0375, 0, 38.25, 9.5625);
+        new AcadColor(109, 0.075, 0.15, 0.0938, 19.125, 38.25, 23.919);
+        new AcadColor(110, 0, 1, 0.5, 0, 255, 127.5);
+        new AcadColor(111, 0.5, 1, 0.75, 127.5, 255, 191.25);
+        new AcadColor(112, 0, 0.65, 0.325, 0, 165.75, 82.875);
+        new AcadColor(113, 0.325, 0.65, 0.4875, 82.875, 165.75, 124.3125);
+        new AcadColor(114, 0, 0.5, 0.25, 0, 127.5, 63.75);
+        new AcadColor(115, 0.25, 0.5, 0.375, 63.75, 127.5, 95.625);
+        new AcadColor(116, 0, 0.3, 0.15, 0, 76.5, 38.25);
+        new AcadColor(117, 0.15, 0.3, 0.225, 38.25, 76.5, 57.375);
+        new AcadColor(118, 0, 0.15, 0.075, 0, 38.25, 19.125);
+        new AcadColor(119, 0.075, 0.15, 0.1125, 19.125, 38.25, 28.6875);
+        new AcadColor(120, 0, 1, 0.75, 0, 255, 191.25);
+        new AcadColor(121, 0.5, 1, 0.875, 127.5, 255, 223.125);
+        new AcadColor(122, 0, 0.65, 0.4875, 0, 165.75, 124.3125);
+        new AcadColor(123, 0.325, 0.65, 0.5688, 82.875, 165.75, 145.044);
+        new AcadColor(124, 0, 0.5, 0.375, 0, 127.5, 95.625);
+        new AcadColor(125, 0.25, 0.5, 0.4375, 63.75, 127.5, 111.5625);
+        new AcadColor(126, 0, 0.3, 0.225, 0, 76.5, 57.375);
+        new AcadColor(127, 0.15, 0.3, 0.2625, 38.25, 76.5, 66.9375);
+        new AcadColor(128, 0, 0.15, 0.1125, 0, 38.25, 28.6875);
+        new AcadColor(129, 0.075, 0.15, 0.1313, 19.125, 38.25, 33.4815);
+        new AcadColor(130, 0, 1, 1, 0, 255, 255);
+        new AcadColor(131, 0.5, 1, 1, 127.5, 255, 255);
+        new AcadColor(132, 0, 0.65, 0.65, 0, 165.75, 165.75);
+        new AcadColor(133, 0.325, 0.65, 0.65, 82.875, 165.75, 165.75);
+        new AcadColor(134, 0, 0.5, 0.5, 0, 127.5, 127.5);
+        new AcadColor(135, 0.25, 0.5, 0.5, 63.75, 127.5, 127.5);
+        new AcadColor(136, 0, 0.3, 0.3, 0, 76.5, 76.5);
+        new AcadColor(137, 0.15, 0.3, 0.3, 38.25, 76.5, 76.5);
+        new AcadColor(138, 0, 0.15, 0.15, 0, 38.25, 38.25);
+        new AcadColor(139, 0.075, 0.15, 0.15, 19.125, 38.25, 38.25);
+        new AcadColor(140, 0, 0.75, 1, 0, 191.25, 255);
+        new AcadColor(141, 0.5, 0.875, 1, 127.5, 223.125, 255);
+        new AcadColor(142, 0, 0.4875, 0.65, 0, 124.3125, 165.75);
+        new AcadColor(143, 0.325, 0.5688, 0.65, 82.875, 145.044, 165.75);
+        new AcadColor(144, 0, 0.375, 0.5, 0, 95.625, 127.5);
+        new AcadColor(145, 0.25, 0.4375, 0.5, 63.75, 111.5625, 127.5);
+        new AcadColor(146, 0, 0.225, 0.3, 0, 57.375, 76.5);
+        new AcadColor(147, 0.15, 0.2625, 0.3, 38.25, 66.9375, 76.5);
+        new AcadColor(148, 0, 0.1125, 0.15, 0, 28.6875, 38.25);
+        new AcadColor(149, 0.075, 0.1313, 0.15, 19.125, 33.4815, 38.25);
+        new AcadColor(150, 0, 0.5, 1, 0, 127.5, 255);
+        new AcadColor(151, 0.5, 0.75, 1, 127.5, 191.25, 255);
+        new AcadColor(152, 0, 0.325, 0.65, 0, 82.875, 165.75);
+        new AcadColor(153, 0.325, 0.4875, 0.65, 82.875, 124.3125, 165.75);
+        new AcadColor(154, 0, 0.25, 0.5, 0, 63.75, 127.5);
+        new AcadColor(155, 0.25, 0.375, 0.5, 63.75, 95.625, 127.5);
+        new AcadColor(156, 0, 0.15, 0.3, 0, 38.25, 76.5);
+        new AcadColor(157, 0.15, 0.225, 0.3, 38.25, 57.375, 76.5);
+        new AcadColor(158, 0, 0.075, 0.15, 0, 19.125, 38.25);
+        new AcadColor(159, 0.075, 0.1125, 0.15, 19.125, 28.6875, 38.25);
+        new AcadColor(160, 0, 0.25, 1, 0, 63.75, 255);
+        new AcadColor(161, 0.5, 0.625, 1, 127.5, 159.375, 255);
+        new AcadColor(162, 0, 0.1625, 0.65, 0, 41.4375, 165.75);
+        new AcadColor(163, 0.325, 0.4063, 0.65, 82.875, 103.6065, 165.75);
+        new AcadColor(164, 0, 0.125, 0.5, 0, 31.875, 127.5);
+        new AcadColor(165, 0.25, 0.3125, 0.5, 63.75, 79.6875, 127.5);
+        new AcadColor(166, 0, 0.075, 0.3, 0, 19.125, 76.5);
+        new AcadColor(167, 0.15, 0.1875, 0.3, 38.25, 47.8125, 76.5);
+        new AcadColor(168, 0, 0.0375, 0.15, 0, 9.5625, 38.25);
+        new AcadColor(169, 0.075, 0.0938, 0.15, 19.125, 23.919, 38.25);
+        new AcadColor(170, 0, 0, 1, 0, 0, 255);
+        new AcadColor(171, 0.5, 0.5, 1, 127.5, 127.5, 255);
+        new AcadColor(172, 0, 0, 0.65, 0, 0, 165.75);
+        new AcadColor(173, 0.325, 0.325, 0.65, 82.875, 82.875, 165.75);
+        new AcadColor(174, 0, 0, 0.5, 0, 0, 127.5);
+        new AcadColor(175, 0.25, 0.25, 0.5, 63.75, 63.75, 127.5);
+        new AcadColor(176, 0, 0, 0.3, 0, 0, 76.5);
+        new AcadColor(177, 0.15, 0.15, 0.3, 38.25, 38.25, 76.5);
+        new AcadColor(178, 0, 0, 0.15, 0, 0, 38.25);
+        new AcadColor(179, 0.075, 0.075, 0.15, 19.125, 19.125, 38.25);
+        new AcadColor(180, 0.25, 0, 1, 63.75, 0, 255);
+        new AcadColor(181, 0.625, 0.5, 1, 159.375, 127.5, 255);
+        new AcadColor(182, 0.1625, 0, 0.65, 41.4375, 0, 165.75);
+        new AcadColor(183, 0.4063, 0.325, 0.65, 103.6065, 82.875, 165.75);
+        new AcadColor(184, 0.125, 0, 0.5, 31.875, 0, 127.5);
+        new AcadColor(185, 0.3125, 0.25, 0.5, 79.6875, 63.75, 127.5);
+        new AcadColor(186, 0.075, 0, 0.3, 19.125, 0, 76.5);
+        new AcadColor(187, 0.1875, 0.15, 0.3, 47.8125, 38.25, 76.5);
+        new AcadColor(188, 0.0375, 0, 0.15, 9.5625, 0, 38.25);
+        new AcadColor(189, 0.0938, 0.075, 0.15, 23.919, 19.125, 38.25);
+        new AcadColor(190, 0.5, 0, 1, 127.5, 0, 255);
+        new AcadColor(191, 0.75, 0.5, 1, 191.25, 127.5, 255);
+        new AcadColor(192, 0.325, 0, 0.65, 82.875, 0, 165.75);
+        new AcadColor(193, 0.4875, 0.325, 0.65, 124.3125, 82.875, 165.75);
+        new AcadColor(194, 0.25, 0, 0.5, 63.75, 0, 127.5);
+        new AcadColor(195, 0.375, 0.25, 0.5, 95.625, 63.75, 127.5);
+        new AcadColor(196, 0.15, 0, 0.3, 38.25, 0, 76.5);
+        new AcadColor(197, 0.225, 0.15, 0.3, 57.375, 38.25, 76.5);
+        new AcadColor(198, 0.075, 0, 0.15, 19.125, 0, 38.25);
+        new AcadColor(199, 0.1125, 0.075, 0.15, 28.6875, 19.125, 38.25);
+        new AcadColor(200, 0.75, 0, 1, 191.25, 0, 255);
+        new AcadColor(201, 0.875, 0.5, 1, 223.125, 127.5, 255);
+        new AcadColor(202, 0.4875, 0, 0.65, 124.3125, 0, 165.75);
+        new AcadColor(203, 0.5688, 0.325, 0.65, 145.044, 82.875, 165.75);
+        new AcadColor(204, 0.375, 0, 0.5, 95.625, 0, 127.5);
+        new AcadColor(205, 0.4375, 0.25, 0.5, 111.5625, 63.75, 127.5);
+        new AcadColor(206, 0.225, 0, 0.3, 57.375, 0, 76.5);
+        new AcadColor(207, 0.2625, 0.15, 0.3, 66.9375, 38.25, 76.5);
+        new AcadColor(208, 0.1125, 0, 0.15, 28.6875, 0, 38.25);
+        new AcadColor(209, 0.1313, 0.075, 0.15, 33.4815, 19.125, 38.25);
+        new AcadColor(210, 1, 0, 1, 255, 0, 255);
+        new AcadColor(211, 1, 0.5, 1, 255, 127.5, 255);
+        new AcadColor(212, 0.65, 0, 0.65, 165.75, 0, 165.75);
+        new AcadColor(213, 0.65, 0.325, 0.65, 165.75, 82.875, 165.75);
+        new AcadColor(214, 0.5, 0, 0.5, 127.5, 0, 127.5);
+        new AcadColor(215, 0.5, 0.25, 0.5, 127.5, 63.75, 127.5);
+        new AcadColor(216, 0.3, 0, 0.3, 76.5, 0, 76.5);
+        new AcadColor(217, 0.3, 0.15, 0.3, 76.5, 38.25, 76.5);
+        new AcadColor(218, 0.15, 0, 0.15, 38.25, 0, 38.25);
+        new AcadColor(219, 0.15, 0.075, 0.15, 38.25, 19.125, 38.25);
+        new AcadColor(220, 1, 0, 0.75, 255, 0, 191.25);
+        new AcadColor(221, 1, 0.5, 0.875, 255, 127.5, 223.125);
+        new AcadColor(222, 0.65, 0, 0.4875, 165.75, 0, 124.3125);
+        new AcadColor(223, 0.65, 0.325, 0.5688, 165.75, 82.875, 145.044);
+        new AcadColor(224, 0.5, 0, 0.375, 127.5, 0, 95.625);
+        new AcadColor(225, 0.5, 0.25, 0.4375, 127.5, 63.75, 111.5625);
+        new AcadColor(226, 0.3, 0, 0.225, 76.5, 0, 57.375);
+        new AcadColor(227, 0.3, 0.15, 0.2625, 76.5, 38.25, 66.9375);
+        new AcadColor(228, 0.15, 0, 0.1125, 38.25, 0, 28.6875);
+        new AcadColor(229, 0.15, 0.075, 0.1313, 38.25, 19.125, 33.4815);
+        new AcadColor(230, 1, 0, 0.5, 255, 0, 127.5);
+        new AcadColor(231, 1, 0.5, 0.75, 255, 127.5, 191.25);
+        new AcadColor(232, 0.65, 0, 0.325, 165.75, 0, 82.875);
+        new AcadColor(233, 0.65, 0.325, 0.4875, 165.75, 82.875, 124.3125);
+        new AcadColor(234, 0.5, 0, 0.25, 127.5, 0, 63.75);
+        new AcadColor(235, 0.5, 0.25, 0.375, 127.5, 63.75, 95.625);
+        new AcadColor(236, 0.3, 0, 0.15, 76.5, 0, 38.25);
+        new AcadColor(237, 0.3, 0.15, 0.225, 76.5, 38.25, 57.375);
+        new AcadColor(238, 0.15, 0, 0.075, 38.25, 0, 19.125);
+        new AcadColor(239, 0.15, 0.075, 0.1125, 38.25, 19.125, 28.6875);
+        new AcadColor(240, 1, 0, 0.25, 255, 0, 63.75);
+        new AcadColor(241, 1, 0.5, 0.625, 255, 127.5, 159.375);
+        new AcadColor(242, 0.65, 0, 0.1625, 165.75, 0, 41.4375);
+        new AcadColor(243, 0.65, 0.325, 0.4063, 165.75, 82.875, 103.6065);
+        new AcadColor(244, 0.5, 0, 0.125, 127.5, 0, 31.875);
+        new AcadColor(245, 0.5, 0.25, 0.3125, 127.5, 63.75, 79.6875);
+        new AcadColor(246, 0.3, 0, 0.075, 76.5, 0, 19.125);
+        new AcadColor(247, 0.3, 0.15, 0.1875, 76.5, 38.25, 47.8125);
+        new AcadColor(248, 0.15, 0, 0.0375, 38.25, 0, 9.5625);
+        new AcadColor(249, 0.15, 0.075, 0.0938, 38.25, 19.125, 23.919);
+        new AcadColor(250, 0.33, 0.33, 0.33, 84.15, 84.15, 84.15);
+        new AcadColor(251, 0.464, 0.464, 0.464, 118.32, 118.32, 118.32);
+        new AcadColor(252, 0.598, 0.598, 0.598, 152.49, 152.49, 152.49);
+        new AcadColor(253, 0.732, 0.732, 0.732, 186.66, 186.66, 186.66);
+        new AcadColor(254, 0.866, 0.866, 0.866, 220.83, 220.83, 220.83);
+        new AcadColor(255, 1.0, 1.0, 1.0, 255.0, 255.0, 255.0);
+
+        return AcadColor.colores;
+    }
+}
+;
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfAttrib.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfAttrib.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfAttrib.java	(revision 1291)
@@ -0,0 +1,133 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad ATTRIB de un fichero DXF.
+ * @author jmorell
+ */
+public class DxfAttrib extends DxfEntity {
+    private Point2D pt;
+    
+    /**
+     * Constructor de DxfAttrib.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfAttrib.
+     * @param layer, capa del DXF en la que se encuentra el DxfAttrib.
+     */
+    public DxfAttrib(IProjection proj, DxfLayer layer) {
+        super(proj, layer);
+        extent = new Extent();
+        pt = new Point2D.Double();
+    }
+    
+    /**
+     * Establece el punto de inserci�n del DxfAttrib.
+     * @param pt, punto de inserci�n.
+     */
+    public void setPt(Point2D pt) {
+        this.pt = pt;
+        extent.add(pt);
+    }
+    
+    /**
+     * Permite reproyectar un DxfAttrib dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Point2D savePt = pt;
+
+        pt = new Point2D.Double();
+        extent = new Extent();
+
+        Point2D ptDest = rp.getPDest().createPoint(0.0, 0.0);
+
+        if (savePt == null) {
+            ptDest = null;
+        } else {
+            ptDest = rp.convert((Point2D) savePt, ptDest);
+            extent.add(ptDest);
+        }
+
+        pt = ptDest;
+        setProjection(rp.getPDest());
+    }
+    
+    /**
+     * Permite dibujar un DxfAttrib.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        //AffineTransform msave=g.getTransform();
+        //g.setTransform(vp.mat);
+        if (dxfColor == AcadColor.BYLAYER) {
+            g.setColor(layer.getColor());
+        } else {
+            g.setColor(AcadColor.getColor(dxfColor));
+        }
+
+        Point2D ptT = new Point2D.Double(0, 0);
+        vp.mat.transform(ptT, ptT);
+        ptT.setLocation(pt.getX(), pt.getY());
+        vp.mat.transform(ptT, ptT);
+        g.drawLine((int) ptT.getX(), (int) ptT.getY(), (int) ptT.getX(),
+                   (int) ptT.getY());
+
+        //g.setTransform(msave);
+    }
+
+    /**
+     * 050406, jmorell: Implementaci�n parcial. Est� para DxfPoint. Falta hacerlo
+     * para un DxfAttrib ...
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "POINT"));
+        sb.append(DxfGroup.toString(5, getHandle()));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(100, "AcDbPoint"));
+        sb.append(DxfGroup.toString(10, pt.getX(), 6));
+        sb.append(DxfGroup.toString(20, pt.getY(), 6));
+        sb.append(DxfGroup.toString(30, 0.0, 6));
+
+        return sb.toString();
+    }
+
+    /**
+     * @return Returns the pt.
+     */
+    public Point2D getPt() {
+        return pt;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfTable.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfTable.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfTable.java	(revision 1291)
@@ -0,0 +1,91 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.util.Vector;
+
+
+/**
+ * Lista (Tabla) de capas del fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class DxfTable {
+    public Vector items = null;
+    public boolean createNotFoundLayers = true;
+
+    /**
+     * Constructor de DxfTable.
+     */
+    public DxfTable() {
+        items = new Vector();
+    }
+
+    /**
+     * A�ade un elemento a la tabla. En la actualidad esta table solo est� implementada
+     * para soportar capas.
+     * @param layer, la capa que a�adimos.
+     */
+    public void add(DxfTableItem layer) {
+        items.add(layer);
+    }
+
+    /**
+     * Devuelve una de las capas de la tabla de capas dada por su nombre.
+     * @param name, nombre de la capa que queremos obtener.
+     * @return DxfTableItem, la capa que buscamos.
+     */
+    public DxfTableItem getByName(String name) {
+        DxfTableItem capa = null;
+
+        for (int i = 0; i < items.size(); i++) {
+            capa = (DxfTableItem) items.get(i);
+
+            if (capa.getName().compareToIgnoreCase(name) == 0) {
+                return capa;
+            }
+        }
+
+        if (createNotFoundLayers) {
+            capa = new DxfLayer(name);
+            add(capa);
+        }
+
+        return capa;
+    }
+
+    /**
+     * Permite la escritura de entidades DxfTable en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * de la DxfTable.
+     */
+    public String toDxfString() {
+        String txt = "";
+
+        for (int i = 0; i < items.size(); i++) {
+            txt += ((DxfLayer) items.get(i)).toDxfString();
+        }
+
+        return txt;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLine.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLine.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLine.java	(revision 1291)
@@ -0,0 +1,163 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad LINE de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>* @author administrador
+ * @author jmorell
+ */
+public class DxfLine extends DxfEntity {
+    final static Color baseColor = new Color(255, 106, 121);
+    Point2D[] pts;
+    GeneralPath gp = null;
+    private Color color = baseColor; //Color(255,214,132,255);
+
+    /**
+     * Constructor de DxfLine.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra la DxfLine.
+     * @param layer, capa del DXF en la que se encuentra la DxfLine.
+     * @param p1, punto inicial de la l�nea.
+     * @param p2, punto final de la l�nea.
+     */
+    public DxfLine(IProjection proj, DxfLayer layer, Point2D p1, Point2D p2) {
+        super(proj, layer);
+        extent = new Extent(p1, p2);
+        pts = new Point2D[2];
+        pts[0] = p1;
+        pts[1] = p2;
+    }
+
+    /**
+     * Devuelve el color de la DxfLine.
+     * @return Color
+     */
+    public Color c() {
+        return color;
+    }
+
+    /**
+     * Establece el color de la DxfLine.
+     * @param color
+     * @return Color
+     */
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+
+    /**
+     * Permite reproyectar una DxfLine dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Point2D[] savePts = pts;
+
+        pts = new Point2D[2];
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePts.length; i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) savePts[i], ptDest);
+            pts[i] = ptDest;
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+
+    /**
+     * Permite dibujar una DxfLine.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        if (dxfColor == AcadColor.BYLAYER) {
+            g.setColor(layer.getColor());
+        } else {
+            g.setColor(AcadColor.getColor(dxfColor));
+        }
+
+        newGP(vp);
+        g.draw(gp);
+    }
+
+    /**
+     * Permite generar un GeneralPath partiendo del array de Point2D que conforma el
+     * DxfLine.
+     * @param vp
+     */
+    private void newGP(ViewPortData vp) {
+        //if (gp != null) return;
+        Point2D.Double pt0 = new Point2D.Double(0.0, 0.0);
+        Point2D.Double pt1 = new Point2D.Double(0.0, 0.0);
+        vp.mat.transform((Point2D) pts[0], pt0);
+        vp.mat.transform((Point2D) pts[1], pt1);
+        gp = new GeneralPath();
+        gp.moveTo((float) pt0.getX(), (float) pt0.getY());
+        gp.lineTo((float) pt1.getX(), (float) pt1.getY());
+    }
+
+    /**
+     * Permite la escritura de entidades DxfLine en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * de la DxfLine.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "LINE"));
+        sb.append(DxfGroup.toString(5, getHandle()));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(100, "AcDbLine"));
+        sb.append(DxfGroup.toString(10, pts[0].getX(), 6));
+        sb.append(DxfGroup.toString(20, pts[0].getY(), 6));
+        sb.append(DxfGroup.toString(11, pts[1].getX(), 6));
+        sb.append(DxfGroup.toString(21, pts[1].getY(), 6));
+
+        return sb.toString();
+    }
+
+    /**
+     * Devuelve el array de puntos que conforman el DxfLine.
+     * @return Point2D[], puntos del DxfLine.
+     */
+    public Point2D[] getPts() {
+        return pts;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfPoint.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfPoint.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfPoint.java	(revision 1291)
@@ -0,0 +1,135 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad POINT de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ */
+public class DxfPoint extends DxfEntity {
+    private Point2D pt;
+
+    /**
+     * Constructor de DxfPoint.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfPoint.
+     * @param layer, capa del DXF en la que se encuentra el DxfPoint.
+     */
+    public DxfPoint(IProjection proj, DxfLayer layer) {
+        super(proj, layer);
+        extent = new Extent();
+        pt = new Point2D.Double();
+    }
+
+    /**
+     * Establece el punto de inserci�n del DxfPoint.
+     * @param pt, punto de inserci�n.
+     */
+    public void setPt(Point2D pt) {
+        this.pt = pt;
+        extent.add(pt);
+    }
+
+    /**
+     * Permite reproyectar un DxfPoint dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Point2D savePt = pt;
+
+        pt = new Point2D.Double();
+        extent = new Extent();
+
+        Point2D ptDest = rp.getPDest().createPoint(0.0, 0.0);
+
+        if (savePt == null) {
+            ptDest = null;
+        } else {
+            ptDest = rp.convert((Point2D) savePt, ptDest);
+            extent.add(ptDest);
+        }
+
+        pt = ptDest;
+        setProjection(rp.getPDest());
+    }
+
+    /**
+     * Permite dibujar un DxfPoint.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        //AffineTransform msave=g.getTransform();
+        //g.setTransform(vp.mat);
+        if (dxfColor == AcadColor.BYLAYER) {
+            g.setColor(layer.getColor());
+        } else {
+            g.setColor(AcadColor.getColor(dxfColor));
+        }
+
+        Point2D ptT = new Point2D.Double(0, 0);
+        vp.mat.transform(ptT, ptT);
+        ptT.setLocation(pt.getX(), pt.getY());
+        vp.mat.transform(ptT, ptT);
+        g.drawLine((int) ptT.getX(), (int) ptT.getY(), (int) ptT.getX(),
+                   (int) ptT.getY());
+
+        //g.setTransform(msave);
+    }
+
+    /**
+     * Permite la escritura de entidades DxfPoint en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * del DxfPoint.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "POINT"));
+        sb.append(DxfGroup.toString(5, getHandle()));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(100, "AcDbPoint"));
+        sb.append(DxfGroup.toString(10, pt.getX(), 6));
+        sb.append(DxfGroup.toString(20, pt.getY(), 6));
+        sb.append(DxfGroup.toString(30, 0.0, 6));
+
+        return sb.toString();
+    }
+
+    /**
+     * @return Returns the pt.
+     */
+    public Point2D getPt() {
+        return pt;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfSpline.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfSpline.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfSpline.java	(revision 1291)
@@ -0,0 +1,74 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.geom.Point2D;
+import java.util.Iterator;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad SPLINE de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class DxfSpline extends DxfPolyline {
+
+    /**
+     * Constructor de DxfSpline.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfSpline.
+     * @param layer, capa del DXF en la que se encuentra el DxfSpline.
+     */
+    public DxfSpline(IProjection proj, DxfLayer layer) {
+        super(proj, layer);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.px.dxf.DxfEntity#toDxfFileString()
+     */
+    /**
+     * Actualmente en desarrollo. Hay que terminarlo para que de verdad escriba un
+     * DxfSpline.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "LWPOLYLINE"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(100, "AcDbPolyline"));
+        sb.append(DxfGroup.toString(90, pts.size()));
+
+        Point2D pt = null;
+        Iterator iter = pts.iterator();
+
+        while (iter.hasNext()) {
+            pt = (Point2D) iter.next();
+            sb.append(DxfGroup.toString(10, pt.getX(), 6));
+            sb.append(DxfGroup.toString(20, pt.getY(), 6));
+        }
+
+        return sb.toString();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfBlock.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfBlock.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfBlock.java	(revision 1291)
@@ -0,0 +1,284 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.io.DxfFile;
+import org.gvsig.dxf.px.IObjList;
+import org.gvsig.dxf.px.PxObj;
+
+/**
+ * Entidad BLOCK de un fichero DXF.
+ * @author jmorell
+ */
+public class DxfBlock extends PxObj implements IObjList {
+    IProjection proj = null;
+    Vector data = null;
+    int flags = 0;
+    String blkName = "";
+    Point2D bPoint = new Point2D.Double();
+    
+    /**
+     * Constructor de DxfBlock.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfBlock.
+     */
+    public DxfBlock(IProjection proj) {
+        extent = new Extent();
+        data = new Vector();
+    }
+    
+    /**
+     * Devuelve los obhjetos gr�ficos de la lista cuyos extents contengan al
+     * punto que se le pasa como argumento.
+     * @param pt, punto para localizar los objetos gr�ficos.
+     * @return IObjList, Conjunto de objetos gr�ficos que contienen a pt.
+     */
+    public IObjList getAt(Point2D pt) {
+        IObjList oList = new DxfEntityList(proj);
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            Extent.Has o = (Extent.Has) iter.next();
+
+            if (o.getExtent().isAt(pt)) {
+                oList.add(o);
+            }
+        }
+
+        return oList;
+    }
+    
+    /**
+     * Devuelve un iterador para recorrer los elementos de la lista de objetos gr�ficos.
+     * @return Iterator, iterador.
+     */
+    public Iterator iterator() {
+        return data.iterator();
+    }
+    
+    /**
+     * Devuelve la cantidad de elementos que contiene la lista de objetos gr�ficos.
+     * @return int
+     */
+    public int size() {
+        return data.size();
+    }
+    
+    /**
+     * Permite a�adir un objeto gr�fico a la lista.
+     * @param obj, Objeto gr�fico que implemente el interface Extent.Has
+     */
+    public void add(Extent.Has obj) {
+        if (obj != null) {
+            extent.add(obj.getExtent());
+            data.add(obj);
+        }
+    }
+    
+    /**
+     * Permite eliminar un elemento de la lista de objetos gr�ficos.
+     * @param obj, Objeto que queremos eliminar.
+     */
+    public void remove(Object obj) {
+        data.remove(obj);
+    }
+    
+    /**
+     * Permite vac�ar la lista de objetos gr�ficos.
+     */
+    public void clear() {
+        extent = new Extent();
+        data.clear();
+    }
+    
+    /**
+     * Devuelve uno de los elementos de la lista de objetos gr�ficos.
+     * @param i, �ndice del elemento de la lista que queremos obtener.
+     * @return Extent.Has, elemento gr�fico que queremos obtener.
+     */
+    public Extent.Has get(int i) {
+        return (Extent.Has) data.get(i);
+    }
+    
+    /**
+     * Devuelve la proyecci�n cartogr�fica en la que se encuentra el DxfBlock.
+     * @return IProjection, proyecci�n cartogr�fica.
+     */
+    public IProjection getProjection() {
+        return proj;
+    }
+    
+    /**
+     * Establece la proyecci�n cartogr�fica en la que se encuentra el DxfBlock.
+     * @param p, Proyecci�n cartogr�fica.
+     */
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+    
+    /**
+     * Permite reproyectar un DxfBlock dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        extent = new Extent();
+
+        PxObj o;
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            o = (PxObj) iter.next();
+            ((Projected) o).reProject(rp);
+            extent.add(o.getExtent());
+        }
+
+        setProjection(rp.getPDest());
+    }
+    
+    /**
+     * Permite dibujar un DxfBlock.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Iterator iter = iterator();
+        Extent extent;
+
+        while (iter.hasNext()) {
+            DxfEntity entity = (DxfEntity) iter.next();
+            extent = entity.getExtent();
+
+            if (vp.getExtent().minX() > extent.maxX()) {
+                continue;
+            }
+
+            if (vp.getExtent().minY() > extent.maxY()) {
+                continue;
+            }
+
+            if (vp.getExtent().maxX() < extent.minX()) {
+                continue;
+            }
+
+            if (vp.getExtent().maxY() < extent.minY()) {
+                continue;
+            }
+
+            if (!entity.layer.frozen) {
+                entity.draw(g, vp);
+            }
+        }
+    }
+    
+    /**
+     * Permite la escritura de entidades DxfBlock en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * del DxfBlock.
+     */
+    public String toDxfString() {
+        StringBuffer sb = new StringBuffer("");
+
+        Iterator iter = iterator();
+        Extent extent;
+
+        while (iter.hasNext()) {
+            sb.append(((DxfEntity) iter.next()).toDxfString());
+        }
+
+        return sb.toString();
+    }
+    
+    /**
+     * Devuelve el estado de flags.
+     * @return int
+     */
+    public int getFlags() {
+        return flags;
+    }
+    
+    /**
+     * Devuelve el nombre del bloque.
+     * @return String
+     */
+    public String getBlkName() {
+        return blkName;
+    }
+    
+    /**
+     * Devuelve un Vector con los elementos que conforman el bloque.
+     * @return Vector
+     */
+    public Vector getBlkElements() {
+        return data;
+    }
+    
+    /**
+     * Establece los elementos que conforman el bloque.
+     * @param blkElements
+     */
+    public void setBlkElements(Vector blkElements) {
+        data = blkElements;
+    }
+    
+    /**
+     * Establece el nombre del bloque.
+     * @param blkName
+     */
+    public void setBlkName(String blkName) {
+        this.blkName = blkName;
+        DxfFile.logger.debug("setBlkName: this.blkName = " + this.blkName);
+    }
+    
+    /**
+     * Establece el punto base del bloque.
+     * @param basePoint
+     */
+    public void setBPoint(Point2D basePoint) {
+        this.bPoint = basePoint;
+        DxfFile.logger.debug("setBPoint: this.bPoint = " + this.bPoint);
+    }
+    
+    /**
+     * Devuelve el punto base del bloque.
+     * @return
+     */
+    public Point2D getBPoint() {
+        return bPoint;
+    }
+    
+    /**
+     * Establece el estado de la variable flags.
+     * @param flags
+     */
+    public void setFlags(int flags) {
+        this.flags = flags;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfPolyline.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfPolyline.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfPolyline.java	(revision 1291)
@@ -0,0 +1,372 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.geo.Point3D;
+import org.gvsig.dxf.io.DxfFile;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad POLYLINE de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ */
+public class DxfPolyline extends DxfEntity {
+    final static Color baseColor = new Color(69, 106, 121);
+    Vector pts = null;
+    Vector faces = null;
+    GeneralPath gp = null;
+    int flags = 0;
+    boolean closed = false;
+    boolean hasFaces = false;
+    private Vector bulges;
+    private Color color = baseColor; //Color(255,214,132,255);
+    private double elevation;
+    private String subclassMarker;
+
+    /**
+     * Constructor de DxfPolyline.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfPolyline.
+     * @param layer, capa del DXF en la que se encuentra el DxfPolyline.
+     */
+    public DxfPolyline(IProjection proj, DxfLayer layer) {
+        super(proj, layer);
+        extent = new Extent();
+        pts = new Vector();
+        bulges = new Vector();
+    }
+
+    /**
+     * A�ade un punto a la polil�nea.
+     * @param pt
+     */
+    public void add(Point2D pt) {
+        pts.add(pt);
+        extent.add(pt);
+    }
+
+    /**
+     * A�ade un bulge o par�metro de curvatura a la lista. Estos par�metros se
+     * corresponden con los v�rtices.
+     * @param bulge, par�metro de curvatura.
+     */
+    /**
+     * 050301, jmorell: Soluci�n para implementar la lectura de polil�neas
+     * con arcos.
+     */
+    public void addBulge(Double bulge) {
+        bulges.add(bulge);
+    }
+
+    /**
+     * A�ade una face a la polil�nea.
+     * @param face
+     */
+    public void addFace(int[] face) {
+        hasFaces = true;
+
+        if (faces == null) {
+            faces = new Vector();
+        }
+
+        faces.add(face);
+    }
+
+    /**
+     * Devuelve el color de la DxfPolyline.
+     * @return Color
+     */
+    public Color c() {
+        return color;
+    }
+
+    /**
+     * Establece el color de la DxfPolyline.
+     * @param color
+     * @return Color
+     */
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+
+    /**
+     * Permite reproyectar una DxfPolyline dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Vector savePts = pts;
+
+        pts = new Vector();
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePts.size(); i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) savePts.get(i), ptDest);
+            pts.add(ptDest);
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+
+    /**
+     * Permite dibujar una DxfPolyline.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        //AffineTransform msave=g.getTransform();
+        //g.setTransform(vp.mat);
+        Color color = null;
+
+        // pinto el poligono si es preciso
+        if (dxfColor == AcadColor.BYLAYER) {
+            color = layer.getColor();
+        } else {
+            color = AcadColor.getColor(dxfColor);
+        }
+
+        DxfFile.logger.debug("PLINE color=" + color);
+        newGP(vp);
+
+        if (closed) {
+            g.setColor(new Color(color.getRed(), color.getBlue(),
+                                 color.getGreen(), 0x20));
+            g.fill(gp);
+        }
+
+        g.setColor(color);
+        g.draw(gp);
+
+        //g.setTransform(msave);
+    }
+
+    /**
+     * Permite generar un GeneralPath partiendo del Vector de puntos que conforma la
+     * DxfPolyline.
+     * @param vp
+     */
+    private void newGP(ViewPortData vp) {
+        //if (gp != null) return;
+        gp = new GeneralPath();
+
+        Point2D pt0 = null;
+        Point2D pt = null;
+        Point2D pt1 = null;
+        Point2D.Double ptTmp = new Point2D.Double(0.0, 0.0);
+
+        if (!hasFaces) {
+            Iterator iter = pts.iterator();
+
+            while (iter.hasNext()) {
+                pt1 = (Point2D) iter.next();
+                vp.mat.transform(pt1, ptTmp);
+
+                if (pt0 == null) {
+                    pt0 = ptTmp;
+                    gp.moveTo((float) ptTmp.getX(), (float) ptTmp.getY());
+                } else {
+                    gp.lineTo((float) ptTmp.getX(), (float) ptTmp.getY());
+                }
+            }
+
+            if (closed) {
+                gp.closePath();
+            }
+        } else {
+        	DxfFile.logger.debug("POLYLINE: caras=" + faces.size() + ", puntos=" +
+                               pts.size());
+
+            int[] face;
+            int i0;
+            int i1;
+            Iterator iter = faces.iterator();
+
+            while (iter.hasNext()) {
+                face = (int[]) iter.next();
+
+                i0 = face[3];
+
+                for (int i = 0; i < 4; i++) {
+                    i1 = face[i];
+
+                    if (i0 > 0) {
+                        pt0 = (Point2D) pts.get(i0 - 1);
+                        vp.mat.transform(pt0, ptTmp);
+                        gp.moveTo((float) ptTmp.getX(), (float) ptTmp.getY());
+                        pt1 = (Point2D) pts.get(Math.abs(i1) - 1);
+                        vp.mat.transform(pt1, ptTmp);
+                        gp.lineTo((float) ptTmp.getX(), (float) ptTmp.getY());
+                    }
+
+                    i0 = i1;
+                }
+            }
+        }
+    }
+
+    /**
+     * Permite la escritura de entidades DxfPolyline en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * del DxfPolyline.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "POLYLINE"));
+        sb.append(DxfGroup.toString(5, getHandle()));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(100, getSubclassMarker()));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(70, flags));
+        sb.append(DxfGroup.toString(66, 1));
+
+        Point3D pt = null;
+        Iterator iter = pts.iterator();
+        DxfFile.logger.debug("pts.size() = " + pts.size());
+
+        int i=1;
+        while (iter.hasNext()) {
+            pt = (Point3D) iter.next();
+            sb.append(DxfGroup.toString(0, "VERTEX"));
+            sb.append(DxfGroup.toString(5, getHandle()+i));
+            sb.append(DxfGroup.toString(100, "AcDbEntity"));
+            sb.append(DxfGroup.toString(8, layer.getName()));
+            sb.append(DxfGroup.toString(100, "AcDbVertex"));
+            sb.append(DxfGroup.toString(100, "AcDb3dPolylineVertex"));
+            sb.append(DxfGroup.toString(70, 32));
+            sb.append(DxfGroup.toString(10, pt.getX(), 6));
+            sb.append(DxfGroup.toString(20, pt.getY(), 6));
+            sb.append(DxfGroup.toString(30, pt.getZ(), 6));
+            i++;
+        }
+
+        sb.append(DxfGroup.toString(0, "SEQEND"));
+        sb.append(DxfGroup.toString(5, getHandle()+i));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+
+        return sb.toString();
+    }
+
+    /**
+     * Devuelve el GeneralPath.
+     * @return GeneralPath
+     */
+    public GeneralPath getGeneralPath(ViewPortData vp) {
+        newGP(vp);
+
+        return (GeneralPath) gp.clone();
+    }
+
+    /**
+     * Devuelve la variable flags de una polil�nea.
+     * @return int
+     */
+    public int getFlags() {
+        return flags;
+    }
+
+    /**
+     * Invoca el m�todo de creaci�n de arcos para polil�neas con par�metros de
+     * curvatura.
+     * @param coord1, punto inicial del arco.
+     * @param coord2, punto final del arco.
+     * @param bulge, par�metro de curvatura.
+     * @return Vector con los puntos del arco.
+     */
+    public static Vector createArc(Point2D coord1, Point2D coord2, double bulge) {
+        return new DxfCalArcs(coord1, coord2, bulge).getPoints(1);
+    }
+
+    /**
+     * @return Returns the pts.
+     */
+    public Vector getPts() {
+        return pts;
+    }
+
+    /**
+     * @param pts The pts to set.
+     */
+    public void setPts(Vector pts) {
+        this.pts = pts;
+    }
+
+    /**
+     * @return Returns the bulges.
+     */
+    public Vector getBulges() {
+        return bulges;
+    }
+
+    /**
+     * @param bulges The bulges to set.
+     */
+    public void setBulges(Vector bulges) {
+        this.bulges = bulges;
+    }
+
+    /**
+     * @return Returns the elevation.
+     */
+    public double getElevation() {
+        return elevation;
+    }
+
+    /**
+     * @param elevation The elevation to set.
+     */
+    public void setElevation(double elevation) {
+        this.elevation = elevation;
+    }
+
+    /**
+     * @return Returns the subclassMarker.
+     */
+    public String getSubclassMarker() {
+        return subclassMarker;
+    }
+
+    /**
+     * @param subclassMarker The subclassMarker to set.
+     */
+    public void setSubclassMarker(String subclassMarker) {
+        this.subclassMarker = subclassMarker;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntityMaker.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntityMaker.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntityMaker.java	(revision 1291)
@@ -0,0 +1,2186 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.geo.Point3D;
+import org.gvsig.dxf.io.DxfFile;
+import org.gvsig.dxf.io.DxfGroup;
+import org.gvsig.dxf.io.DxfGroupVector;
+import org.gvsig.dxf.px.IObjList;
+
+
+/**
+ * La clase DxfEntityMaker facilita la creaci�n de entidades en un modelo de datos
+ * CAD. La creaci�n se realiza partiendo de las entidades obtenidas de un fichero DXF.
+ * @author jmorell
+ */
+public class DxfEntityMaker implements DxfFile.EntityFactory, Projected {
+    IProjection proj = null;
+    DxfEntity lastEntity = null;
+    DxfEntityList entities = null;
+    Vector blkList = null;
+    DxfBlock blk = null;
+    DxfTable layers = null;
+    double bulge = 0.0;
+    double xtruX = 0.0;
+    double xtruY = 0.0;
+    double xtruZ = 1.0;
+    int polylineFlag = 0;
+    Point2D firstPt = new Point2D.Double();
+    boolean addingToBlock = false;
+    int iterator = 0;
+
+    // jmorell, 050406: implementaci�n inicial de los ATTRIBS para el piloto ...
+    private Vector attributes = null;
+    
+    /**
+     * Constructor de DxfEntityMaker.
+     * @param proj, proyecci�n cartogr�fica en la que se encontrar�n las entidades
+     * que creemos.
+     */
+    public DxfEntityMaker(IProjection proj) {
+        this.proj = proj;
+        layers = new DxfTable();
+        entities = new DxfEntityList(proj);
+        blkList = new Vector();
+
+        // jmorell, 050406: implementaci�n inicial de los ATTRIBS para el piloto ...
+        attributes = new Vector();
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getBlkList()
+     */
+    public Vector getBlkList() {
+        return blkList;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getObjects()
+     */
+    public IObjList getObjects() {
+        return entities;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getExtent()
+     */
+    public Extent getExtent() {
+        return entities.getExtent();
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#setAddingToBlock(boolean)
+     */
+    public void setAddingToBlock(boolean a) {
+        addingToBlock = a;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createLayer(org.cresques.io.DxfGroupVector)
+     */
+    public void createLayer(DxfGroupVector grp) throws Exception {
+        int color = grp.getDataAsInt(62);
+        DxfLayer layer = new DxfLayer(grp.getDataAsString(2),
+                                      Math.abs(grp.getDataAsInt(62)));
+
+        if (color < 0) {
+            layer.isOff = true;
+        }
+
+        layer.lType = grp.getDataAsString(6);
+        layer.setFlags(grp.getDataAsInt(70));
+
+        // compruebo flags
+        if ((layer.flags & 0x01) == 0x01) {
+            layer.frozen = true;
+        }
+
+        if ((layer.flags & 0x02) == 0x02) {
+            layer.frozen = true;
+        }
+
+        DxfFile.logger.debug("LAYER color=" + layer.getColor());
+
+        layers.add(layer);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createPolyline(org.cresques.io.DxfGroupVector)
+     */
+    public void createPolyline(DxfGroupVector grp) throws Exception {
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        DxfPolyline entity = new DxfPolyline(proj, layer);
+
+        if (grp.hasCode(5)) {
+            String hexS = grp.getDataAsString(5);
+            Integer hexI = Integer.decode("0x" + hexS);
+            int hexi = hexI.intValue();
+            entity.setHandle(hexi);
+        } else {
+            entity.setHandle(entities.size() + 40);
+        }
+
+        if (grp.hasCode(100)) {
+            entity.setSubclassMarker(grp.getDataAsString(100));
+        }
+
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double thickness = 0;
+
+        if (grp.hasCode(10)) {
+            x = grp.getDataAsDouble(10);
+        }
+
+        if (grp.hasCode(20)) {
+            y = grp.getDataAsDouble(20);
+        }
+
+        if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+            entity.setElevation(z);
+        }
+
+        /*if (grp.hasCode(39))
+                thickness = grp.getDataAsDouble(39);*/
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (grp.hasCode(66)) {
+            entity.entitiesFollow = grp.getDataAsInt(66);
+        }
+
+        if (grp.hasCode(70)) {
+            entity.flags = grp.getDataAsInt(70);
+        }
+
+        if (grp.hasCode(210)) {
+            xtruX = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            xtruY = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            xtruZ = grp.getDataAsDouble(230);
+        }
+
+        if ((entity.flags & 0x01) == 0x01) {
+            entity.closed = true;
+        }
+
+        lastEntity = entity;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#endSeq(org.cresques.io.DxfGroupVector)
+     */
+    public void endSeq() throws Exception {
+        if (lastEntity instanceof DxfPolyline) {
+            DxfPolyline polyline = (DxfPolyline) lastEntity;
+
+            if (polyline.closed) {
+                ((DxfPolyline) lastEntity).add(firstPt);
+
+                if (bulge > 0) {
+                    int cnt = ((DxfPolyline) lastEntity).pts.size();
+
+                    if ((((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                            2))).getX() == ((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                                                              1))).getX()) &&
+                            (((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                2))).getY() == ((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                                                                  1))).getY())) {
+                        // no se construye el arco
+                    } else {
+                        Vector arc = DxfPolyline.createArc((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                         2)),
+                                                           (Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                         1)),
+                                                           bulge);
+                        ((DxfPolyline) lastEntity).pts.remove(cnt - 1);
+
+                        for (int i = 0; i < arc.size(); i++) {
+                            Point2D pt = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                          ((Point2D) arc.get(i)).getY());
+                            ((DxfPolyline) lastEntity).add(pt);
+
+                            if (((DxfPolyline) lastEntity).pts.size() == 1) {
+                                firstPt = pt;
+                            }
+                        }
+                    }
+
+                    bulge = 0.0;
+                } else if (bulge < 0) {
+                    int cnt = ((DxfPolyline) lastEntity).pts.size();
+
+                    if ((((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                            2))).getX() == ((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                                                              1))).getX()) &&
+                            (((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                2))).getY() == ((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                                                                  1))).getY())) {
+                        // no se construye el arco
+                    } else {
+                        Vector arc = DxfPolyline.createArc((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                         2)),
+                                                           (Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                         1)),
+                                                           bulge);
+                        ((DxfPolyline) lastEntity).pts.remove(cnt - 1);
+
+                        for (int i = arc.size() - 1; i >= 0; i--) {
+                            Point2D pt = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                          ((Point2D) arc.get(i)).getY());
+                            ((DxfPolyline) lastEntity).add(pt);
+
+                            if (((DxfPolyline) lastEntity).pts.size() == 1) {
+                                firstPt = pt;
+                            }
+                        }
+                    }
+
+                    bulge = 0.0;
+                }
+            }
+
+            // 050315, jmorell: Para leer Polylines estas tb deben tener vector de bulges.
+            for (int i = 0; i < ((DxfPolyline) lastEntity).pts.size(); i++) {
+                // jmorell, 050405: intentando leer DxfPolylines con bulges para el
+                // piloto ...
+                //polyline.addBulge(new Double(0));
+                ((DxfPolyline) lastEntity).addBulge(new Double(0));
+            }
+
+            //((DxfPolyline)lastEntity).addBulge(new Double(bulge));
+            //lastEntity.setHandle(entities.size()+40);
+            if (addingToBlock == false) {
+                entities.add(lastEntity);
+            } else {
+                blk.add(lastEntity);
+
+            }
+
+            lastEntity = null;
+        } else if (lastEntity instanceof DxfInsert) {
+            // Se trata de un SEQEND despues de un ATTRIB
+            gestionaInsert((DxfInsert) lastEntity, lastEntity.getLayer());
+
+            if (addingToBlock == false) {
+                entities.add(lastEntity);
+            } else {
+                blk.add(lastEntity);
+            }
+
+            lastEntity = null;
+        } else {
+            // Caso no contemplado
+        }
+
+        xtruX = 0.0;
+        xtruY = 0.0;
+        xtruZ = 1.0;
+        bulge = 0.0;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#addVertex(org.cresques.io.DxfGroupVector)
+     */
+    public void addVertex(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        int flags = 0;
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+
+        if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+        }
+
+        if (grp.hasCode(70)) {
+            flags = grp.getDataAsInt(70);
+        }
+
+        //bulge = 0.0;
+        if (bulge == 0.0) {
+            if (grp.hasCode(42)) {
+                bulge = grp.getDataAsDouble(42);
+
+                //bulge = 0.0;
+            } else {
+                bulge = 0.0;
+            }
+
+            Point3D point_in = new Point3D(x, y, z);
+            Point3D xtru = new Point3D(xtruX, xtruY, xtruZ);
+            Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+
+            if (((flags & 0x80) == 0x80) && ((flags & 0x40) == 0)) {
+                int[] face = { 0, 0, 0, 0 };
+                face[0] = grp.getDataAsInt(71);
+                face[1] = grp.getDataAsInt(72);
+                face[2] = grp.getDataAsInt(73);
+                face[3] = grp.getDataAsInt(74);
+                ((DxfPolyline) lastEntity).addFace(face);
+            } else {
+                x = point_out.getX();
+                y = point_out.getY();
+                z = point_out.getZ();
+
+                Point2D ptaux = proj.createPoint(x, y);
+                Point3D pt = new Point3D(ptaux.getX(), ptaux.getY(), z);
+                ((DxfPolyline) lastEntity).add(pt);
+
+                if (((DxfPolyline) lastEntity).pts.size() == 1) {
+                    firstPt = pt;
+                }
+            }
+        } else if (bulge > 0.0) {
+            double bulge_aux = 0.0;
+
+            if (grp.hasCode(42)) {
+                bulge_aux = grp.getDataAsDouble(42);
+            } else {
+                bulge_aux = 0.0;
+            }
+
+            Point3D point_in = new Point3D(x, y, z);
+            Point3D xtru = new Point3D(xtruX, xtruY, xtruZ);
+            Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+            x = point_out.getX();
+            y = point_out.getY();
+            z = point_out.getZ();
+
+            Point2D ptaux = proj.createPoint(x, y);
+            Point3D pt = new Point3D(ptaux.getX(), ptaux.getY(), z);
+            ((DxfPolyline) lastEntity).add(pt);
+
+            if (((DxfPolyline) lastEntity).pts.size() == 1) {
+                firstPt = pt;
+            }
+
+            int cnt = ((DxfPolyline) lastEntity).pts.size();
+
+            if ((((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt - 2))).getX() == ((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                                                        1))).getX()) &&
+                    (((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt - 2))).getY() == ((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                                                            1))).getY())) {
+                // no se construye el arco
+            } else {
+                Vector arc = DxfPolyline.createArc((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                 2)),
+                                                   (Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                 1)),
+                                                   bulge);
+                ((DxfPolyline) lastEntity).pts.remove(cnt - 1);
+
+                for (int i = 0; i < arc.size(); i++) {
+                    ptaux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                          ((Point2D) arc.get(i)).getY());
+                    pt = new Point3D(ptaux.getX(), ptaux.getY(), z);
+                    ((DxfPolyline) lastEntity).add(pt);
+
+                    if (((DxfPolyline) lastEntity).pts.size() == 1) {
+                        firstPt = pt;
+                    }
+                }
+            }
+
+            bulge = bulge_aux;
+        } else { //si el bulge es menor que cero.
+
+            double bulge_aux = 0.0;
+
+            if (grp.hasCode(42)) {
+                bulge_aux = grp.getDataAsDouble(42); // * (-1.0);
+            } else {
+                bulge_aux = 0.0;
+            }
+
+            Point3D point_in = new Point3D(x, y, z);
+            Point3D xtru = new Point3D(xtruX, xtruY, xtruZ);
+            Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+            x = point_out.getX();
+            y = point_out.getY();
+            z = point_out.getZ();
+
+            Point2D ptaux = proj.createPoint(x, y);
+            Point3D pt = new Point3D(ptaux.getX(), ptaux.getY(), z);
+            ((DxfPolyline) lastEntity).add(pt);
+
+            if (((DxfPolyline) lastEntity).pts.size() == 1) {
+                firstPt = pt;
+            }
+
+            int cnt = ((DxfPolyline) lastEntity).pts.size();
+
+            if ((((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt - 2))).getX() == ((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                                                        1))).getX()) &&
+                    (((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt - 2))).getY() == ((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                                                            1))).getY())) {
+                // no se construye el arco
+            } else {
+                Vector arc = DxfPolyline.createArc((Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                 2)),
+                                                   (Point2D) (((DxfPolyline) lastEntity).pts.get(cnt -
+                                                                                                 1)),
+                                                   bulge);
+                ((DxfPolyline) lastEntity).pts.remove(cnt - 1);
+
+                for (int i = arc.size() - 1; i >= 0; i--) {
+                    ptaux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                          ((Point2D) arc.get(i)).getY());
+                    pt = new Point3D(ptaux.getX(), ptaux.getY(), z);
+                    ((DxfPolyline) lastEntity).add(pt);
+
+                    if (((DxfPolyline) lastEntity).pts.size() == 1) {
+                        firstPt = pt;
+                    }
+                }
+            }
+
+            bulge = bulge_aux;
+        }
+
+        /*if (grp.hasCode(5)) {
+                String hexS = grp.getDataAsString(5);
+                Integer hexI = Integer.decode("0x" + hexS);
+                int hexi = hexI.intValue();
+                lastEntity.setHandle(hexi);
+        } else {
+                lastEntity.setHandle(entities.size()+40);
+        }*/
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createLwPolyline(org.cresques.io.DxfGroupVector)
+     */
+    public void createLwPolyline(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double elev = 0.0;
+        DxfGroup g = null;
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        DxfLwPolyline entity = new DxfLwPolyline(proj, layer);
+        
+        if (grp.hasCode(38)) {
+            entity.setElevation(grp.getDataAsDouble(38));
+        }
+
+        if (grp.hasCode(5)) {
+            String hexS = grp.getDataAsString(5);
+            Integer hexI = Integer.decode("0x" + hexS);
+            int hexi = hexI.intValue();
+            entity.setHandle(hexi);
+        } else {
+            entity.setHandle(entities.size() + 40);
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        double bulge = 0;
+        boolean isNewCoord = false;
+
+        for (int i = 0; i < grp.size(); i++) {
+            bulge = 0;
+            isNewCoord = false;
+            g = (DxfGroup) grp.get(i);
+
+            if (g.getCode() == 10) {
+                x = ((Double) g.getData()).doubleValue();
+            } else if (g.getCode() == 20) {
+                y = ((Double) g.getData()).doubleValue();
+
+                // A�adiendo extrusion a LwPolyline ...
+                Point3D point_in1 = new Point3D(x, y, elev);
+                Point3D xtru = new Point3D(extx, exty, extz);
+                Point3D point_out1 = DxfCalXtru.CalculateXtru(point_in1, xtru);
+                x = point_out1.getX();
+                y = point_out1.getY();
+                elev = point_out1.getZ();
+
+                //
+                //if (y <= 1.0) throw new Exception("Y == "+y);
+                entity.add(proj.createPoint(x, y));
+                entity.addBulge(new Double(0));
+                x = 0.0;
+                y = 0.0;
+                isNewCoord = true;
+            } else if (g.getCode() == 42) {
+                //entity.addBulge((Double)g.getData());
+                entity.getBulges().remove(entity.getBulges().size() - 1);
+                entity.getBulges().add((Double) g.getData());
+                bulge = ((Double) g.getData()).doubleValue();
+            }
+
+            /*if (bulge == 0 && isNewCoord) {
+                    entity.addBulge(new Double(0));
+            }*/
+        }
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (grp.hasCode(70)) {
+            entity.flags = grp.getDataAsInt(70);
+
+        }
+
+        if ((entity.flags & 0x01) == 0x01) {
+            entity.closed = true;
+        }
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createLine(org.cresques.io.DxfGroupVector)
+     */
+    public void createLine(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z1 = 0.0;
+        double z2 = 0.0;
+        DxfGroup g = null;
+        Point2D pt1 = null;
+        Point2D pt2 = null;
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+
+        if (grp.hasCode(30)) {
+            z1 = grp.getDataAsDouble(30);
+        }
+
+        pt1 = proj.createPoint(x, y);
+        x = grp.getDataAsDouble(11);
+        y = grp.getDataAsDouble(21);
+
+        if (grp.hasCode(31)) {
+            z2 = grp.getDataAsDouble(31);
+        }
+
+        pt2 = proj.createPoint(x, y);
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsInt(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsInt(230);
+        }
+
+        Point3D point_in1 = new Point3D(pt1.getX(), pt1.getY(), z1);
+        Point3D point_in2 = new Point3D(pt2.getX(), pt2.getY(), z2);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point2D point_out1 = DxfCalXtru.CalculateXtru(point_in1, xtru);
+        Point2D point_out2 = DxfCalXtru.CalculateXtru(point_in2, xtru);
+        pt1.setLocation(point_out1);
+        pt2.setLocation(point_out2);
+
+        DxfLine entity = new DxfLine(proj, layer, pt1, pt2);
+
+        if (grp.hasCode(5)) {
+            String hexS = grp.getDataAsString(5);
+            Integer hexI = Integer.decode("0x" + hexS);
+            int hexi = hexI.intValue();
+            entity.setHandle(hexi);
+        } else {
+            entity.setHandle(entities.size() + 40);
+        }
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createText(org.cresques.io.DxfGroupVector)
+     */
+    public void createText(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double h = 0.0;
+        double rot = 0.0;
+        DxfGroup g = null;
+
+        //OJO! El segundo punto es opcional ...
+        Point2D pt1 = null;
+
+        //OJO! El segundo punto es opcional ...
+        Point2D pt2 = null;
+        String txt = null;
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+
+        txt = grp.getDataAsString(1);
+
+        DxfText entity = new DxfText(proj, layer, txt);
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        z = grp.getDataAsDouble(30);
+
+        if (grp.hasCode(5)) {
+            String hexS = grp.getDataAsString(5);
+            Integer hexI = Integer.decode("0x" + hexS);
+            int hexi = hexI.intValue();
+            entity.setHandle(hexi);
+        } else {
+            entity.setHandle(entities.size() + 40);
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+
+        entity.setPt(proj.createPoint(x, y));
+
+        //entity.setPt1(proj.createPoint(x, y));
+        if (grp.hasCode(11)) {
+            entity.setTwoPointsFlag(true);
+            entity.setPt1(proj.createPoint(entity.getPt().getX(),
+                                           entity.getPt().getY()));
+            x = grp.getDataAsDouble(11);
+            y = grp.getDataAsDouble(21);
+            z = grp.getDataAsDouble(31);
+
+            point_in = new Point3D(x, y, z);
+            point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+            x = point_out.getX();
+            y = point_out.getY();
+            z = point_out.getZ();
+
+            entity.setPt2(proj.createPoint(x, y));
+        }
+
+        entity.setHeight(grp.getDataAsDouble(40));
+
+        if (grp.hasCode(50)) {
+            entity.setRotation(grp.getDataAsDouble(50));
+
+        }
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (grp.hasCode(72)) {
+            entity.align = grp.getDataAsInt(72);
+        }
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createMText(org.cresques.io.DxfGroupVector)
+     */
+    public void createMText(DxfGroupVector v) throws Exception {
+        // TODO Auto-generated method stub
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createPoint(org.cresques.io.DxfGroupVector)
+     */
+    public void createPoint(DxfGroupVector grp) throws Exception {
+        double x = 0.0; //, h= 0.0, rot= 0.0;
+        double y = 0.0; //, h= 0.0, rot= 0.0;
+        double z = 0.0; //, h= 0.0, rot= 0.0;
+        DxfGroup g = null;
+        Point2D pt = null;
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        DxfPoint entity = new DxfPoint(proj, layer);
+
+        if (grp.hasCode(5)) {
+            String hexS = grp.getDataAsString(5);
+            Integer hexI = Integer.decode("0x" + hexS);
+            int hexi = hexI.intValue();
+            entity.setHandle(hexi);
+        } else {
+            entity.setHandle(entities.size() + 40);
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+
+        if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+        }
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsInt(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsInt(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point2D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        entity.setPt(proj.createPoint(x, y));
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createCircle(org.cresques.io.DxfGroupVector)
+     */
+    public void createCircle(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+
+        double y = 0.0;
+
+        double z = 0.0;
+        double r = 0.0;
+        DxfGroup g = null;
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+
+        if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+        }
+
+        if (grp.hasCode(40)) {
+            r = grp.getDataAsDouble(40);
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point2D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+
+        Point2D center = proj.createPoint(x, y);
+        Point2D[] pts = new Point2D[360];
+        int angulo = 0;
+
+        for (angulo = 0; angulo < 360; angulo++) {
+            pts[angulo] = new Point2D.Double(center.getX(), center.getY());
+            pts[angulo].setLocation(pts[angulo].getX() +
+                                    (r * Math.sin((angulo * Math.PI) / (double) 180.0)),
+                                    pts[angulo].getY() +
+                                    (r * Math.cos((angulo * Math.PI) / (double) 180.0)));
+
+            if (pts.length == 1) {
+                firstPt = pts[angulo];
+            }
+        }
+
+        DxfCircle entity = new DxfCircle(proj, layer, pts);
+
+        if (grp.hasCode(5)) {
+            String hexS = grp.getDataAsString(5);
+            Integer hexI = Integer.decode("0x" + hexS);
+            int hexi = hexI.intValue();
+            entity.setHandle(hexi);
+        } else {
+            entity.setHandle(entities.size() + 40);
+        }
+
+        entity.setCenter(new Point2D.Double(x, y));
+
+        entity.setRadius(r);
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createEllipse(org.cresques.io.DxfGroupVector)
+     */
+    public void createEllipse(DxfGroupVector grp) throws Exception {
+        double incX = 0.0;
+        double incY = 0.0;
+        double incZ = 0.0;
+        double xc = 0.0;
+        double yc = 0.0;
+        double zc = 0.0;
+        double mMAxisRatio = 0.0;
+        DxfGroup g = null;
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        xc = grp.getDataAsDouble(10);
+        yc = grp.getDataAsDouble(20);
+
+        if (grp.hasCode(30)) {
+            zc = grp.getDataAsDouble(30);
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(xc, yc, zc);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        xc = point_out.getX();
+        yc = point_out.getY();
+        zc = point_out.getZ();
+
+        incX = grp.getDataAsDouble(11);
+        incY = grp.getDataAsDouble(21);
+
+        if (grp.hasCode(31)) {
+            incZ = grp.getDataAsDouble(31);
+        }
+
+        if (grp.hasCode(40)) {
+            mMAxisRatio = grp.getDataAsDouble(40);
+        }
+
+        Point2D pt2 = new Point2D.Double(xc + incX, yc + incY);
+        Point2D pt1 = new Point2D.Double(xc - incX, yc - incY);
+        double majorAxisLength = pt1.distance(pt2);
+        double minorAxisLength = majorAxisLength * mMAxisRatio;
+
+        DxfEllipse entity = new DxfEllipse(proj, layer, pt1, pt2,
+                                           minorAxisLength);
+
+        if (grp.hasCode(5)) {
+            String hexS = grp.getDataAsString(5);
+            Integer hexI = Integer.decode("0x" + hexS);
+            int hexi = hexI.intValue();
+            entity.setHandle(hexi);
+        } else {
+            entity.setHandle(entities.size() + 40);
+        }
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createArc(org.cresques.io.DxfGroupVector)
+     */
+    public void createArc(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double r = 0.0;
+        double empieza = 0.0;
+        double acaba = 0.0;
+        DxfGroup g = null;
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+
+        if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+        }
+
+        if (grp.hasCode(40)) {
+            r = grp.getDataAsDouble(40);
+        }
+
+        if (grp.hasCode(50)) {
+            empieza = grp.getDataAsDouble(50);
+        }
+
+        if (grp.hasCode(51)) {
+            acaba = grp.getDataAsDouble(51);
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point2D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+
+        Point2D center = proj.createPoint(x, y);
+
+        int iempieza = (int) empieza;
+        int iacaba = (int) acaba;
+
+        double angulo = 0;
+        Point2D[] pts = null;
+
+        if (empieza <= acaba) {
+            pts = new Point2D[(iacaba - iempieza) + 2];
+            angulo = empieza;
+            pts[0] = new Point2D.Double(center.getX() +
+                                        (r * Math.cos((angulo * Math.PI) / (double) 180.0)),
+                                        center.getY() +
+                                        (r * Math.sin((angulo * Math.PI) / (double) 180.0)));
+
+            for (int i = 1; i <= ((iacaba - iempieza) + 1); i++) {
+                angulo = (double) (iempieza + i);
+                pts[i] = new Point2D.Double(center.getX() +
+                                            (r * Math.cos((angulo * Math.PI) / (double) 180.0)),
+                                            center.getY() +
+                                            (r * Math.sin((angulo * Math.PI) / (double) 180.0)));
+            }
+
+            angulo = acaba;
+            pts[(iacaba - iempieza) + 1] = new Point2D.Double(center.getX() +
+                                                              (r * Math.cos((angulo * Math.PI) / (double) 180.0)),
+                                                              center.getY() +
+                                                              (r * Math.sin((angulo * Math.PI) / (double) 180.0)));
+        } else {
+            pts = new Point2D[(360 - iempieza) + iacaba + 2];
+            angulo = empieza;
+
+            pts[0] = new Point2D.Double(center.getX() +
+                                        (r * Math.cos((angulo * Math.PI) / (double) 180.0)),
+                                        center.getY() +
+                                        (r * Math.sin((angulo * Math.PI) / (double) 180.0)));
+
+            for (int i = 1; i <= (360 - iempieza); i++) {
+                angulo = (double) (iempieza + i);
+                pts[i] = new Point2D.Double(center.getX() +
+                                            (r * Math.cos((angulo * Math.PI) / (double) 180.0)),
+                                            center.getY() +
+                                            (r * Math.sin((angulo * Math.PI) / (double) 180.0)));
+            }
+
+            for (int i = (360 - iempieza) + 1;
+                     i <= ((360 - iempieza) + iacaba); i++) {
+                angulo = (double) (i - (360 - iempieza));
+                pts[i] = new Point2D.Double(center.getX() +
+                                            (r * Math.cos((angulo * Math.PI) / (double) 180.0)),
+                                            center.getY() +
+                                            (r * Math.sin((angulo * Math.PI) / (double) 180.0)));
+            }
+
+            angulo = acaba;
+            pts[(360 - iempieza) + iacaba + 1] = new Point2D.Double(center.getX() +
+                                                                    (r * Math.cos((angulo * Math.PI) / (double) 180.0)),
+                                                                    center.getY() +
+                                                                    (r * Math.sin((angulo * Math.PI) / (double) 180.0)));
+        }
+
+        DxfArc entity = new DxfArc(proj, layer, pts);
+
+        if (grp.hasCode(5)) {
+            String hexS = grp.getDataAsString(5);
+            Integer hexI = Integer.decode("0x" + hexS);
+            int hexi = hexI.intValue();
+            entity.setHandle(hexi);
+        } else {
+            entity.setHandle(entities.size() + 40);
+        }
+
+        // 050223, jmorell: Establecimiento de los par�metros del arco.
+        entity.setCentralPoint(pts[(pts.length) / 2]);
+
+        entity.setInit(pts[0]);
+        entity.setEnd(pts[pts.length - 1]);
+
+        entity.setCenter(center);
+        entity.setRadius(r);
+        entity.setInitAngle(empieza);
+
+        entity.setEndAngle(acaba);
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createInsert(org.cresques.io.DxfGroupVector)
+     */
+    public void createInsert(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        DxfGroup g = null;
+        Point2D pt = new Point2D.Double(0.0, 0.0);
+        Point2D scaleFactor = new Point2D.Double(1.0, 1.0);
+        double rotAngle = 0.0;
+        String blockName = "";
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+
+        DxfInsert entity = new DxfInsert(proj, layer);
+        DxfPoint secondEntity = new DxfPoint(proj, layer);
+
+        // jmorell, 050406: implementaci�n inicial de los ATTRIBS para el piloto ...
+        int attributesFollowFlag = 0;
+
+        if (grp.hasCode(2)) {
+            blockName = grp.getDataAsString(2);
+            entity.setBlockName(blockName);
+        }
+
+        if (grp.hasCode(10)) {
+            x = grp.getDataAsDouble(10);
+        }
+
+        if (grp.hasCode(20)) {
+            y = grp.getDataAsDouble(20);
+        }
+
+        if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+        }
+
+        if (grp.hasCode(41)) {
+            scaleFactor.setLocation(grp.getDataAsDouble(41), scaleFactor.getY());
+            entity.setScaleFactor(scaleFactor);
+        } else {
+            entity.setScaleFactor(scaleFactor);
+        }
+
+        if (grp.hasCode(42)) {
+            scaleFactor.setLocation(scaleFactor.getX(), grp.getDataAsDouble(42));
+            entity.setScaleFactor(scaleFactor);
+        } else {
+            entity.setScaleFactor(scaleFactor);
+        }
+
+        if (grp.hasCode(43)) {
+            // TODO La coordenada z
+        }
+
+        if (grp.hasCode(50)) {
+            rotAngle = grp.getDataAsDouble(50);
+            entity.setRotAngle(rotAngle);
+        }
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (grp.hasCode(66)) {
+            attributesFollowFlag = grp.getDataAsInt(66);
+
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point2D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+
+        entity.setBlkList(blkList);
+
+        entity.encuentraBloque(blockName);
+
+        entity.setPt(proj.createPoint(x, y));
+        secondEntity.setPt(proj.createPoint(x, y));
+
+        if ((entity.getBlockFound() == true) && (attributesFollowFlag != 1)) {
+            gestionaInsert(entity, layer);
+        }
+
+        if (attributesFollowFlag == 1) {
+            lastEntity = entity;
+        } else {
+            if (addingToBlock == false) {
+                entities.add(secondEntity);
+            } else if ((addingToBlock == true) && (entity.blockFound == true)) {
+                blk.add(entity);
+            }
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createSolid(org.cresques.io.DxfGroupVector)
+     */
+    public void createSolid(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z1 = 0.0;
+        double z2 = 0.0;
+        double z3 = 0.0;
+        double z4 = 0.0;
+        DxfGroup g = null;
+
+        //Point2D pt1 = null, pt2 = null, pt3 = null, pt4 = null;
+        Point2D[] pts = new Point2D[4];
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+
+        if (grp.hasCode(30)) {
+            z1 = grp.getDataAsDouble(30);
+        }
+
+        pts[0] = proj.createPoint(x, y);
+        x = grp.getDataAsDouble(11);
+        y = grp.getDataAsDouble(21);
+
+        if (grp.hasCode(31)) {
+            z2 = grp.getDataAsDouble(31);
+        }
+
+        pts[1] = proj.createPoint(x, y);
+        x = grp.getDataAsDouble(12);
+        y = grp.getDataAsDouble(22);
+
+        if (grp.hasCode(32)) {
+            z3 = grp.getDataAsDouble(32);
+        }
+
+        pts[2] = proj.createPoint(x, y);
+        x = grp.getDataAsDouble(13);
+        y = grp.getDataAsDouble(23);
+
+        if (grp.hasCode(33)) {
+            z2 = grp.getDataAsDouble(33);
+        }
+
+        pts[3] = proj.createPoint(x, y);
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in1 = new Point3D(pts[0].getX(), pts[0].getY(), z1);
+        Point3D point_in2 = new Point3D(pts[1].getX(), pts[1].getY(), z2);
+        Point3D point_in3 = new Point3D(pts[2].getX(), pts[2].getY(), z3);
+        Point3D point_in4 = new Point3D(pts[3].getX(), pts[3].getY(), z4);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point2D point_out1 = DxfCalXtru.CalculateXtru(point_in1, xtru);
+        Point2D point_out2 = DxfCalXtru.CalculateXtru(point_in2, xtru);
+        Point2D point_out3 = DxfCalXtru.CalculateXtru(point_in3, xtru);
+        Point2D point_out4 = DxfCalXtru.CalculateXtru(point_in4, xtru);
+        pts[0].setLocation(point_out1);
+        pts[1].setLocation(point_out2);
+        pts[2].setLocation(point_out3);
+        pts[3].setLocation(point_out4);
+
+        DxfSolid entity = new DxfSolid(proj, layer, pts);
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createSpline(org.cresques.io.DxfGroupVector)
+     */
+    /**
+     * Los Splines estan implementados como LwPolylines. Se pintan las lineas
+     * entre los vertices pero no se aplica la curvatura Spline.
+     * TODO: Contemplar la curvatura spline para Splines.
+     */
+    public void createSpline(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double elev = 0.0;
+        DxfGroup g = null;
+
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        DxfLwPolyline entity = new DxfLwPolyline(proj, layer);
+
+        for (int i = 0; i < grp.size(); i++) {
+            g = (DxfGroup) grp.get(i);
+
+            if (g.getCode() == 10) {
+                x = ((Double) g.getData()).doubleValue();
+            } else if (g.getCode() == 20) {
+                y = ((Double) g.getData()).doubleValue();
+
+                //if (y <= 1.0) throw new Exception("Y == "+y);
+                entity.add(proj.createPoint(x, y));
+                x = 0.0;
+                y = 0.0;
+            }
+        }
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (grp.hasCode(70)) {
+            entity.flags = grp.getDataAsInt(70);
+        }
+
+        if ((entity.flags & 0x01) == 0x01) {
+            entity.closed = true;
+        }
+
+        if (addingToBlock == false) {
+            entities.add(entity);
+        } else {
+            blk.add(entity);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createBlock(org.cresques.io.DxfGroupVector)
+     */
+    public void createBlock(DxfGroupVector grp) throws Exception {
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        blk = new DxfBlock(proj);
+
+        Point2D basePoint = new Point2D.Double();
+        String blockName = "";
+
+        addingToBlock = true;
+
+        blkList.add(iterator, blk);
+
+        if (grp.hasCode(1)) {
+            blockName = grp.getDataAsString(1);
+            blk.setBlkName(blockName);
+        }
+
+        if (grp.hasCode(2)) {
+            blockName = grp.getDataAsString(2);
+            blk.setBlkName(blockName);
+        }
+
+        if (grp.hasCode(3)) {
+            blockName = grp.getDataAsString(3);
+            blk.setBlkName(blockName);
+        }
+
+        if (grp.hasCode(10)) {
+            basePoint = new Point2D.Double(grp.getDataAsDouble(10),
+                                           basePoint.getY());
+            blk.setBPoint(basePoint);
+        }
+
+        if (grp.hasCode(20)) {
+            basePoint = new Point2D.Double(basePoint.getX(),
+                                           grp.getDataAsDouble(20));
+            blk.setBPoint(basePoint);
+        }
+
+        if (grp.hasCode(30)) {
+            // TODO Contemplar la coordenada z
+        }
+
+        if (grp.hasCode(70)) {
+            blk.flags = grp.getDataAsInt(70);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#endBlk(org.cresques.io.DxfGroupVector)
+     */
+    public void endBlk(DxfGroupVector grp) throws Exception {
+        //DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        setAddingToBlock(false);
+        iterator = iterator + 1;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#testBlocks()
+     */
+    public void testBlocks() {
+        Vector blkList = getBlkList();
+        DxfBlock dxfBlock = null;
+        DxfEntity dxfEntity = null;
+        DxfLine dxfLine = null;
+        DxfInsert dxfInsert = null;
+        Point2D point1 = new Point2D.Double();
+        Point2D point2 = new Point2D.Double();
+
+        for (int i = 0; i < blkList.size(); i++) {
+            dxfBlock = (DxfBlock) blkList.get(i);
+
+            int aux = dxfBlock.getBlkElements().size();
+
+            for (int j = 0; j < aux; j++) {
+                dxfEntity = (DxfEntity) dxfBlock.getBlkElements().get(j);
+
+                if (dxfEntity instanceof DxfLine) {
+                    dxfLine = (DxfLine) dxfEntity;
+                    point1 = dxfLine.getPts()[0];
+                    point2 = dxfLine.getPts()[1];
+
+                } else if (dxfEntity instanceof DxfInsert) {
+                    dxfInsert = (DxfInsert) dxfEntity;
+
+                    String nomBlock = dxfInsert.getBlockName();
+
+                    if (dxfInsert.getBlockFound() == false) {
+                        boolean aux_bool = dxfInsert.encuentraBloque(nomBlock);
+                        gestionaInsert(dxfInsert, dxfInsert.getDxfLayer());
+                        dxfBlock.add(dxfInsert);
+                    }
+                }
+            }
+        }
+    }
+    
+    /**
+     * Establece la proyecci�n cartogr�fica en la que se van a crear las entidades.
+     * @param p, Proyecci�n cartogr�fica.
+     */
+    public void setProjection(IProjection proj) {
+        this.proj = proj;
+    }
+    
+    /**
+     * Devuelve la proyecci�n cartogr�fica en la que se encuentran las entidades.
+     * @return IProjection, proyecci�n cartogr�fica.
+     */
+    public IProjection getProjection() {
+        return proj;
+    }
+    
+    /**
+     * Permite reproyectar las entidades creadas dado un conjunto de coordenadas de
+     * transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        entities.reProject(rp);
+        setProjection(rp.getPDest());
+    }
+    
+    /**
+     * Devuelve las entidades creadas.
+     * @return DxfEntityList
+     */
+    public DxfEntityList getEntities() {
+        return entities;
+    }
+    
+    /**
+     * Devuelve las capas del DXF en forma de DxfTable.
+     * @return DxfTable
+     */
+    public DxfTable getLayers() {
+        return layers;
+    }
+    
+    /**
+     * Devuelve el bloque activo.
+     * @return DxfBlock
+     */
+    public DxfBlock getBlk() {
+        return blk;
+    }
+    
+    /**
+     * M�todo que permite incluir en la lista general de objetos los objetos que se
+     * encuentran dentro del bloque referenciado por cada DxfInsert.
+     * @param entity, el punto de inserci�n.
+     * @param layer, la capa en la que se encuentra.
+     */
+    public void gestionaInsert(DxfInsert entity, DxfLayer layer) {
+        DxfEntity dxfEntity = null;
+        DxfLine dxfLine = null;
+        DxfInsert dxfInsert = null;
+        DxfPolyline dxfPolyline = null;
+        DxfArc dxfArc = null;
+        DxfCircle dxfCircle = null;
+        DxfLwPolyline dxfLwPolyline = null;
+        DxfPoint dxfPoint = null;
+        DxfText dxfText = null;
+        DxfSolid dxfSolid = null;
+
+        // jmorell, 050406: intentando corregir cosas que salen fuera de sitio ...
+        double bPointX = 0.0;
+        double bPointY = 0.0;
+
+        //if (entity.getBlockFound() == true) {
+        bPointX = entity.block.bPoint.getX();
+        bPointY = entity.block.bPoint.getY();
+
+        //}
+        double sFactorX = entity.getScaleFactor().getX();
+        double sFactorY = entity.getScaleFactor().getY();
+        double rAngleGra = entity.getRotAngle();
+        double rAngleRad = (rAngleGra * Math.PI) / 180.0;
+
+        for (int i = 0; i < entity.block.size(); i++) {
+            dxfEntity = (DxfEntity) entity.block.get(i);
+
+            Point2D point1 = new Point2D.Double();
+            Point2D point2 = new Point2D.Double();
+            Point2D point11 = new Point2D.Double();
+            Point2D point22 = new Point2D.Double();
+            Point2D pointAux = null;
+
+            if (dxfEntity instanceof DxfLine) {
+                dxfLine = (DxfLine) dxfEntity;
+                point1 = dxfLine.getPts()[0];
+
+                //double laX = entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX());
+                //double laY = entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY());
+                pointAux = new Point2D.Double(point1.getX() - bPointX,
+                                              point1.getY() - bPointY);
+
+                double laX = entity.pt.getX() +
+                             (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                double laY = entity.pt.getY() +
+                             (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                point11.setLocation(laX, laY);
+                point2 = dxfLine.getPts()[1];
+                pointAux = new Point2D.Double(point2.getX() - bPointX,
+                                              point2.getY() - bPointY);
+                laX = entity.pt.getX() +
+                      (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                      ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                laY = entity.pt.getY() +
+                      (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                      ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                point22.setLocation(laX, laY);
+
+                DxfLine dxfLinee = new DxfLine(proj, layer, point11, point22);
+
+                if (addingToBlock == false) {
+                    entities.add(dxfLinee);
+                }
+            } else if (dxfEntity instanceof DxfInsert) {
+                dxfInsert = (DxfInsert) dxfEntity;
+                point1 = dxfInsert.pt;
+                pointAux = new Point2D.Double(point1.getX() - bPointX,
+                                              point1.getY() - bPointY);
+
+                //point11.setLocation(entity.pt.getX() - entity.block.bPoint.getX() + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - entity.block.bPoint.getY() + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                //point11.setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                double laX = entity.pt.getX() +
+                             (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                double laY = entity.pt.getY() +
+                             (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                point11.setLocation(laX, laY);
+
+                DxfInsert dxfInsertt = new DxfInsert(proj, layer);
+
+                dxfInsertt.pt = point11;
+
+                dxfInsertt.blkList = dxfInsert.blkList;
+                dxfInsertt.block = dxfInsert.block;
+                dxfInsertt.blockName = dxfInsert.blockName;
+                dxfInsertt.rotAngle = dxfInsert.rotAngle;
+                dxfInsertt.layer = dxfInsert.layer;
+                dxfInsertt.proj = dxfInsert.proj;
+
+                Point2D newScale = new Point2D.Double(dxfInsert.getScaleFactor()
+                                                               .getX() * sFactorX,
+                                                      dxfInsert.getScaleFactor()
+                                                               .getY() * sFactorY);
+                dxfInsertt.setScaleFactor(newScale);
+
+                //dxfInsertt.scaleFactor = new Point2D.Double(dxfInsert.scaleFactor.getX() * entity.scaleFactor.getX(), dxfInsert.scaleFactor.getY() * entity.scaleFactor.getY());
+                gestionaInsert(dxfInsertt, layer);
+            } else if (dxfEntity instanceof DxfPolyline) {
+                dxfPolyline = (DxfPolyline) dxfEntity;
+
+                DxfPolyline dxfPolylinee = new DxfPolyline(proj, layer);
+
+                if (dxfPolyline.closed) {
+                    dxfPolylinee.closed = true;
+                }
+
+                Point2D[] points = new Point2D[dxfPolyline.pts.size()];
+                Point2D[] pointss = new Point2D[dxfPolyline.pts.size()];
+
+                for (int j = 0; j < dxfPolyline.pts.size(); j++) {
+                    points[j] = (Point2D) dxfPolyline.pts.get(j);
+                    pointss[j] = new Point2D.Double();
+
+                    //pointss[j].setLocation(entity.pt.getX() - entity.block.bPoint.getX() + ((points[j].getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - entity.block.bPoint.getY() + ((points[j].getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                    //pointss[j].setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((points[j].getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((points[j].getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                    pointAux = new Point2D.Double(points[j].getX() - bPointX,
+                                                  points[j].getY() - bPointY);
+
+                    double laX = entity.pt.getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = entity.pt.getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    pointss[j].setLocation(laX, laY);
+
+                    //pointss[j].setLocation(entity.pt.getX() + ((points[j].getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() + ((points[j].getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                    dxfPolylinee.add(pointss[j]);
+
+                    // jmorell, 050405: Bulges en Dxfpolyline para el piloto
+                    dxfPolylinee.addBulge((Double) dxfPolyline.getBulges().get(j));
+                }
+
+                if (addingToBlock == false) {
+                    entities.add(dxfPolylinee);
+                }
+            } else if (dxfEntity instanceof DxfArc) {
+                dxfArc = (DxfArc) dxfEntity;
+
+                Point2D[] points = new Point2D[dxfArc.pts.length];
+                Point2D[] pointss = new Point2D[dxfArc.pts.length];
+
+                for (int j = 0; j < dxfArc.pts.length; j++) {
+                    points[j] = (Point2D) dxfArc.pts[j];
+                    pointss[j] = new Point2D.Double();
+                    pointAux = new Point2D.Double(points[j].getX() - bPointX,
+                                                  points[j].getY() - bPointY);
+
+                    double laX = entity.pt.getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = entity.pt.getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    pointss[j].setLocation(laX, laY);
+
+                    //pointss[j].setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((points[j].getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((points[j].getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                }
+
+                DxfArc dxfArcc = new DxfArc(proj, layer, pointss);
+
+                // 050315, jmorell: Para que no se pierdan las propiedades en el
+                //					caso de objetos dentro de bloques.
+                pointAux = new Point2D.Double(dxfArc.getCentralPoint().getX() -
+                                              bPointX,
+                                              dxfArc.getCentralPoint().getY() -
+                                              bPointY);
+
+                double laX = entity.pt.getX() +
+                             (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                double laY = entity.pt.getY() +
+                             (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                pointAux.setLocation(laX, laY);
+                dxfArcc.setCentralPoint(pointAux);
+                pointAux = new Point2D.Double(dxfArc.getInit().getX() -
+                                              bPointX,
+                                              dxfArc.getInit().getY() -
+                                              bPointY);
+                laX = entity.pt.getX() +
+                      (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                      ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                laY = entity.pt.getY() +
+                      (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                      ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                pointAux.setLocation(laX, laY);
+                dxfArcc.setInit(pointAux);
+                pointAux = new Point2D.Double(dxfArc.getEnd().getX() - bPointX,
+                                              dxfArc.getEnd().getY() - bPointY);
+                laX = entity.pt.getX() +
+                      (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                      ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                laY = entity.pt.getY() +
+                      (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                      ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                pointAux.setLocation(laX, laY);
+                dxfArcc.setEnd(pointAux);
+                pointAux = new Point2D.Double(dxfArc.getCenter().getX() -
+                                              bPointX,
+                                              dxfArc.getCenter().getY() -
+                                              bPointY);
+                laX = entity.pt.getX() +
+                      (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                      ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                laY = entity.pt.getY() +
+                      (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                      ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                pointAux.setLocation(laX, laY);
+                dxfArcc.setCenter(pointAux);
+                dxfArcc.setRadius(dxfArc.getRadius() * sFactorX);
+
+                // TODO �Como afectan las rotaciones del insert al init y el end angle?
+                dxfArcc.setInitAngle(dxfArc.getInitAngle());
+                dxfArcc.setEndAngle(dxfArc.getEndAngle());
+
+                if (addingToBlock == false) {
+                    entities.add(dxfArcc);
+                }
+            } else if (dxfEntity instanceof DxfCircle) {
+                dxfCircle = (DxfCircle) dxfEntity;
+
+                Point2D[] points = new Point2D[dxfCircle.pts.length];
+                Point2D[] pointss = new Point2D[dxfCircle.pts.length];
+
+                for (int j = 0; j < dxfCircle.pts.length; j++) {
+                    points[j] = (Point2D) dxfCircle.pts[j];
+                    pointss[j] = new Point2D.Double();
+                    pointAux = new Point2D.Double(points[j].getX() - bPointX,
+                                                  points[j].getY() - bPointY);
+
+                    double laX = entity.pt.getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = entity.pt.getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    pointss[j].setLocation(laX, laY);
+
+                    //pointss[j].setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((points[j].getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((points[j].getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                }
+
+                DxfCircle dxfCirclee = new DxfCircle(proj, layer, pointss);
+
+                // 050315, jmorell: Para que no se pierdan las propiedades en el
+                //					caso de objetos dentro de bloques.
+                pointAux = new Point2D.Double(dxfCircle.getCenter().getX() -
+                                              bPointX,
+                                              dxfCircle.getCenter().getY() -
+                                              bPointY);
+
+                double laX = entity.pt.getX() +
+                             (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                double laY = entity.pt.getY() +
+                             (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                pointAux.setLocation(laX, laY);
+                dxfCirclee.setCenter(pointAux);
+
+                // Escala en X = escala en Y ...
+                dxfCirclee.setRadius(dxfCircle.getRadius() * sFactorX);
+
+                if (addingToBlock == false) {
+                    entities.add(dxfCirclee);
+                }
+            } else if (dxfEntity instanceof DxfLwPolyline) {
+                dxfLwPolyline = (DxfLwPolyline) dxfEntity;
+
+                DxfLwPolyline dxfLwPolylinee = new DxfLwPolyline(proj, layer);
+                Point2D[] points = new Point2D[dxfLwPolyline.pts.size()];
+                Point2D[] pointss = new Point2D[dxfLwPolyline.pts.size()];
+
+                for (int j = 0; j < dxfLwPolyline.pts.size(); j++) {
+                    points[j] = (Point2D) dxfLwPolyline.pts.get(j);
+                    pointss[j] = new Point2D.Double();
+                    pointAux = new Point2D.Double(points[j].getX() - bPointX,
+                                                  points[j].getY() - bPointY);
+
+                    double laX = entity.pt.getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = entity.pt.getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    pointss[j].setLocation(laX, laY);
+
+                    //pointss[j].setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((points[j].getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((points[j].getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                    dxfLwPolylinee.add(pointss[j]);
+
+                    // jmorell, 050405: Bulges en Dxfpolyline para el piloto
+                    dxfLwPolylinee.addBulge((Double) dxfPolyline.getBulges()
+                                                                .get(j));
+                }
+
+                if (addingToBlock == false) {
+                    entities.add(dxfLwPolylinee);
+                }
+            } else if (dxfEntity instanceof DxfPoint) {
+                dxfPoint = (DxfPoint) dxfEntity;
+                point1 = dxfPoint.getPt();
+                pointAux = new Point2D.Double(point1.getX() - bPointX,
+                                              point1.getY() - bPointY);
+
+                double laX = entity.pt.getX() +
+                             (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                double laY = entity.pt.getY() +
+                             (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                point11.setLocation(laX, laY);
+
+                //point11.setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                DxfPoint dxfPointt = new DxfPoint(proj, layer);
+
+                //dxfPointt.pt = point11;
+                dxfPointt.setPt(point11);
+
+                if (addingToBlock == false) {
+                    entities.add(dxfPointt);
+                }
+            } else if (dxfEntity instanceof DxfText) {
+                dxfText = (DxfText) dxfEntity;
+
+                if (dxfText.getTwoPointsFlag()) {
+                    point1 = dxfText.pts[0];
+                    pointAux = new Point2D.Double(point1.getX() - bPointX,
+                                                  point1.getY() - bPointY);
+
+                    double laX = entity.pt.getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = entity.pt.getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    point11.setLocation(laX, laY);
+
+                    //point11.setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                    point2 = dxfText.pts[1];
+                    pointAux = new Point2D.Double(point2.getX() - bPointX,
+                                                  point2.getY() - bPointY);
+                    laX = entity.pt.getX() +
+                          (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                          ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    laY = entity.pt.getY() +
+                          (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                          ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    point22.setLocation(laX, laY);
+
+                    //point22.setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((point2.getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + point2.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((point2.getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + point2.getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                    DxfText dxfTextt = new DxfText(proj, layer,
+                                                   dxfText.getText());
+                    dxfTextt.pts[0] = point11;
+                    dxfTextt.pts[1] = point22;
+
+                    if (addingToBlock == false) {
+                        entities.add(dxfTextt);
+                    }
+                } else {
+                    point1 = dxfText.getPt();
+                    pointAux = new Point2D.Double(point1.getX() - bPointX,
+                                                  point1.getY() - bPointY);
+
+                    double laX = entity.pt.getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = entity.pt.getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    point11.setLocation(laX, laY);
+
+                    //point11.setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((point1.getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + point1.getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((point1.getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + point1.getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                    DxfText dxfTextt = new DxfText(proj, layer,
+                                                   dxfText.getText());
+                    dxfTextt.setPt(point11);
+
+                    if (addingToBlock == false) {
+                        entities.add(dxfTextt);
+                    }
+                }
+            } else if (dxfEntity instanceof DxfSolid) {
+                dxfSolid = (DxfSolid) dxfEntity;
+
+                Point2D[] points = new Point2D[dxfSolid.pts.length];
+                Point2D[] pointss = new Point2D[dxfSolid.pts.length];
+
+                for (int j = 0; j < dxfSolid.pts.length; j++) {
+                    points[j] = (Point2D) dxfSolid.pts[j];
+                    pointss[j] = new Point2D.Double();
+                    pointAux = new Point2D.Double(points[j].getX() - bPointX,
+                                                  points[j].getY() - bPointY);
+
+                    double laX = entity.pt.getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = entity.pt.getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    pointss[j].setLocation(laX, laY);
+
+                    //pointss[j].setLocation(entity.pt.getX() - (entity.block.bPoint.getX() * entity.getScaleFactor().getX()) + ((points[j].getX()*Math.cos((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*(-1)*Math.sin((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getX()), entity.pt.getY() - (entity.block.bPoint.getY() * entity.getScaleFactor().getY()) + ((points[j].getX()*Math.sin((entity.rotAngle*Math.PI)/180.0) + points[j].getY()*Math.cos((entity.rotAngle*Math.PI)/180.0)) * entity.scaleFactor.getY()));
+                }
+
+                DxfSolid dxfSolidd = new DxfSolid(proj, layer, pointss);
+                Point2D aux = dxfSolidd.pts[2];
+                dxfSolidd.pts[2] = dxfSolidd.pts[3];
+                dxfSolidd.pts[3] = aux;
+
+                if (addingToBlock == false) {
+                    entities.add(dxfSolidd);
+                }
+            } else {
+            	DxfFile.logger.debug("gestionaInserts: Encontrado elemento desconocido");
+            }
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createAttdef(org.cresques.io.DxfGroupVector)
+     */
+    public void createAttdef(DxfGroupVector grp) throws Exception {
+        DxfGroup g = null;
+
+        String defaultValue = "";
+        String tagString = "";
+        String textStyleName = "";
+        String[] attribute = new String[2];
+        boolean tagDefined = false;
+        boolean defValDefined = false;
+
+        if (grp.hasCode(1)) {
+            defaultValue = grp.getDataAsString(1);
+            attribute[1] = DxfConvTexts.ConvertText(defaultValue);
+            defValDefined = true;
+
+            if (tagDefined) {
+                attributes.add(attribute);
+            }
+        }
+
+        if (grp.hasCode(2)) {
+            tagString = grp.getDataAsString(2);
+            attribute[0] = DxfConvTexts.ConvertText(tagString);
+            tagDefined = true;
+
+            if (defValDefined) {
+                attributes.add(attribute);
+            }
+        }
+
+        if (grp.hasCode(7)) {
+            textStyleName = grp.getDataAsString(7);
+            textStyleName = DxfConvTexts.ConvertText(textStyleName);
+        }
+
+        // TODO setNewAttributes();
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createAttrib(org.cresques.io.DxfGroupVector)
+     */
+    public void createAttrib(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double h = 0.0;
+        double rot = 0.0;
+        DxfGroup g = null;
+        Point2D pt = null;
+
+        String defaultValue = "";
+        String tagString = "";
+        String textStyleName = "";
+        String[] att = new String[2];
+        boolean tagDefined = false;
+        boolean defValDefined = false;
+        int attributeFlags = 0;
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        DxfAttrib entity = new DxfAttrib(proj, layer);
+
+        if (grp.hasCode(1)) {
+            String strAux1 = grp.getDataAsString(1);
+            strAux1 = DxfConvTexts.ConvertText(strAux1);
+            defaultValue = strAux1;
+            att[1] = DxfConvTexts.ConvertText(defaultValue);
+            defValDefined = true;
+
+            /*if (tagDefined) {
+                    insFea.setProp(att[0], att[1]);
+                    ptFea.setProp(att[0], att[1]);
+            }
+            feature.setProp("text", strAux1);*/
+        }
+
+        if (grp.hasCode(2)) {
+            String strAux2 = grp.getDataAsString(2);
+            strAux2 = DxfConvTexts.ConvertText(strAux2);
+            tagString = strAux2;
+            att[0] = DxfConvTexts.ConvertText(tagString);
+            tagDefined = true;
+
+            /*if (defValDefined) {
+                    insFea.setProp(att[0], att[1]);
+                    ptFea.setProp(att[0], att[1]);
+            }*/
+        }
+
+        if (grp.hasCode(7)) {
+            textStyleName = grp.getDataAsString(7);
+            textStyleName = DxfConvTexts.ConvertText(textStyleName);
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        z = grp.getDataAsDouble(30);
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+        entity.setPt(proj.createPoint(x, y));
+
+        if (grp.hasCode(40)) {
+            Double heightD = new Double(grp.getDataAsDouble(40));
+            String heightS = heightD.toString();
+
+            //feature.setProp("textHeight", heightS);
+        } else {
+            //feature.setProp("textHeight", "20.0");
+        }
+
+        if (grp.hasCode(50)) {
+            Double rotD = new Double(grp.getDataAsDouble(50));
+            String rotS = rotD.toString();
+
+            //feature.setProp("textRotation", rotS);
+        } else {
+            //feature.setProp("textRotation", "0.0");
+        }
+
+        if (grp.hasCode(62)) {
+            entity.dxfColor = grp.getDataAsInt(62);
+        } else {
+            //entity.dxfColor = 0;
+        }
+
+        if (grp.hasCode(70)) {
+            attributeFlags = grp.getDataAsInt(70);
+        }
+
+        if (attributeFlags == 8) {
+            if (addingToBlock == false) {
+                entities.add(entity);
+            } else {
+                blk.add(entity);
+            }
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getAttributes()
+     */
+    public Vector getAttributes() {
+        return attributes;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#depureAttributes()
+     */
+    public void depureAttributes() {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#isDxf3DFile()
+     */
+    public boolean isDxf3DFile() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfGroup.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfGroup.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfGroup.java	(revision 1291)
@@ -0,0 +1,348 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.Locale;
+
+
+/**
+ * Grupo Dxf (code, data). Auxiliar para leer ficheros dxf
+ *
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author "Michel Michaud" (code from)
+ */
+public class DxfGroup {
+    /*
+    def get_group(handle):
+    _code = int(handle.readline())
+    _dfun = get_data_type(_code)
+    _data = _dfun(handle.readline())
+    return (_code, _data)
+     */
+    private static final DecimalFormatSymbols dfs = new DecimalFormatSymbols(Locale.US);
+    private static final DecimalFormat[] decimalFormats = new DecimalFormat[] {
+                                                              new DecimalFormat("#0",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.0",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.00",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.0000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.00000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.0000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.00000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.000000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.0000000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.00000000000",
+                                                                                dfs),
+                                                              new DecimalFormat("#0.000000000000",
+                                                                                dfs)
+                                                          };
+    int code;
+    Object data;
+    
+    /**
+     * Constructor por defecto.
+     */
+    public DxfGroup() {
+        code = -1;
+        data = null;
+    }
+    
+    /**
+     * Constructor habitual. Representa una entidad individual dentro del DXF
+     * @param code, �ndice del dato dentro del DxfGroup
+     * @param data, el propio dato que queda almacenado en el DxfGroup
+     */
+    public DxfGroup(int code, String data) {
+        this.code = code;
+        this.data = data;
+    }
+    
+    /**
+     * Lee una entidad del DXF y la empaqueta en un DxfGroup.
+     * @param fi, BufferedReader mediante el cual accedemos al DXF
+     * @return DxfGroup con la informaci�n procedente del DXF
+     * @throws NumberFormatException
+     * @throws IOException
+     */
+    public static DxfGroup read(BufferedReader fi)
+                         throws NumberFormatException, IOException {
+        DxfGroup grp = null;
+        String txt = fi.readLine();
+
+        if (txt != null) {
+            if (!txt.equals("")) {
+                grp = new DxfGroup();
+                grp.code = Integer.parseInt(txt.trim());
+                grp.readData(fi);
+            } else {
+                // Se trata de una linea en blanco y no se hace nada.
+            }
+        }
+
+        return grp;
+    }
+    
+    /**
+     * Devuelve el code
+     * @return
+     */
+    public int getCode() {
+        return code;
+    }
+    
+    /**
+     * Devuelve data
+     * @return
+     */
+    public Object getData() {
+        return data;
+    }
+    
+    /**
+     * Lee un dato individual dentro de un DxfGroup
+     * @param fi, BufferedReader
+     * @throws IOException
+     */
+    private void readData(BufferedReader fi) throws IOException {
+        String txt = fi.readLine().trim();
+
+        if ((0 <= code) && (code <= 9)) {
+            data = txt; //_dfun = string_data
+        } else if ((10 <= code) && (code <= 59)) {
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data
+        } else if ((60 <= code) && (code <= 79)) {
+            try {
+                data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 16-bit int
+            } catch (java.lang.NumberFormatException e) {
+                data = new Integer((int) Double.parseDouble(txt));
+            }
+        } else if ((90 <= code) && (code <= 99)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 32-bit int
+        } else if (code == 100) {
+            data = txt; //_dfun = unicode_data
+        } else if (code == 102) {
+            // Fran: Comentado para ganar velocidad.
+            //System.err. ("Dxf: codigo " + code + " no implementado."); //_dfun = unicode_data
+        } else if (code == 105) {
+            data = txt;
+            ; //_dfun = handle_data
+        } else if ((110 <= code) && (code <= 139)) {
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data // not in dxf spec
+        } else if ((140 <= code) && (code <= 149)) { // says 147 in dxf spec
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data
+        } else if ((170 <= code) && (code <= 179)) { // says 175 in dxf spec
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 16-bit int
+        } else if ((210 <= code) && (code <= 239)) {
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data // del TEXT procendente de exportacion de microstation 
+        } else if ((270 <= code) && (code <= 279)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // not in dxf spec
+        } else if ((280 <= code) && (code <= 289)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 8-bit int
+        } else if ((290 <= code) && (code <= 299)) {
+            data = new Boolean(Boolean.getBoolean(txt)); //_dfun = bool_data
+        } else if ((300 <= code) && (code <= 309)) {
+            data = txt; //_dfun = string_data
+        } else if ((310 <= code) && (code <= 319)) {
+            //_dfun = bin_data
+            //throw new IOException("Dxf: codigo "+code+" no implementado.");
+        } else if ((320 <= code) && (code <= 329)) {
+            //_dfun = handle_data
+            //throw new IOException("Dxf: codigo "+code+" no implementado.");
+        } else if ((330 <= code) && (code <= 369)) {
+            // Fran: Comentado para ganar velocidad.
+            //System.err. ("Dxf: codigo " + code + " no implementado."); //_dfun = hex_data
+        } else if ((370 <= code) && (code <= 379)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 8-bit int
+        } else if ((380 <= code) && (code <= 389)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 8-bit int
+        } else if ((390 <= code) && (code <= 399)) {
+            data = txt; //_dfun = handle_data
+        } else if ((400 <= code) && (code <= 409)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 16-bit int
+        } else if ((410 <= code) && (code <= 419)) {
+            data = txt; //_dfun = string_data
+        } else if (code == 999) {
+            data = txt; //_dfun = string_data // comment
+        } else if ((1000 <= code) && (code <= 1009)) {
+            data = txt; //_dfun = string_data
+        } else if ((1010 <= code) && (code <= 1059)) {
+            data = new Double(Double.parseDouble(txt)); //_dfun = float_data
+        } else if ((1060 <= code) && (code <= 1070)) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data // 16-bit int
+        } else if (code == 1071) {
+            data = new Integer(Integer.parseInt(txt)); //_dfun = int_data # 32-bit int
+        } else {
+            throw new IOException("DxfReader: c�digo " + code +
+                                  " desconocido.");
+
+            //raise ValueError, "Unexpected code: %d" % code
+        }
+
+        //return _dfun
+    }
+    
+    /**
+     * Permite comparar dos objetos de la clase DxfGroup
+     * @param c, code
+     * @param s, data
+     * @return boolean
+     */
+    public boolean equals(int c, String s) {
+        if ((c == code) && (s.compareTo((String) data) == 0)) {
+            return true;
+        }
+
+        return false;
+    }
+    
+    /**
+     * Devuelve un dato concreto en forma de String tabulado
+     * @param code
+     * @return String
+     */
+    public static String int34car(int code) {
+        if (code < 10) {
+            return "  " + Integer.toString(code);
+        } else if (code < 100) {
+            return " " + Integer.toString(code);
+        } else {
+            return Integer.toString(code);
+        }
+    }
+    
+    /**
+     * Devuelve un dato concreto en forma de String tabulado
+     * @param value
+     * @return String
+     */
+    public static String int6car(int value) {
+        String s = "     " + Integer.toString(value);
+
+        return s.substring(s.length() - 6, s.length());
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @return String
+     */
+    public static String toString(int code, String value) {
+        return int34car(code) + "\r\n" + value + "\r\n";
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @return String
+     */
+    public static String toString(int code, int value) {
+        return int34car(code) + "\r\n" + int6car(value) + "\r\n";
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @param decimalPartLength
+     * @return String
+     */
+    public static String toString(int code, float value, int decimalPartLength) {
+        return int34car(code) + "\r\n" +
+               decimalFormats[decimalPartLength].format((double) value) +
+               "\r\n";
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @param decimalPartLength
+     * @return String
+     */
+    public static String toString(int code, double value, int decimalPartLength) {
+        return int34car(code) + "\r\n" +
+               decimalFormats[decimalPartLength].format(value) + "\r\n";
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     * @param code
+     * @param value
+     * @return String
+     */
+    public static String toString(int code, Object value) {
+        if (value instanceof String) {
+            return toString(code, (String) value);
+        } else if (value instanceof Integer) {
+            return toString(code, ((Integer) value).intValue());
+        } else if (value instanceof Double) {
+            return toString(code, ((Double) value).floatValue(), 3);
+        } else if (value instanceof Double) {
+            return toString(code, ((Double) value).doubleValue(), 6);
+        } else {
+            return toString(code, value.toString());
+        }
+    }
+    
+    /**
+     * Convierte a String un dato del DxfGroup
+     */
+    public String toString() {
+        return toString(code, data);
+    }
+
+    /**
+     * jmorell: Permite rellenar los datos. �til en la escritura de DXFs.
+     * @param data The data to set.
+     */
+    public void setData(Object data) {
+        this.data = data;
+    }
+
+    /**
+     * jmorell: Permite rellenar los c�digos. �til en la escritura de DXFs.
+     * @param code The code to set.
+     */
+    public void setCode(int code) {
+        this.code = code;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEllipse.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEllipse.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEllipse.java	(revision 1291)
@@ -0,0 +1,272 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad ELLIPSE de un fichero DXF.
+ * @author jmorell
+ */
+public class DxfEllipse extends DxfEntity {
+    final static Color baseColor = new Color(69, 106, 121);
+
+    //Vector points = null;
+    GeneralPath gp = null;
+    boolean closed = true;
+    Point2D[] pts;
+    private double minorAxisLength;
+    private Point2D center;
+    private double minorToMajorAxisRatio;
+    private Color color = baseColor; //Color(255,214,132,255);
+    
+    /**
+     * Constructor de DxfEllipse.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfEllipse.
+     * @param layer, capa del DXF en la que se encuentra el DxfEllipse.
+     * @param pt1, primer punto del semieje mayor.
+     * @param pt2, segundo punto del semieje mayor.
+     * @param minorAxisLength, longitud del semieje menor.
+     */
+    public DxfEllipse(IProjection proj, DxfLayer layer, Point2D pt1,
+                      Point2D pt2, double minorAxisLength) {
+        super(proj, layer);
+        pts = new Point2D[2];
+        pts[0] = pt1;
+        pts[1] = pt2;
+        this.minorAxisLength = minorAxisLength;
+        extent = new Extent();
+
+        for (int i = 0; i < pts.length; i++) {
+            extent.add(pts[i]);
+        }
+
+        center = new Point2D.Double((pts[0].getX() + pts[1].getX()) / 2.0,
+                                    (pts[0].getY() + pts[1].getY()) / 2.0);
+
+        double majorAxisLength = pt1.distance(pt2);
+
+        minorToMajorAxisRatio = minorAxisLength / majorAxisLength;
+    }
+    
+    /**
+     * Devuelve el color del DxfEllipse.
+     * @return Color
+     */
+    public Color c() {
+        return color;
+    }
+    
+    /**
+     * Establece el color del DxfEllipse.
+     * @param color
+     * @return Color
+     */
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+    
+    /**
+     * Permite reproyectar un DxfEllipse dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Point2D[] savePts = pts;
+
+        pts = new Point2D[savePts.length];
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePts.length; i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) savePts[i], ptDest);
+            this.pts[i] = ptDest;
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+    
+    /**
+     * Permite dibujar un DxfEllipse.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Color color = null;
+
+        if (dxfColor == AcadColor.BYLAYER) {
+            //g.setColor(layer.getColor());
+            color = layer.getColor();
+        } else {
+            //g.setColor(AcadColor.getColor(dxfColor));
+            color = AcadColor.getColor(dxfColor);
+        }
+
+        newGP(vp);
+
+        if (closed) {
+            g.setColor(new Color(color.getRed(), color.getBlue(),
+                                 color.getGreen(), 0x80));
+            g.fill(gp);
+        }
+
+        g.setColor(color);
+        g.draw(gp);
+    }
+    
+    /**
+     * Permite generar un GeneralPath partiendo del array de Point2D que conforma el
+     * DxfEllipse.
+     * @param vp
+     */
+    private void newGP(ViewPortData vp) {
+        //if (gp != null) return;
+        gp = new GeneralPath();
+
+        Point2D pt0 = null;
+        Point2D pt = null;
+        Point2D pt1 = null;
+        Point2D.Double ptTmp = new Point2D.Double(0.0, 0.0);
+
+        for (int i = 0; i < pts.length; i++) {
+            pt1 = (Point2D) pts[i];
+            vp.mat.transform(pt1, ptTmp);
+
+            if (pt0 == null) {
+                pt0 = ptTmp;
+                gp.moveTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            } else {
+                gp.lineTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            }
+        }
+
+        if (closed) {
+            gp.closePath();
+        }
+    }
+    
+    /**
+     * Permite la escritura de entidades DxfEllipse en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * del DxfEllipse.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "ELLIPSE"));
+        sb.append(DxfGroup.toString(5, getHandle()));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(100, "AcDbEllipse"));
+        sb.append(DxfGroup.toString(10, getCenter().getX(), 6));
+        sb.append(DxfGroup.toString(20, getCenter().getY(), 6));
+        sb.append(DxfGroup.toString(30, 0.0, 6));
+        sb.append(DxfGroup.toString(11, pts[1].getX() - getCenter().getX(), 6));
+        sb.append(DxfGroup.toString(21, pts[1].getY() - getCenter().getY(), 6));
+        sb.append(DxfGroup.toString(31, 0.0, 6));
+        sb.append(DxfGroup.toString(40, getMinorToMajorAxisRatio(), 6));
+        sb.append(DxfGroup.toString(41, 0.0, 6));
+        sb.append(DxfGroup.toString(42, 2 * Math.PI, 6));
+
+        return sb.toString();
+    }
+    
+    /**
+     * Devuelve el array de puntos que conforman el DxfEllipse.
+     * @return Point2D[], puntos del DxfEllipse.
+     */
+    public Point2D[] getPts() {
+        return pts;
+    }
+
+    /**
+     * Devuelve el GeneralPath qie conforma el DxfEllipse.
+     * @return GeneralPath del DxfEllipse.
+     */
+    /*public GeneralPath getGeneralPath(ViewPort vp) {
+            newGP(vp);
+            return (GeneralPath) gp.clone();
+    }*/
+
+    /**
+     * @return Returns the minorAxisLength.
+     */
+    public double getMinorAxisLength() {
+        return minorAxisLength;
+    }
+
+    /**
+     * @param minorAxisLength The minorAxisLength to set.
+     */
+    public void setMinorAxisLength(double minorAxisLength) {
+        this.minorAxisLength = minorAxisLength;
+    }
+
+    /**
+     * @param pts The pts to set.
+     */
+    public void setPts(Point2D[] pts) {
+        this.pts = pts;
+    }
+
+    /**
+     * @return Returns the center.
+     */
+    public Point2D getCenter() {
+        return center;
+    }
+
+    /**
+     * @param center The center to set.
+     */
+    public void setCenter(Point2D center) {
+        this.center = center;
+    }
+
+    /**
+     * @return Returns the majorToMinorAxisRatio.
+     */
+    public double getMinorToMajorAxisRatio() {
+        return minorToMajorAxisRatio;
+    }
+
+    /**
+     * @param majorToMinorAxisRatio The majorToMinorAxisRatio to set.
+     */
+    public void setMinorToMajorAxisRatio(double majorToMinorAxisRatio) {
+        this.minorToMajorAxisRatio = majorToMinorAxisRatio;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfConvTexts.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfConvTexts.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfConvTexts.java	(revision 1291)
@@ -0,0 +1,133 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.text.StringCharacterIterator;
+
+
+/**
+ * La clase DxfConvTexts se emplea para convertir los textos asociados a las entidades
+ * TEXT de un fichero DXF al alfabeto tradicional.
+ * @author jmorell
+ */
+public class DxfConvTexts {
+    
+    /**
+     * M�todo que permite transformar los textos asociados a entidades TEXT en un
+     * fichero DXF al alfabeto tradicional.
+     * @param s, texto extraido de un DXF.
+     * @return String, el mismo texto en alfabeto tradicional.
+     */
+    public static String ConvertText(String s) {
+        StringCharacterIterator stringcharacteriterator = new StringCharacterIterator(s);
+        StringBuffer stringbuffer = new StringBuffer();
+        int[] ai = new int[s.length()];
+        int i = 0;
+        int j = 0;
+
+        for (char c = stringcharacteriterator.first(); c != '\uFFFF';
+                 c = stringcharacteriterator.next())
+            if (c == '%') {
+                c = stringcharacteriterator.next();
+
+                if (c != '%') {
+                    stringbuffer.append('%');
+                    c = stringcharacteriterator.previous();
+                } else {
+                    c = stringcharacteriterator.next();
+
+                    switch (c) {
+                    case 37: // '%'
+                        stringbuffer.append('%');
+
+                        break;
+
+                    case 80: // 'P'
+                    case 112: // 'p'
+                        stringbuffer.append('\361');
+
+                        break;
+
+                    case 67: // 'C'
+                    case 99: // 'c'
+                        stringbuffer.append('\355');
+
+                        break;
+
+                    case 68: // 'D'
+                    case 100: // 'd'
+                        stringbuffer.append('\u00b0');
+
+                        break;
+
+                    case 85: // 'U'
+                    case 117: // 'u'
+                        ai[stringbuffer.length()] ^= 1;
+                        i++;
+
+                        break;
+
+                    case 79: // 'O'
+                    case 111: // 'o'
+                        ai[stringbuffer.length()] ^= 2;
+                        j++;
+
+                        break;
+
+                    default:
+
+                        if ((c >= '0') && (c <= '9')) {
+                            int k = 3;
+                            char c1 = (char) (c - 48);
+
+                            for (c = stringcharacteriterator.next();
+                                     (c >= '0') && (c <= '9') && (--k > 0);
+                                     c = stringcharacteriterator.next())
+                                c1 = (char) ((10 * c1) + (c - 48));
+
+                            stringbuffer.append(c1);
+                        }
+
+                        c = stringcharacteriterator.previous();
+
+                        break;
+                    }
+                }
+            } else if (c == '^') {
+                c = stringcharacteriterator.next();
+
+                if (c == ' ') {
+                    stringbuffer.append('^');
+                }
+            } else {
+                stringbuffer.append(c);
+            }
+
+        s = Unicode.char2DOS437(stringbuffer, 2, '?');
+
+        String ss = s;
+
+        return ss;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLwPolyline.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLwPolyline.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLwPolyline.java	(revision 1291)
@@ -0,0 +1,90 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad LWPOLYLINE de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ */
+public class DxfLwPolyline extends DxfPolyline {
+    
+    /**
+     * Constructor de DxfLwPolyline.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra la DxfLwPolyline.
+     * @param layer, capa del DXF en la que se encuentra la DxfLwPolyline.
+     */
+    public DxfLwPolyline(IProjection proj, DxfLayer layer) {
+        super(proj, layer);
+    }
+
+    /**
+     * Permite la escritura de entidades DxfLwPolyline en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * de la DxfLwPolyline.
+     */
+    /**
+     * 050302, jmorell: Si el 90 no est� antes que el 70, Autocad 2004 no cierra
+     * las polil�neas.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "LWPOLYLINE"));
+        sb.append(DxfGroup.toString(5, getHandle()));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(100, "AcDbPolyline"));
+        sb.append(DxfGroup.toString(90, pts.size()));
+        sb.append(DxfGroup.toString(70, flags));
+        sb.append(DxfGroup.toString(38, new Double(getElevation())));
+
+        Point2D pt = null;
+        double bulge;
+        Vector bulges = getBulges();
+
+        /*Iterator iter = pts.iterator();
+        while (iter.hasNext()) {
+                pt = (Point2D) iter.next();
+                sb.append( DxfGroup.toString(10, pt.getX(), 6) );
+                sb.append( DxfGroup.toString(20, pt.getY(), 6) );
+        }*/
+        for (int i = 0; i < pts.size(); i++) {
+            pt = (Point2D) pts.get(i);
+            bulge = ((Double) bulges.get(i)).doubleValue();
+            sb.append(DxfGroup.toString(10, pt.getX(), 6));
+            sb.append(DxfGroup.toString(20, pt.getY(), 6));
+            sb.append(DxfGroup.toString(42, bulge, 6));
+        }
+
+        return sb.toString();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCircle.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCircle.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCircle.java	(revision 1291)
@@ -0,0 +1,233 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad CIRCLE de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ */
+public class DxfCircle extends DxfEntity {
+    final static Color baseColor = new Color(69, 106, 121);
+
+    //Vector points = null;
+    Point2D[] pts;
+    GeneralPath gp = null;
+    boolean closed = true;
+    private Point2D center;
+    private double radius;
+    private Color color = baseColor; //Color(255,214,132,255);
+    
+    /**
+     * Constructor de DxfCircle.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfCircle.
+     * @param layer, capa del DXF en la que se encuentra el DxfCircle.
+     * @param pts, puntos 2D que componen el DxfCircle.
+     */
+    public DxfCircle(IProjection proj, DxfLayer layer, Point2D[] pts) {
+        super(proj, layer);
+        this.pts = pts;
+        extent = new Extent();
+
+        for (int i = 0; i < pts.length; i++) {
+            extent.add(pts[i]);
+        }
+    }
+    
+    /**
+     * Devuelve el color del DxfCircle.
+     * @return Color
+     */
+    public Color c() {
+        return color;
+    }
+    
+    /**
+     * Establece el color del DxfCircle.
+     * @param color
+     * @return Color
+     */
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+    
+    /**
+     * Permite reproyectar un DxfCircle dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Point2D[] savePts = pts;
+
+        pts = new Point2D[savePts.length];
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePts.length; i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) savePts[i], ptDest);
+            this.pts[i] = ptDest;
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+    
+    /**
+     * Permite dibujar un DxfCircle.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Color color = null;
+
+        if (dxfColor == AcadColor.BYLAYER) {
+            //g.setColor(layer.getColor());
+            color = layer.getColor();
+        } else {
+            //g.setColor(AcadColor.getColor(dxfColor));
+            color = AcadColor.getColor(dxfColor);
+        }
+
+        newGP(vp);
+
+        if (closed) {
+            g.setColor(new Color(color.getRed(), color.getBlue(),
+                                 color.getGreen(), 0x80));
+            g.fill(gp);
+        }
+
+        g.setColor(color);
+        g.draw(gp);
+    }
+    
+    /**
+     * Permite generar un GeneralPath partiendo del array de Point2D que conforma el
+     * DxfCircle.
+     * @param vp
+     */
+    private void newGP(ViewPortData vp) {
+        //if (gp != null) return;
+        gp = new GeneralPath();
+
+        Point2D pt0 = null;
+        Point2D pt = null;
+        Point2D pt1 = null;
+        Point2D.Double ptTmp = new Point2D.Double(0.0, 0.0);
+
+        for (int i = 0; i < pts.length; i++) {
+            pt1 = (Point2D) pts[i];
+            vp.mat.transform(pt1, ptTmp);
+
+            if (pt0 == null) {
+                pt0 = ptTmp;
+                gp.moveTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            } else {
+                gp.lineTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            }
+        }
+
+        if (closed) {
+            gp.closePath();
+        }
+    }
+
+    /**
+     * Permite la escritura de entidades DxfCircle en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * del DxfCircle.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "CIRCLE"));
+        sb.append(DxfGroup.toString(5, getHandle()));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(100, "AcDbCircle"));
+        sb.append(DxfGroup.toString(10, getCenter().getX(), 6));
+        sb.append(DxfGroup.toString(20, getCenter().getY(), 6));
+        // sb.append(DxfGroup.toString(30, 0.0, 1));
+        sb.append(DxfGroup.toString(40, getRadius(), 6));
+
+        return sb.toString();
+    }
+
+    /**
+     * Devuelve el array de puntos que conforman el DxfCircle.
+     * @return Point2D[], puntos del DxfCircle.
+     */
+    public Point2D[] getPts() {
+        return pts;
+    }
+
+    /**
+     * Devuelve el GeneralPath qie conforma el DxfCircle.
+     * @return GeneralPath del DxfCircle.
+     */
+    /*public GeneralPath getGeneralPath(ViewPort vp) {
+            newGP(vp);
+            return (GeneralPath) gp.clone();
+    }*/
+
+    /**
+     * @return Returns the radius.
+     */
+    public double getRadius() {
+        return radius;
+    }
+
+    /**
+     * @param radius The radius to set.
+     */
+    public void setRadius(double radius) {
+        this.radius = radius;
+    }
+
+    /**
+     * @return Returns the center.
+     */
+    public Point2D getCenter() {
+        return center;
+    }
+
+    /**
+     * @param center The center to set.
+     */
+    public void setCenter(Point2D center) {
+        this.center = center;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfInsert.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfInsert.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfInsert.java	(revision 1291)
@@ -0,0 +1,208 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+
+
+/**
+ * Entidad INSERT de un fichero DXF.
+ * @author jmorell
+ */
+public class DxfInsert extends DxfEntity {
+    Point2D pt;
+    String blockName;
+    Point2D scaleFactor;
+    double rotAngle;
+    DxfBlock block = new DxfBlock(proj);
+    Vector blkList;
+    boolean blockFound = false;
+
+    /**
+     * Constructor de DxfInsert.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfInsert.
+     * @param layer, capa del DXF en la que se encuentra el DxfInsert.
+     */
+    public DxfInsert(IProjection proj, DxfLayer layer) {
+        super(proj, layer);
+        extent = new Extent();
+    }
+
+    /**
+     * @return Returns the pt.
+     */
+    public Point2D getPt() {
+        return pt;
+    }
+
+    /**
+     * Devuelve el �ngulo de rotaci�n que se aplica al bloque.
+     * @return double. �ngulo de rotaci�n.
+     */
+    public double getRotAngle() {
+        return rotAngle;
+    }
+
+    /**
+     * Devuelve el factor de escala que se aplica al bloque.
+     * @return Point3D. Contiene el factor de escala en X, en Y y en Z.
+     */
+    public Point2D getScaleFactor() {
+        return scaleFactor;
+    }
+
+    /**
+     * Informa sobre si el bloque ya ha sido encontrado.
+     * @return boolean, true si el bloque ya ha sido encontrado.
+     */
+    public boolean getBlockFound() {
+        return blockFound;
+    }
+
+    /**
+     * Establece si el bloque ya ha sido encontrado.
+     * @param found, true si el bloque ya ha sido encontrado.
+     */
+    public void setBlockFound(boolean found) {
+        blockFound = found;
+    }
+
+    /**
+     * M�todo para cargar el bloque al que hace referencia el punto de inserci�n, en el
+     * propio DxfInsert.
+     * @param blockName, nombre del bloque que estamos buscando.
+     * @return boolean, true si hemos encontrado el bloque que buscabamos y ha sido
+     * cargado.
+     */
+    public boolean encuentraBloque(String blockName) {
+        int i = 0;
+
+        while ((i < blkList.size()) && (blockFound == false)) {
+            if (((DxfBlock) blkList.get(i)).getBlkName().equals(blockName)) {
+                block = (DxfBlock) blkList.get(i);
+                blockFound = true;
+            } else {
+                blockFound = false;
+            }
+
+            i++;
+        }
+
+        return blockFound;
+    }
+
+    /**
+     * Devuelve la capa en la que se encuentra el DxfInsert.
+     * @return DxfLayer, la capa.
+     */
+    public DxfLayer getDxfLayer() {
+        return layer;
+    }
+
+    /**
+     * Establece la lista de bloques.
+     * @param blkList, Vector con la lista de bloques.
+     */
+    public void setBlkList(Vector blkList) {
+        this.blkList = blkList;
+    }
+
+    /**
+     * Devuelve el bloque al que hace referencia el punto de inserci�n.
+     * @return DxfBlock, el bloque.
+     */
+    public DxfBlock getDxfBlock() {
+        return block;
+    }
+
+    /**
+     * Establece el punto de inserci�n del DxfInsert.
+     * @param pt, punto de inserci�n.
+     */
+    public void setPt(Point2D pt) {
+        this.pt = pt;
+        extent.add(pt);
+    }
+
+    /**
+     * Establece el nombre del bloque.
+     * @param blockName, nombre del bloque.
+     */
+    public void setBlockName(String blockName) {
+        this.blockName = blockName;
+    }
+
+    /**
+     * Devuelve el nombre del bloque al que hace referencia el punto de inserci�n.
+     * @return String, nombre del bloque.
+     */
+    public String getBlockName() {
+        return blockName;
+    }
+
+    /**
+     * Establece el factor de escala para el bloque.
+     * @param scaleFactor, factor de escala en X, en Y y en Z.
+     */
+    public void setScaleFactor(Point2D scaleFactor) {
+        this.scaleFactor = scaleFactor;
+    }
+
+    /**
+     * Establece el �ngulo de rotaci�n para el bloque.
+     * @param rotAngle, �ngulo de rotaci�n.
+     */
+    public void setRotAngle(double rotAngle) {
+        this.rotAngle = rotAngle;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.px.dxf.DxfEntity#toDxfFileString()
+     */
+    public String toDxfString() {
+        // TODO Auto-generated method stub
+        return "";
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.px.dxf.DxfEntity#reProject(org.cresques.geo.ReProjection)
+     */
+    public void reProject(ICoordTrans rp) {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.px.Drawable#draw(java.awt.Graphics2D, org.cresques.geo.ViewPort)
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        // TODO Auto-generated method stub
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfArc.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfArc.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfArc.java	(revision 1291)
@@ -0,0 +1,310 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * Entidad ARC de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ */
+public class DxfArc extends DxfEntity {
+    final static Color baseColor = new Color(69, 106, 121);
+
+    //Vector points = null;
+    Point2D[] pts;
+    GeneralPath gp = null;
+    boolean closed = false;
+    private Point2D centralPoint;
+    private Point2D init;
+    private Point2D end;
+    private Point2D center;
+    private double radius;
+    private double initAngle;
+    private double endAngle;
+    private Color color = baseColor; //Color(255,214,132,255);
+    
+    /**
+     * Constructor de DxfArc.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfArc.
+     * @param layer, capa del DXF en la que se encuentra el DxfArc.
+     * @param pts, puntos 2D que componen el DxfArc.
+     */
+    public DxfArc(IProjection proj, DxfLayer layer, Point2D[] pts) {
+        super(proj, layer);
+        this.pts = pts;
+        extent = new Extent();
+
+        for (int i = 0; i < pts.length; i++) {
+            extent.add(pts[i]);
+        }
+    }
+    
+    /**
+     * Devuelve el color del DxfArc.
+     * @return Color
+     */
+    public Color c() {
+        return color;
+    }
+    
+    /**
+     * Establece el color del DxfArc.
+     * @param color
+     * @return Color
+     */
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+    
+    /**
+     * Permite reproyectar un DxfArc dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Point2D[] savePts = pts;
+
+        pts = new Point2D[savePts.length];
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePts.length; i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) savePts[i], ptDest);
+            this.pts[i] = ptDest;
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+    
+    /**
+     * Permite dibujar un DxfArc.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Color color = null;
+
+        if (dxfColor == AcadColor.BYLAYER) {
+            //g.setColor(layer.getColor());
+            color = layer.getColor();
+        } else {
+            color = AcadColor.getColor(dxfColor);
+        }
+
+        //g.setColor(AcadColor.getColor(dxfColor));
+        newGP(vp);
+
+        if (closed) {
+            g.setColor(new Color(color.getRed(), color.getBlue(),
+                                 color.getGreen(), 0x80));
+            g.fill(gp);
+        }
+
+        g.setColor(color);
+        g.draw(gp);
+    }
+    
+    /**
+     * Permite generar un GeneralPath partiendo del array de Point2D que conforma el
+     * DxfArc.
+     * @param vp
+     */
+    private void newGP(ViewPortData vp) {
+        //if (gp != null) return;
+        gp = new GeneralPath();
+
+        Point2D pt0 = null;
+        Point2D pt = null;
+        Point2D pt1 = null;
+        Point2D.Double ptTmp = new Point2D.Double(0.0, 0.0);
+
+        for (int i = 0; i < pts.length; i++) {
+            pt1 = (Point2D) pts[i];
+            vp.mat.transform(pt1, ptTmp);
+
+            if (pt0 == null) {
+                pt0 = ptTmp;
+                gp.moveTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            } else {
+                gp.lineTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            }
+        }
+
+        if (closed) {
+            gp.closePath();
+        }
+    }
+
+    /**
+     * Permite la escritura de entidades DxfArc en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * del DxfArc.
+     */
+    public String toDxfString() {
+        StringBuffer sb = null;
+        sb = new StringBuffer(DxfGroup.toString(0, "ARC"));
+        sb.append(DxfGroup.toString(5, getHandle()));
+        sb.append(DxfGroup.toString(100, "AcDbEntity"));
+        sb.append(DxfGroup.toString(8, layer.getName()));
+        sb.append(DxfGroup.toString(62, dxfColor));
+        sb.append(DxfGroup.toString(100, "AcDbCircle"));
+        sb.append(DxfGroup.toString(10, getCenter().getX(), 6));
+        sb.append(DxfGroup.toString(20, getCenter().getY(), 6));
+        sb.append(DxfGroup.toString(40, getRadius(), 6));
+        sb.append(DxfGroup.toString(100, "AcDbArc"));
+        sb.append(DxfGroup.toString(50, getInitAngle(), 6));
+        sb.append(DxfGroup.toString(51, getEndAngle(), 6));
+
+        return sb.toString();
+    }
+
+    /**
+     * Devuelve el array de puntos que conforman el DxfArc.
+     * @return Point2D[], puntos del DxfArc.
+     */
+    public Point2D[] getPts() {
+        return pts;
+    }
+
+    /**
+     * Devuelve el GeneralPath qie conforma el DxfArc.
+     * @return GeneralPath del DxfArc.
+     */
+    /*public GeneralPath getGeneralPath(ViewPort vp) {
+            newGP(vp);
+            return (GeneralPath) gp.clone();
+    }*/
+
+    /**
+     * @return Returns the center.
+     */
+    public Point2D getCenter() {
+        return center;
+    }
+
+    /**
+     * @param center The center to set.
+     */
+    public void setCenter(Point2D center) {
+        this.center = center;
+    }
+
+    /**
+     * @return Returns the end.
+     */
+    public Point2D getEnd() {
+        return end;
+    }
+
+    /**
+     * @param end The end to set.
+     */
+    public void setEnd(Point2D end) {
+        this.end = end;
+    }
+
+    /**
+     * @return Returns the init.
+     */
+    public Point2D getInit() {
+        return init;
+    }
+
+    /**
+     * @param init The init to set.
+     */
+    public void setInit(Point2D init) {
+        this.init = init;
+    }
+
+    /**
+     * @return Returns the centralPoint.
+     */
+    public Point2D getCentralPoint() {
+        return centralPoint;
+    }
+
+    /**
+     * @param centralPoint The centralPoint to set.
+     */
+    public void setCentralPoint(Point2D centralPoint) {
+        this.centralPoint = centralPoint;
+    }
+
+    /**
+     * @return Returns the endAngle.
+     */
+    public double getEndAngle() {
+        return endAngle;
+    }
+
+    /**
+     * @param endAngle The endAngle to set.
+     */
+    public void setEndAngle(double endAngle) {
+        this.endAngle = endAngle;
+    }
+
+    /**
+     * @return Returns the initAngle.
+     */
+    public double getInitAngle() {
+        return initAngle;
+    }
+
+    /**
+     * @param initAngle The initAngle to set.
+     */
+    public void setInitAngle(double initAngle) {
+        this.initAngle = initAngle;
+    }
+
+    /**
+     * @return Returns the radius.
+     */
+    public double getRadius() {
+        return radius;
+    }
+
+    /**
+     * @param radius The radius to set.
+     */
+    public void setRadius(double radius) {
+        this.radius = radius;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfTableItem.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfTableItem.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfTableItem.java	(revision 1291)
@@ -0,0 +1,162 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * La clase DxfTableItem representa una entrada de una tabla en un fichero DXF. 
+ * Classe repr�sentant une table fichier DXF.
+ * @author Michael Michaud
+ * @documentation jmorell
+ */
+public class DxfTableItem {
+    public final static DxfGroup ENDTAB = new DxfGroup(0, "ENDTAB");
+    public final static DxfGroup APPID = new DxfGroup(0, "APPID");
+    public final static DxfGroup DIMSTYLE = new DxfGroup(0, "DIMSTYLE");
+    public final static DxfGroup LAYER = new DxfGroup(0, "LAYER");
+    public final static DxfGroup LTYPE = new DxfGroup(0, "LTYPE");
+    public final static DxfGroup STYLE = new DxfGroup(0, "STYLE");
+    public final static DxfGroup UCS = new DxfGroup(0, "UCS");
+    public final static DxfGroup VIEW = new DxfGroup(0, "VIEW");
+    public final static DxfGroup VPORT = new DxfGroup(0, "VPORT");
+    private String name;
+    public int flags = 0;
+
+    /**
+     * Constructor de DxfTableItem.
+     * @param name, nombre de la entrada de la tabla.
+     * @param flags, estado.
+     */
+    public DxfTableItem(String name, int flags) {
+        this.name = name;
+        this.flags = flags;
+    }
+
+    /**
+     * Devuelve el nombre de la entrada de la tabla.
+     * @return String
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Establece el nombre de la entrada de la tabla.
+     * @param name, nombre.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * Devuelve el estado.
+     * @return int
+     */
+    public int getFlags() {
+        return flags;
+    }
+
+    /**
+     * Establece el estado.
+     * @param flags
+     */
+    public void setFlags(int flags) {
+        this.flags = flags;
+    }
+
+    /**
+     * Devuelve true si el estado es 1.
+     * @return boolean
+     */
+    public boolean getFlag1() {
+        return ((flags & 1) == 1);
+    }
+
+    /**
+     * Devuelve true si el estado es 2.
+     * @return boolean
+     */
+    public boolean getFlag2() {
+        return ((flags & 2) == 2);
+    }
+
+    /**
+     * Devuelve true si el estado es 4.
+     * @return boolean
+     */
+    public boolean getFlag4() {
+        return ((flags & 4) == 4);
+    }
+
+    /**
+     * Devuelve true si el estado es 8.
+     * @return boolean
+     */
+    public boolean getFlag8() {
+        return ((flags & 8) == 8);
+    }
+
+    /**
+     * Devuelve true si el estado es 16.
+     * @return boolean
+     */
+    public boolean getFlag16() {
+        return ((flags & 16) == 16);
+    }
+
+    /**
+     * Devuelve true si el estado es 32.
+     * @return boolean
+     */
+    public boolean getFlag32() {
+        return ((flags & 32) == 32);
+    }
+
+    /**
+     * Devuelve true si el estado es 64.
+     * @return boolean
+     */
+    public boolean getFlag64() {
+        return ((flags & 64) == 64);
+    }
+
+    /**
+     * Devuelve true si el estado es 128.
+     * @return boolean
+     */
+    public boolean getFlag128() {
+        return ((flags & 128) == 128);
+    }
+
+    /**
+     * Permite la escritura de entidades DxfTableItem en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * del DxfTableItem.
+     */
+    public String toDxfString() {
+        return DxfGroup.toString(2, name) + DxfGroup.toString(70, flags);
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntityList.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntityList.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntityList.java	(revision 1291)
@@ -0,0 +1,217 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.px.IObjList;
+import org.gvsig.dxf.px.PxObj;
+
+
+/**
+ * La clase DxfEntityList almacena un conjunto de objetos gr�ficos. Esta basada en
+ * FeatureCollection de .gml y .shp
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class DxfEntityList extends PxObj implements IObjList.vector {
+    IProjection proj = null;
+    private Vector data = null;
+    
+    /**
+     * Constructor de DxfEntityList.
+     * @param proj, Proyecci�n cartogr�fica en la que se encuentra la DxfEntityList.
+     */
+    public DxfEntityList(IProjection proj) {
+        extent = new Extent();
+        data = new Vector();
+    }
+    
+    /**
+     * Permite a�adir un objeto gr�fico a la lista.
+     * @param obj, Objeto gr�fico que implemente el interface Extent.Has
+     */
+    public void add(Extent.Has obj) {
+        if (obj != null) {
+            extent.add(obj.getExtent());
+            data.add(obj);
+        }
+    }
+    
+    /**
+     * Devuelve uno de los elementos de la lista de objetos gr�ficos.
+     * @param cnt, �ndice del elemento de la lista que queremos obtener.
+     * @return Extent.Has, elemento gr�fico que queremos obtener.
+     */
+    public Extent.Has get(int cnt) {
+        return (Extent.Has) data.get(cnt);
+    }
+    
+    /**
+     * Devuelve los obhjetos gr�ficos de la lista cuyos extents contengan al
+     * punto que se le pasa como argumento.
+     * @param pt, punto para localizar los objetos gr�ficos.
+     * @return IObjList, Conjunto de objetos gr�ficos que contienen a pt.
+     */
+    public IObjList getAt(Point2D pt) {
+        IObjList oList = new DxfEntityList(proj);
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            Extent.Has o = (Extent.Has) iter.next();
+
+            if (o.getExtent().isAt(pt)) {
+                oList.add(o);
+            }
+        }
+
+        return oList;
+    }
+    
+    /**
+     * Devuelve un iterador para recorrer los elementos de la lista de objetos gr�ficos.
+     * @return Iterator, iterador.
+     */
+    public Iterator iterator() {
+        return data.iterator();
+    }
+    
+    /**
+     * Devuelve la cantidad de elementos que contiene la lista de objetos gr�ficos.
+     * @return int
+     */
+    public int size() {
+        return data.size();
+    }
+    
+    /**
+     * Permite eliminar un elemento de la lista de objetos gr�ficos.
+     * @param obj, Objeto que queremos eliminar.
+     */
+    public void remove(Object obj) {
+        data.remove(obj);
+    }
+    
+    /**
+     * Permite vac�ar la lista de objetos gr�ficos.
+     */
+    public void clear() {
+        extent = new Extent();
+        data.clear();
+    }
+    
+    /**
+     * Devuelve la proyecci�n cartogr�fica en la que se encuentra la DxfEntityList.
+     * @return IProjection, proyecci�n cartogr�fica.
+     */
+    public IProjection getProjection() {
+        return proj;
+    }
+    
+    /**
+     * Establece la proyecci�n cartogr�fica en la que se encuentra la DxfEntityList.
+     * @param p, Proyecci�n cartogr�fica.
+     */
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+    
+    /**
+     * Permite cambiar la proyecci�n en la que se encuentra la DxfEntityList a
+     * trav�s de un conjunto de coordenadas de transformaci�n.
+     * @param rp, Coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        extent = new Extent();
+
+        PxObj o;
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            o = (PxObj) iter.next();
+            ((Projected) o).reProject(rp);
+            extent.add(o.getExtent());
+        }
+
+        setProjection(rp.getPDest());
+    }
+    
+    /**
+     * Permite dibujar las entidades que conforman la DxfEntityList.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Iterator iter = iterator();
+        Extent extent;
+
+        while (iter.hasNext()) {
+            DxfEntity entity = (DxfEntity) iter.next();
+            extent = entity.getExtent();
+
+            if (vp.getExtent().minX() > extent.maxX()) {
+                continue;
+            }
+
+            if (vp.getExtent().minY() > extent.maxY()) {
+                continue;
+            }
+
+            if (vp.getExtent().maxX() < extent.minX()) {
+                continue;
+            }
+
+            if (vp.getExtent().maxY() < extent.minY()) {
+                continue;
+            }
+
+            if (!entity.layer.frozen && !entity.layer.isOff) {
+                entity.draw(g, vp);
+            }
+        }
+    }
+    
+    /**
+     * Permite la escritura de entidades en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * de la correspondiente entidad.
+     */
+    public String toDxfString() {
+        StringBuffer sb = new StringBuffer("");
+
+        Iterator iter = iterator();
+        Extent extent;
+
+        while (iter.hasNext()) {
+            sb.append(((DxfEntity) iter.next()).toDxfString());
+        }
+
+        return sb.toString();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCalArcs.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCalArcs.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfCalArcs.java	(revision 1291)
@@ -0,0 +1,220 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.geom.Point2D;
+import java.util.Vector;
+
+
+/**
+ * Calcula puntos sobre un arco. Originalmente implementada para calcular los puntos
+ * con un espaciamiento de un grado sexagesimal. Para el c�lculo de los puntos del arco
+ * utiliza el primer y el �tlimo punto del arco y un par�metro de curvatura.
+ * @author jmorell
+ *
+ */
+public class DxfCalArcs {
+    final boolean debug = true;
+    Point2D coord1;
+    Point2D coord2;
+    Point2D center;
+    double radio;
+    double empieza;
+    double acaba;
+    double bulge;
+    double d;
+    double dd;
+    double aci;
+    Point2D coordAux;
+
+    //private Point2D centralPoint;
+    
+    /**
+     * Constructor de DxfCalArcs.
+     * @param p1, punto inicial del arco.
+     * @param p2, punto final del arco.
+     * @param bulge, par�metro de curvatura.
+     */
+    public DxfCalArcs(Point2D p1, Point2D p2, double bulge) {
+        this.bulge = bulge;
+
+        if (bulge < 0.0) {
+            coord1 = p2;
+            coord2 = p1;
+
+        } else {
+            coord1 = p1;
+            coord2 = p2;
+        }
+
+        calculate();
+    }
+    
+    /**
+     * Calcula puntos sobre un arco.
+     * @return DxfCalArcs
+     */
+    DxfCalArcs calculate() {
+        d = Math.sqrt(((coord2.getX() - coord1.getX()) * (coord2.getX() -
+                      coord1.getX())) +
+                      ((coord2.getY() - coord1.getY()) * (coord2.getY() -
+                      coord1.getY())));
+
+        coordAux = new Point2D.Double((coord1.getX() + coord2.getX()) / 2.0,
+                                      (coord1.getY() + coord2.getY()) / 2.0);
+
+        double b = Math.abs(bulge);
+
+        double beta = Math.atan(b);
+
+        double alfa = beta * 4.0;
+
+        double landa = alfa / 2.0;
+
+        dd = (d / 2.0) / (Math.tan(landa));
+        radio = (d / 2.0) / (Math.sin(landa));
+
+        aci = Math.atan((coord2.getX() - coord1.getX()) / (coord2.getY() -
+                        coord1.getY()));
+
+        double aciDegree = (aci * 180.0) / Math.PI;
+
+        if (coord2.getY() > coord1.getY()) {
+            aci += Math.PI;
+
+            aciDegree = (aci * 180.0) / Math.PI;
+
+        }
+
+        center = new Point2D.Double(coordAux.getX() +
+                                    (dd * Math.sin(aci + (Math.PI / 2.0))),
+                                    coordAux.getY() +
+                                    (dd * Math.cos(aci + (Math.PI / 2.0))));
+
+        calculateEA(alfa);
+
+        return this;
+    }
+    
+    /**
+     * Calcula el �ngulo de comienzo y el de finalizaci�n del arco.
+     * @param alfa, �ngulo del arco. 
+     */
+    void calculateEA(double alfa) {
+        empieza = Math.atan2(coord1.getY() - center.getY(),
+                             coord1.getX() - center.getX());
+        acaba = (empieza + alfa);
+        empieza = (empieza * 180.0) / Math.PI;
+        acaba = (acaba * 180.0) / Math.PI;
+
+    }
+    
+    /**
+     * Devuelve un Vector con los puntos que conforman el arco.
+     * @param inc, es el espaciamiento entre puntos (un grado sexagesimal por defecto).
+     * @return Vector de puntos.
+     */
+    public Vector getPoints(double inc) {
+        Vector arc = new Vector();
+        double angulo;
+
+        int iempieza = (int) empieza + 1; // ojo aqui !!
+        int iacaba = (int) acaba;
+
+        if (empieza <= acaba) {
+            addNode(arc, empieza);
+
+            for (angulo = iempieza; angulo <= iacaba; angulo += inc) {
+                addNode(arc, angulo);
+            }
+
+            addNode(arc, acaba);
+        } else {
+            addNode(arc, empieza);
+
+            for (angulo = iempieza; angulo <= 360; angulo += inc) {
+                addNode(arc, angulo);
+            }
+
+            for (angulo = 1; angulo <= iacaba; angulo += inc) {
+                addNode(arc, angulo);
+            }
+
+            addNode(arc, angulo);
+        }
+
+        Point2D aux = (Point2D) arc.get(arc.size() - 1);
+        double aux1 = Math.abs(aux.getX() - coord2.getX());
+        double aux2 = Math.abs(aux.getY() - coord2.getY());
+
+        /*if (aux1<=0.000005 && aux2<=0.000005) {
+                arc.remove(arc.size()-1);
+                arc.remove(arc.size()-1);
+                arc.add(coord2);
+        }*/
+        return arc;
+    }
+
+    /**
+     * Devuelve un Vector con puntos pertenecientes al arco y situados cerca de su
+     * punto central.
+     * @return Vector
+     */
+    public Vector getCentralPoint() {
+        Vector arc = new Vector();
+
+        if (empieza <= acaba) {
+            addNode(arc, (empieza + acaba) / 2.0);
+        } else {
+            addNode(arc, empieza);
+
+            double alfa = 360 - empieza;
+            double beta = acaba;
+            double an = alfa + beta;
+            double mid = an / 2.0;
+
+            if (mid <= alfa) {
+                addNode(arc, empieza + mid);
+            } else {
+                addNode(arc, mid - alfa);
+            }
+        }
+
+        return arc;
+    }
+    
+    /**
+     * A�ade un punto al arco basandose en un �ngulo dado.
+     * @param arc, arco al que se a�ade el punto.
+     * @param angulo, �ngulo donde se localiza el punto.
+     */
+    private void addNode(Vector arc, double angulo) {
+        double yy = center.getY() +
+                    (radio * Math.sin((angulo * Math.PI) / 180.0));
+        double xx = center.getX() +
+                    (radio * Math.cos((angulo * Math.PI) / 180.0));
+        arc.add(new Point2D.Double(xx, yy));
+
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfSolid.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfSolid.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfSolid.java	(revision 1291)
@@ -0,0 +1,184 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+
+
+/**
+ * Entidad SOLID de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ */
+public class DxfSolid extends DxfEntity {
+    final static Color baseColor = new Color(69, 106, 121);
+
+    //Vector points = null;
+    Point2D[] pts;
+    GeneralPath gp = null;
+    boolean closed = true;
+    private Color color = baseColor; //Color(255,214,132,255);
+
+    /**
+     * Constructor de DxfSolid.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra el DxfSolid.
+     * @param layer, capa del DXF en la que se encuentra el DxfSolid.
+     * @param pts, puntos 2D que componen el DxfSolid.
+     */
+    public DxfSolid(IProjection proj, DxfLayer layer, Point2D[] pts) {
+        super(proj, layer);
+
+        Point2D aux = pts[2];
+        pts[2] = pts[3];
+        pts[3] = aux;
+        this.pts = pts;
+        extent = new Extent();
+
+        for (int i = 0; i < pts.length; i++) {
+            extent.add(pts[i]);
+        }
+    }
+
+    /**
+     * Devuelve el color del DxfSolid.
+     * @return Color
+     */
+    public Color c() {
+        return color;
+    }
+
+    /**
+     * Establece el color del DxfSolid.
+     * @param color
+     * @return Color
+     */
+    public Color c(Color color) {
+        this.color = color;
+
+        return color;
+    }
+
+    /**
+     * Permite reproyectar un DxfSolid dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    public void reProject(ICoordTrans rp) {
+        Point2D[] savePts = pts;
+
+        pts = new Point2D[savePts.length];
+        extent = new Extent();
+
+        Point2D ptDest = null;
+
+        for (int i = 0; i < savePts.length; i++) {
+            ptDest = rp.getPDest().createPoint(0.0, 0.0);
+            ptDest = rp.convert((Point2D) savePts[i], ptDest);
+            pts[i] = ptDest;
+            extent.add(ptDest);
+        }
+
+        setProjection(rp.getPDest());
+    }
+
+    /**
+     * Permite dibujar un DxfSolid.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Color color = null;
+
+        if (dxfColor == AcadColor.BYLAYER) {
+            //g.setColor(layer.getColor());
+            color = layer.getColor();
+        } else {
+            //g.setColor(AcadColor.getColor(dxfColor));
+            color = AcadColor.getColor(dxfColor);
+        }
+
+        newGP(vp);
+
+        if (closed) {
+            g.setColor(new Color(color.getRed(), color.getBlue(),
+                                 color.getGreen(), 0x20));
+            g.fill(gp);
+        }
+
+        g.setColor(color);
+        g.draw(gp);
+    }
+
+    /**
+     * Permite generar un GeneralPath partiendo del array de Point2D que conforma el
+     * DxfSolid.
+     * @param vp
+     */
+    private void newGP(ViewPortData vp) {
+        //if (gp != null) return;
+        gp = new GeneralPath();
+
+        Point2D pt0 = null;
+        Point2D pt = null;
+        Point2D pt1 = null;
+        Point2D.Double ptTmp = new Point2D.Double(0.0, 0.0);
+
+        for (int i = 0; i < pts.length; i++) {
+            pt1 = (Point2D) pts[i];
+            vp.mat.transform(pt1, ptTmp);
+
+            if (pt0 == null) {
+                pt0 = ptTmp;
+                gp.moveTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            } else {
+                gp.lineTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            }
+        }
+
+        if (closed) {
+            gp.closePath();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.px.dxf.DxfEntity#toDxfFileString()
+     */
+    public String toDxfString() {
+        // TODO Auto-generated method stub
+        return "";
+    }
+
+    /**
+     * Devuelve el array de puntos que conforman el DxfSolid.
+     * @return Point2D[], puntos del DxfSolid.
+     */
+    public Point2D[] getPts() {
+        return pts;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfFeatureMaker.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfFeatureMaker.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfFeatureMaker.java	(revision 1291)
@@ -0,0 +1,3586 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Graphics2D;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.cresques.geo.ViewPortData;
+import org.cresques.px.Extent;
+import org.gvsig.dxf.geo.Point3D;
+import org.gvsig.dxf.io.DxfFile;
+import org.gvsig.dxf.io.DxfGroup;
+import org.gvsig.dxf.io.DxfGroupVector;
+import org.gvsig.dxf.px.IObjList;
+import org.gvsig.dxf.px.gml.Feature;
+import org.gvsig.dxf.px.gml.FeatureCollection;
+import org.gvsig.dxf.px.gml.InsPoint3D;
+import org.gvsig.dxf.px.gml.LineString;
+import org.gvsig.dxf.px.gml.LineString3D;
+import org.gvsig.dxf.px.gml.Polygon;
+import org.gvsig.dxf.px.gml.Polygon3D;
+
+
+/**
+ * La clase DxfFeatureMaker facilita la creaci�n de entidades en un modelo de datos
+ * GIS. La creaci�n se realiza partiendo de las entidades obtenidas de un fichero DXF.
+ * @author jmorell
+ */
+public class DxfFeatureMaker implements DxfFile.EntityFactory, Projected {
+    IProjection proj = null;
+
+    //Feature lastFeature = null;
+    Feature lastFeaBordes = null;
+    Feature lastFeaFondos = null;
+    boolean isDoubleFeatured = false;
+    FeatureCollection features = null;
+    double bulge = 0.0;
+    double xtruX = 0.0;
+    double xtruY = 0.0;
+    double xtruZ = 1.0;
+    int polylineFlag = 0;
+    Point3D firstPt = new Point3D();
+    Point3D ptAnterior = null;
+    boolean addingToBlock = false;
+    int iterator = 0;
+    FeatureCollection blk = null;
+    Vector blkList = null;
+    DxfTable layers = null;
+    private Vector faces = null;
+    private boolean hasFaces = false;
+    private int facesIterador = 1;
+    private Point2D facesFirstPoint = null;
+    private Vector attributes = null;
+    private boolean constantPolylineElevation;
+    private double lastVertexElevation;
+    private boolean dxf3DFile;
+
+    /**
+     * Constructor de DxfFeatureMaker.
+     * @param proj, proyecci�n cartogr�fica en la que se encontrar�n las entidades
+     * que creemos.
+     */
+    public DxfFeatureMaker(IProjection proj) {
+        this.proj = proj;
+        layers = new DxfTable();
+        features = new FeatureCollection(proj);
+        blkList = new Vector();
+        attributes = new Vector();
+        dxf3DFile = false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#setAddingToBlock(boolean)
+     */
+    public void setAddingToBlock(boolean a) {
+        addingToBlock = a;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createLayer(org.cresques.io.DxfGroupVector)
+     */
+    public void createLayer(DxfGroupVector v) throws Exception {
+        int color = v.getDataAsInt(62);
+        DxfLayer layer = new DxfLayer(v.getDataAsString(2),
+                                      Math.abs(v.getDataAsInt(62)));
+
+        if (color < 0) {
+            layer.isOff = true;
+        }
+
+        layer.lType = v.getDataAsString(6);
+        layer.setFlags(v.getDataAsInt(70));
+
+        // compruebo flags
+        if ((layer.flags & 0x01) == 0x01) {
+            layer.frozen = true;
+        }
+
+        if ((layer.flags & 0x02) == 0x02) {
+            layer.frozen = true;
+        }
+
+        DxfFile.logger.debug("LAYER color=" + layer.getColor());
+
+        layers.add(layer);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createPolyline(org.cresques.io.DxfGroupVector)
+     */
+    public void createPolyline(DxfGroupVector grp) throws Exception {
+        LineString3D lineString3D = new LineString3D();
+        Polygon3D polygon3D = new Polygon3D();
+
+        //Feature feature= new Feature();
+        Feature feaBordes = new Feature();
+        Feature feaFondos = new Feature();
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        int flags = 0;
+        constantPolylineElevation = true;
+
+        // 041122: Cada polyline tiene asociado un objeto faces distinto.
+        faces = new Vector();
+
+        //feature.setProp("dxfEntity", "Polyline");
+        feaBordes.setProp("dxfEntity", "Polyline");
+        feaFondos.setProp("dxfEntity", "Polyline");
+
+        if (grp.hasCode(8)) {
+            //feature.setProp("layer", grp.getDataAsString(8));
+            feaBordes.setProp("layer", grp.getDataAsString(8));
+            feaFondos.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+
+            //feature.setProp("thickness", string);
+            feaBordes.setProp("thickness", string);
+            feaFondos.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+
+            //feature.setProp("thickness", doub.toString());
+            feaBordes.setProp("thickness", doub.toString());
+            feaFondos.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+
+            //feature.setProp("color", string);
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "false");
+            feaFondos.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+
+            //feature.setProp("color", string);
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "true");
+            feaFondos.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(10)) {
+            x = grp.getDataAsDouble(10);
+        }
+
+        if (grp.hasCode(20)) {
+            y = grp.getDataAsDouble(20);
+        }
+
+        if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+
+            if (z != 0.0) {
+                dxf3DFile = true;
+            }
+
+            Double doub = new Double(z);
+            String string = doub.toString();
+
+            //feature.setProp("elevation", string);
+            feaBordes.setProp("elevation", string);
+            feaFondos.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+
+            //feature.setProp("elevation", doub.toString());
+            feaBordes.setProp("elevation", doub.toString());
+            feaFondos.setProp("elevation", doub.toString());
+        }
+
+        if (grp.hasCode(70)) {
+            flags = grp.getDataAsInt(70);
+        }
+
+        if (grp.hasCode(210)) {
+            xtruX = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            xtruY = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            xtruZ = grp.getDataAsDouble(230);
+        }
+
+        if (((flags & 0x01) == 0x01) || ((flags & 0x40) == 0x40)) {
+            feaBordes.setGeometry(lineString3D);
+            feaFondos.setGeometry(polygon3D);
+            lastFeaBordes = feaBordes;
+            lastFeaFondos = feaFondos;
+            isDoubleFeatured = true;
+        } else if ((flags & 0x01) == 0x00) {
+            feaBordes.setGeometry(lineString3D);
+            lastFeaBordes = feaBordes;
+            isDoubleFeatured = false;
+        } else {
+        	DxfFile.logger.debug("Detectada una Polyline Flag que no corresponde");
+        	DxfFile.logger.debug("a una Polyline corriente, ni a una Closed Polyline");
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#endSeq(org.cresques.io.DxfGroupVector)
+     */
+    public void endSeq() throws Exception {
+        if (isDoubleFeatured) {
+            if (lastFeaBordes.getGeometry() instanceof LineString3D) {
+                Feature feaBordes = lastFeaBordes;
+                Feature feaFondos = lastFeaFondos;
+                LineString3D lineString3D = (LineString3D) feaBordes.getGeometry();
+                Polygon3D polygon3D = (Polygon3D) feaFondos.getGeometry();
+                lineString3D.add(firstPt);
+
+                if ((bulge != 0) &&
+                        !((lineString3D.get(lineString3D.pointNr() - 2).getX() == lineString3D.get(lineString3D.pointNr() -
+                                                                                                       1)
+                                                                                                  .getX()) &&
+                        (lineString3D.get(lineString3D.pointNr() - 2).getY() == lineString3D.get(lineString3D.pointNr() -
+                                                                                                     1)
+                                                                                                .getY()))) {
+                    // 041122: Correcci�n del bug en los bulges de FIXT3.DXF
+                    Vector arc = createArc(new Point2D.Double(lineString3D.get(lineString3D.pointNr() -
+                                                                               2)
+                                                                          .getX(),
+                                                              lineString3D.get(lineString3D.pointNr() -
+                                                                               2)
+                                                                          .getY()),
+                                           new Point2D.Double(lineString3D.get(lineString3D.pointNr() -
+                                                                               1)
+                                                                          .getX(),
+                                                              lineString3D.get(lineString3D.pointNr() -
+                                                                               1)
+                                                                          .getY()),
+                                           bulge);
+                    lineString3D.remove(lineString3D.pointNr() - 1);
+                    lineString3D.remove(lineString3D.pointNr() - 1);
+                    polygon3D.remove(lineString3D.pointNr() - 1);
+                    polygon3D.remove(lineString3D.pointNr() - 1);
+
+                    if (bulge > 0) {
+                        for (int i = 0; i < arc.size(); i++) {
+                            Point2D ptAux = new Point2D.Double();
+                            double z = ((Point3D) lineString3D.get(lineString3D.pointNr() -
+                                                                   2)).getZ();
+                            ptAux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                     ((Point2D) arc.get(i)).getY());
+
+                            Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                          ptAux.getY(), z);
+                            lineString3D.add(ptAux3D);
+                            polygon3D.add(ptAux3D);
+
+                            if (lineString3D.pointNr() == 1) {
+                                firstPt = ptAux3D;
+                            }
+                        }
+                    } else {
+                        for (int i = arc.size() - 1; i >= 0; i--) {
+                            Point2D ptAux = new Point2D.Double();
+                            double z = ((Point3D) lineString3D.get(lineString3D.pointNr() -
+                                                                   2)).getZ();
+                            ptAux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                     ((Point2D) arc.get(i)).getY());
+
+                            Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                          ptAux.getY(), z);
+                            lineString3D.add(ptAux3D);
+                            polygon3D.add(ptAux3D);
+
+                            if ((lineString3D.pointNr() == 1) ||
+                                    (polygon3D.pointNr() == 1)) {
+                                firstPt = ptAux3D;
+                            }
+                        }
+                    }
+
+                    // 041122
+                    bulge = 0.0;
+                }
+
+                if (hasFaces) {
+                    LineString ls1 = new LineString();
+                    Polygon pl1 = new Polygon();
+                    LineString ls2 = new LineString();
+                    Polygon pl2 = new Polygon();
+                    LineString ls = new LineString();
+                    Polygon pl = new Polygon();
+                    int[] face;
+                    int i0;
+                    int i1;
+                    Iterator iter = faces.iterator();
+
+                    while (iter.hasNext()) {
+                        face = (int[]) iter.next();
+                        i0 = face[3];
+
+                        for (int i = 0; i < 4; i++) {
+                            i1 = face[i];
+
+                            if (i0 > 0) {
+                                if ((facesIterador % 2) != 0) {
+                                    ls1.add(lineString3D.get(i0 - 1));
+                                    pl1.add(polygon3D.get(i0 - 1));
+                                } else {
+                                    ls2.add(lineString3D.get(i0 - 1));
+                                    pl2.add(polygon3D.get(i0 - 1));
+                                }
+
+                                facesIterador = facesIterador + 1;
+                            }
+
+                            i0 = i1;
+                        }
+                    }
+
+                    facesFirstPoint = new Point2D.Double(ls1.get(0).getX(),
+                                                         ls1.get(0).getY());
+
+                    for (int i = 0; i < ls1.pointNr(); i++) {
+                        ls.add(ls1.get(i));
+                        pl.add(pl1.get(i));
+                    }
+
+                    for (int i = ls2.pointNr() - 1; i > 0; i--) {
+                        ls.add(ls2.get(i));
+                        pl.add(pl2.get(i));
+                    }
+
+                    ls.add(facesFirstPoint);
+                    pl.add(facesFirstPoint);
+                    lastFeaBordes.setGeometry(ls);
+                    lastFeaFondos.setGeometry(pl);
+                } else {
+                    lastFeaBordes.setGeometry(lineString3D);
+                    lastFeaFondos.setGeometry(polygon3D);
+                }
+
+                // 041130: Rellena las props con los atributos.
+                completeAttributes(lastFeaBordes);
+                completeAttributes(lastFeaFondos);
+
+                setPolylineElevation(lastFeaBordes, lastFeaFondos);
+
+                if (addingToBlock == false) {
+                    //features.add(lastFeaBordes);
+                    features.add(lastFeaFondos);
+                } else {
+                    //blk.add(lastFeaBordes);
+                    blk.add(lastFeaFondos);
+                }
+
+                lastFeaBordes = null;
+                lastFeaFondos = null;
+            } else if (lastFeaBordes.getGeometry() instanceof InsPoint3D) {
+                // Se trata de un SEQEND despues de un ATTRIB
+                copyAttributes(lastFeaBordes);
+
+                gestionaInsert(lastFeaBordes);
+
+                if (addingToBlock == false) {
+                    features.add(lastFeaFondos);
+                } else {
+                    blk.add(lastFeaBordes);
+                }
+
+                lastFeaBordes = null;
+                lastFeaFondos = null;
+            } else {
+                // Caso no contemplado.
+            }
+        } else {
+            if (lastFeaBordes.getGeometry() instanceof LineString3D) {
+                Feature feaBordes = lastFeaBordes;
+                LineString3D lineString3D = (LineString3D) feaBordes.getGeometry();
+
+                if ((bulge != 0) &&
+                        !((lineString3D.get(lineString3D.pointNr() - 2).getX() == lineString3D.get(lineString3D.pointNr() -
+                                                                                                       1)
+                                                                                                  .getX()) &&
+                        (lineString3D.get(lineString3D.pointNr() - 2).getY() == lineString3D.get(lineString3D.pointNr() -
+                                                                                                     1)
+                                                                                                .getY()))) {
+                    // 041122: Correcci�n del bug en los bulges de FIXT3.DXF
+                    Vector arc = createArc(new Point2D.Double(lineString3D.get(lineString3D.pointNr() -
+                                                                               2)
+                                                                          .getX(),
+                                                              lineString3D.get(lineString3D.pointNr() -
+                                                                               2)
+                                                                          .getY()),
+                                           new Point2D.Double(lineString3D.get(lineString3D.pointNr() -
+                                                                               1)
+                                                                          .getX(),
+                                                              lineString3D.get(lineString3D.pointNr() -
+                                                                               1)
+                                                                          .getY()),
+                                           bulge);
+                    lineString3D.remove(lineString3D.pointNr() - 1);
+                    lineString3D.remove(lineString3D.pointNr() - 1);
+
+                    if (bulge > 0) {
+                        for (int i = 0; i < arc.size(); i++) {
+                            Point2D ptAux = new Point2D.Double();
+                            double z = ((Point3D) lineString3D.get(lineString3D.pointNr() -
+                                                                   2)).getZ();
+                            ptAux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                     ((Point2D) arc.get(i)).getY());
+
+                            Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                          ptAux.getY(), z);
+                            lineString3D.add(ptAux3D);
+
+                            if (lineString3D.pointNr() == 1) {
+                                firstPt = ptAux3D;
+                            }
+                        }
+                    } else {
+                        for (int i = arc.size() - 1; i >= 0; i--) {
+                            Point2D ptAux = new Point2D.Double();
+                            double z = ((Point3D) lineString3D.get(lineString3D.pointNr() -
+                                                                   2)).getZ();
+                            ptAux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                     ((Point2D) arc.get(i)).getY());
+
+                            Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                          ptAux.getY(), z);
+                            lineString3D.add(ptAux3D);
+
+                            if (lineString3D.pointNr() == 1) {
+                                firstPt = ptAux3D;
+                            }
+                        }
+                    }
+
+                    // 041122
+                    bulge = 0.0;
+                }
+
+                if (hasFaces) {
+                    LineString ls1 = new LineString();
+                    LineString ls2 = new LineString();
+                    LineString ls = new LineString();
+                    int[] face;
+                    int i0;
+                    int i1;
+                    Iterator iter = faces.iterator();
+
+                    while (iter.hasNext()) {
+                        face = (int[]) iter.next();
+                        i0 = face[3];
+
+                        for (int i = 0; i < 4; i++) {
+                            i1 = face[i];
+
+                            if (i0 > 0) {
+                                if ((facesIterador % 2) != 0) {
+                                    ls1.add(lineString3D.get(i0 - 1));
+
+                                    //ls.add((Point2D)lineString.get(Math.abs(i1)-1));
+                                } else {
+                                    ls2.add(lineString3D.get(i0 - 1));
+
+                                    //ls.add((Point2D)lineString.get(Math.abs(i1)-1));
+                                }
+
+                                facesIterador = facesIterador + 1;
+                            }
+
+                            i0 = i1;
+                        }
+                    }
+
+                    facesFirstPoint = new Point2D.Double(ls1.get(0).getX(),
+                                                         ls1.get(0).getY());
+
+                    for (int i = 0; i < ls1.pointNr(); i++) {
+                        ls.add(ls1.get(i));
+                    }
+
+                    for (int i = ls2.pointNr() - 1; i > 0; i--) {
+                        ls.add(ls2.get(i));
+                    }
+
+                    ls.add(facesFirstPoint);
+                    lastFeaBordes.setGeometry(ls);
+                } else {
+                    lastFeaBordes.setGeometry(lineString3D);
+                }
+
+                // 041130: Rellena las props con los atributos.
+                completeAttributes(lastFeaBordes);
+
+                setPolylineElevation(lastFeaBordes);
+
+                if (addingToBlock == false) {
+                    features.add(lastFeaBordes);
+                } else {
+                    blk.add(lastFeaBordes);
+                }
+
+                lastFeaBordes = null;
+            } else {
+                // Se trata de un SEQEND despues de un ATTRIB
+            }
+        }
+
+        xtruX = 0.0;
+        xtruY = 0.0;
+        xtruZ = 1.0;
+        bulge = 0.0;
+        isDoubleFeatured = false;
+        hasFaces = false;
+        facesIterador = 1;
+    }
+
+    /**
+     * Establece un valor constante para la elevaci�n de una polil�nea.
+     * @param feaBordes, la polil�nea.
+     */
+    private void setPolylineElevation(Feature feaBordes) {
+        if (constantPolylineElevation) {
+            Double doub = new Double(lastVertexElevation);
+            String string = doub.toString();
+            feaBordes.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+            String string = doub.toString();
+            feaBordes.setProp("elevation", string);
+        }
+    }
+
+    /**
+     * Establece un valor constante para la elevaci�n de un pol�gono.
+     * @param feaBordes, borde del pol�gono.
+     * @param feaFondos, fondo del pol�gono.
+     */
+    private void setPolylineElevation(Feature feaBordes, Feature feaFondos) {
+        if (constantPolylineElevation) {
+            Double doub = new Double(lastVertexElevation);
+            String string = doub.toString();
+            feaBordes.setProp("elevation", string);
+            feaFondos.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+            String string = doub.toString();
+            feaBordes.setProp("elevation", string);
+            feaFondos.setProp("elevation", string);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#addVertex(org.cresques.io.DxfGroupVector)
+     */
+    public void addVertex(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        int vFlags = 0;
+
+        if (isDoubleFeatured) {
+            Feature feaBordes = lastFeaBordes;
+            Feature feaFondos = lastFeaFondos;
+            LineString3D lineString3D = (LineString3D) feaBordes.getGeometry();
+            Polygon3D polygon3D = (Polygon3D) feaFondos.getGeometry();
+
+            if (grp.hasCode(8)) {
+                feaBordes.setProp("layer", grp.getDataAsString(8));
+                feaFondos.setProp("layer", grp.getDataAsString(8));
+            }
+
+            if (grp.hasCode(70)) {
+                vFlags = grp.getDataAsInt(70);
+            }
+
+            x = grp.getDataAsDouble(10);
+            y = grp.getDataAsDouble(20);
+            z = grp.getDataAsDouble(30);
+
+            Point3D point_in = new Point3D(x, y, z);
+            Point3D xtru = new Point3D(xtruX, xtruY, xtruZ);
+            Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+            x = point_out.getX();
+            y = point_out.getY();
+            z = point_out.getZ();
+
+            if (z != 0.0) {
+                dxf3DFile = true;
+            }
+
+            if ((z != lastVertexElevation) && (lineString3D.pointNr() > 0)) {
+                constantPolylineElevation = false;
+            }
+
+            lastVertexElevation = z;
+
+            if (((vFlags & 0x80) == 0x80) && ((vFlags & 0x40) == 0)) {
+                int[] face = { 0, 0, 0, 0 };
+                face[0] = grp.getDataAsInt(71);
+                face[1] = grp.getDataAsInt(72);
+                face[2] = grp.getDataAsInt(73);
+                face[3] = grp.getDataAsInt(74);
+                addFace(face);
+            } else if ((vFlags & 0x10) == 0x10) {
+                // Son vertices que se trataran cuando se implementen
+                // los splines. En principio no se hace nada con ellos.
+            } else {
+            	Point2D ptaux = proj.createPoint(x, y);
+                Point3D pt = new Point3D(ptaux.getX(), ptaux.getY(), z);
+                lineString3D.add(pt);
+                polygon3D.add(pt);
+
+                if (lineString3D.pointNr() == 1) {
+                    firstPt = pt;
+                }
+
+                if (bulge == 0.0) {
+                    if (grp.hasCode(42)) {
+                        bulge = grp.getDataAsDouble(42);
+                    } else {
+                        bulge = 0.0;
+                    }
+                } else {
+                    double bulge_aux = 0.0;
+
+                    if (grp.hasCode(42)) {
+                        bulge_aux = grp.getDataAsDouble(42);
+                    } else {
+                        bulge_aux = 0.0;
+                    }
+
+                    //int cnt = lineString.pointNr();
+                    if ((ptAnterior.getX() == pt.getX()) &&
+                            (ptAnterior.getY() == pt.getY())) {
+                        // no se construye el arco
+                    } else {
+                        lineString3D.remove(lineString3D.pointNr() - 1);
+                        lineString3D.remove(lineString3D.pointNr() - 1);
+                        polygon3D.remove(polygon3D.pointNr() - 1);
+                        polygon3D.remove(polygon3D.pointNr() - 1);
+
+                        Vector arc = createArc(ptAnterior, pt, bulge);
+
+                        if (bulge > 0) {
+                            for (int i = 0; i < arc.size(); i++) {
+                                Point2D ptAux = new Point2D.Double();
+                                ptAux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                         ((Point2D) arc.get(i)).getY());
+
+                                Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                              ptAux.getY(), z);
+                                lineString3D.add(ptAux3D);
+                                polygon3D.add(ptAux3D);
+
+                                if (lineString3D.pointNr() == 1) {
+                                    firstPt = ptAux3D;
+                                }
+                            }
+                        } else {
+                            for (int i = arc.size() - 1; i >= 0; i--) {
+                                Point2D ptAux = new Point2D.Double();
+                                ptAux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                         ((Point2D) arc.get(i)).getY());
+
+                                Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                              ptAux.getY(), z);
+                                lineString3D.add(ptAux3D);
+                                polygon3D.add(ptAux3D);
+
+                                if ((lineString3D.pointNr() == 1) ||
+                                        (polygon3D.pointNr() == 1)) {
+                                    firstPt = ptAux3D;
+                                }
+                            }
+                        }
+                    }
+
+                    bulge = bulge_aux;
+                }
+
+                ptAnterior = pt;
+            }
+        } else {
+            Feature feaBordes = lastFeaBordes;
+            LineString3D lineString3D = (LineString3D) feaBordes.getGeometry();
+
+            if (grp.hasCode(8)) {
+                feaBordes.setProp("layer", grp.getDataAsString(8));
+            }
+
+            if (grp.hasCode(70)) {
+                vFlags = grp.getDataAsInt(70);
+            }
+
+            x = grp.getDataAsDouble(10);
+            y = grp.getDataAsDouble(20);
+            if (grp.hasCode(30)){
+            	z = grp.getDataAsDouble(30);
+            }
+
+            Point3D point_in = new Point3D(x, y, z);
+            Point3D xtru = new Point3D(xtruX, xtruY, xtruZ);
+            Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+            x = point_out.getX();
+            y = point_out.getY();
+            z = point_out.getZ();
+
+            if (z != 0.0) {
+                dxf3DFile = true;
+            }
+
+            if ((z != lastVertexElevation) && (lineString3D.pointNr() > 0)) {
+                constantPolylineElevation = false;
+            }
+
+            lastVertexElevation = z;
+
+            if (((vFlags & 0x80) == 0x80) && ((vFlags & 0x40) == 0)) {
+                int[] face = { 0, 0, 0, 0 };
+                face[0] = grp.getDataAsInt(71);
+                face[1] = grp.getDataAsInt(72);
+                face[2] = grp.getDataAsInt(73);
+                face[3] = grp.getDataAsInt(74);
+                addFace(face);
+            } else if ((vFlags & 16) == 16) {
+                // no se hace nada.
+            } else {
+            	Point2D ptaux = proj.createPoint(x, y);
+                Point3D pt = new Point3D(ptaux.getX(), ptaux.getY(), z);
+                lineString3D.add(pt);
+
+                if (lineString3D.pointNr() == 1) {
+                    firstPt = pt;
+
+                }
+
+                if (bulge == 0.0) {
+                    if (grp.hasCode(42)) {
+                        bulge = grp.getDataAsDouble(42);
+                    } else {
+                        bulge = 0.0;
+                    }
+
+                } else {
+                    double bulge_aux = 0.0;
+
+                    if (grp.hasCode(42)) {
+                        bulge_aux = grp.getDataAsDouble(42);
+                    } else {
+                        bulge_aux = 0.0;
+                    }
+
+                    if ((ptAnterior.getX() == pt.getX()) &&
+                            (ptAnterior.getY() == pt.getY())) {
+                        // no se construye el arco
+                    } else {
+                        // Borro los puntos inicio y final del arco.
+                        lineString3D.remove(lineString3D.pointNr() - 1);
+                        lineString3D.remove(lineString3D.pointNr() - 1);
+
+                        Vector arc = createArc(ptAnterior, pt, bulge);
+
+                        if (bulge > 0) {
+                            for (int i = 0; i < arc.size(); i++) {
+                                Point2D ptAux = new Point2D.Double();
+                                ptAux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                         ((Point2D) arc.get(i)).getY());
+
+                                Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                              ptAux.getY(), z);
+                                lineString3D.add(ptAux3D);
+
+                                if (lineString3D.pointNr() == 1) {
+                                    firstPt = ptAux3D;
+                                }
+                            }
+                        } else {
+                            for (int i = arc.size() - 1; i >= 0; i--) {
+                                Point2D ptAux = new Point2D.Double();
+                                ptAux = proj.createPoint(((Point2D) arc.get(i)).getX(),
+                                                         ((Point2D) arc.get(i)).getY());
+
+                                Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                              ptAux.getY(), z);
+                                lineString3D.add(ptAux3D);
+
+                                if (lineString3D.pointNr() == 1) {
+                                    firstPt = ptAux3D;
+                                }
+                            }
+                        }
+                    }
+
+                    bulge = bulge_aux;
+                }
+
+                ptAnterior = pt;
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createLwPolyline(org.cresques.io.DxfGroupVector)
+     */
+    public void createLwPolyline(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double elev = 0.0;
+        DxfGroup g = null;
+        LineString3D lineString3D = new LineString3D();
+        Polygon3D polygon3D = new Polygon3D();
+
+        //Geometry geometria;
+        //Feature feature= new Feature();
+        Feature feaBordes = new Feature();
+        Feature feaFondos = new Feature();
+        int flags = 0;
+        //int NumberOfVertices = 0;
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        //feature.setProp("dxfEntity", "LwPolyline");
+        feaBordes.setProp("dxfEntity", "LwPolyline");
+        feaFondos.setProp("dxfEntity", "LwPolyline");
+
+        //if (grp.hasCode(8)) {
+            //feature.setProp("layer", grp.getDataAsString(8));
+        //    feaBordes.setProp("layer", grp.getDataAsString(8));
+        //}
+
+        feaBordes.setProp("layer", grp.getDataAsString(8));
+        feaFondos.setProp("layer", grp.getDataAsString(8));
+
+        if (grp.hasCode(38)) {
+            elev = grp.getDataAsDouble(38);
+
+            if (elev != 0.0) {
+                dxf3DFile = true;
+            }
+
+            Double doub = new Double(elev);
+            String string = doub.toString();
+
+            //feature.setProp("elevation", string);
+            feaBordes.setProp("elevation", string);
+            feaFondos.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+
+            //feature.setProp("elevation", doub.toString());
+            feaBordes.setProp("elevation", doub.toString());
+            feaFondos.setProp("elevation", doub.toString());
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+
+            //feature.setProp("thickness", string);
+            feaBordes.setProp("thickness", string);
+            feaFondos.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+
+            //feature.setProp("thickness", doub.toString());
+            feaBordes.setProp("thickness", doub.toString());
+            feaFondos.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+
+            //feature.setProp("color", string);
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "false");
+            feaFondos.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+
+            //feature.setProp("color", string);
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "true");
+            feaFondos.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(70)) {
+            flags = grp.getDataAsInt(70);
+        }
+
+        if ((flags & 0x01) == 0x01) {
+            //geometria = new Polygon();
+            feaBordes.setGeometry(lineString3D);
+            feaFondos.setGeometry(polygon3D);
+            isDoubleFeatured = true;
+        } else {
+            //geometria = new LineString();
+            feaBordes.setGeometry(lineString3D);
+            isDoubleFeatured = false;
+        }
+
+        //if (grp.hasCode(90)) {
+        //    NumberOfVertices = grp.getDataAsInt(90);
+        //}
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        int j = 0;
+        double firstX = 0.0;
+        double firstY = 0.0;
+        boolean hasBulge = false;
+        double bulgeLwp = 0.0;
+
+        for (int i = 0; i < grp.size(); i++) {
+            g = (DxfGroup) grp.get(i);
+
+            if (g.getCode() == 10) {
+                j++;
+                x = ((Double) g.getData()).doubleValue();
+            } else if (g.getCode() == 20) {
+                y = ((Double) g.getData()).doubleValue();
+
+                // A�adiendo extrusion a LwPolyline ...
+                Point3D point_in1 = new Point3D(x, y, elev);
+                Point3D xtru = new Point3D(extx, exty, extz);
+                Point3D point_out1 = DxfCalXtru.CalculateXtru(point_in1, xtru);
+                x = point_out1.getX();
+                y = point_out1.getY();
+                elev = point_out1.getZ();
+
+                //
+                if (hasBulge) {
+                    Point2D finalPoint = new Point2D.Double(x, y);
+
+                    if (((lineString3D).get(lineString3D.pointNr() -
+                                                               1).getX() == finalPoint.getX()) &&
+                            ((lineString3D).get(lineString3D.pointNr() -
+                                                                   1).getY() == finalPoint.getY())) {
+                        // no se construye el arco
+                    } else {
+                        Vector arc = createArc((lineString3D).get(lineString3D.pointNr() -
+                                                                                 1),
+                                               finalPoint, bulgeLwp);
+                        lineString3D.remove(lineString3D.pointNr() - 1);
+
+                        if (isDoubleFeatured) {
+                            polygon3D.remove(polygon3D.pointNr() - 1);
+                        }
+
+                        if (bulgeLwp > 0) {
+                            for (int k = 0; k < arc.size(); k++) {
+                                Point2D ptAux = new Point2D.Double();
+                                ptAux = proj.createPoint(((Point2D) arc.get(k)).getX(),
+                                                         ((Point2D) arc.get(k)).getY());
+
+                                Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                              ptAux.getY(), elev);
+                                lineString3D.add(ptAux3D);
+
+                                //if (lineString.pointNr() == 1) firstPt = ptAux;
+                                if (isDoubleFeatured) {
+                                    polygon3D.add(ptAux3D);
+                                }
+
+                                if ((lineString3D.pointNr() == 1) ||
+                                        (polygon3D.pointNr() == 1)) {
+                                    firstPt = ptAux3D;
+                                }
+                            }
+                        } else {
+                            for (int k = arc.size() - 1; k >= 0; k--) {
+                                Point2D ptAux = new Point2D.Double();
+                                ptAux = proj.createPoint(((Point2D) arc.get(k)).getX(),
+                                                         ((Point2D) arc.get(k)).getY());
+
+                                Point3D ptAux3D = new Point3D(ptAux.getX(),
+                                                              ptAux.getY(), elev);
+                                lineString3D.add(ptAux3D);
+
+                                if (isDoubleFeatured) {
+                                    polygon3D.add(ptAux3D);
+                                }
+
+                                if ((lineString3D.pointNr() == 1) ||
+                                        (polygon3D.pointNr() == 1)) {
+                                    firstPt = ptAux3D;
+                                }
+                            }
+                        }
+                    }
+
+                    hasBulge = false;
+                    bulgeLwp = 0.0;
+                } else {
+                	Point2D ptAux2D = proj.createPoint(x, y);
+					Point3D ptAux3D = new Point3D(ptAux2D.getX(), ptAux2D
+							.getY(), elev);
+                    lineString3D.add(ptAux3D);
+
+                    if (isDoubleFeatured) {
+                        polygon3D.add(ptAux3D);
+                    }
+                }
+
+                if (j == 1) {
+                    firstX = x;
+                    firstY = y;
+                }
+
+                x = 0.0;
+                y = 0.0;
+            } else if (g.getCode() == 42 && ((Double)g.getData()).doubleValue()!=0.0) { // Cuando los bulges eran 0.000 se provocaban errores
+                hasBulge = true;
+                bulgeLwp = ((Double) g.getData()).doubleValue();
+            }
+        }
+
+        if (isDoubleFeatured) {
+            //geometria.add(proj.createPoint(firstX, firstY));
+        	Point2D ptAux2D = proj.createPoint(firstX, firstY);
+			Point3D ptAux3D = new Point3D(ptAux2D.getX(), ptAux2D.getY(),
+                                          elev);
+            lineString3D.add(ptAux3D);
+            polygon3D.add(ptAux3D);
+        }
+
+        lastFeaBordes = feaBordes;
+
+        if (isDoubleFeatured) {
+            lastFeaFondos = feaFondos;
+        }
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(lastFeaBordes);
+        completeAttributes(lastFeaFondos);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            if (isDoubleFeatured) {
+                features.add(feaFondos);
+            } else {
+                features.add(feaBordes);
+            }
+        } else {
+            if (isDoubleFeatured) {
+                blk.add(feaFondos);
+            } else {
+                blk.add(feaBordes);
+            }
+        }
+
+        isDoubleFeatured = false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createLine(org.cresques.io.DxfGroupVector)
+     */
+    public void createLine(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z1 = 0.0;
+        double z2 = 0.0;
+        double elev = 0.0;
+        DxfGroup g = null;
+        Point2D pt1 = null;
+        Point2D pt2 = null;
+        LineString3D lineString3D = new LineString3D();
+        Feature feature = new Feature();
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        feature.setProp("dxfEntity", "Line");
+
+        if (grp.hasCode(8)) {
+            feature.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feature.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "true");
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        z1 = grp.getDataAsDouble(30);
+
+        /*if (grp.hasCode(30)) {
+            z1 = grp.getDataAsDouble(30);
+            elev = z1;
+            Double doub = new Double(elev);
+            String string = doub.toString();
+            //feature.setProp("elevation", string);
+        }*/
+        pt1 = proj.createPoint(x, y);
+        x = grp.getDataAsDouble(11);
+        y = grp.getDataAsDouble(21);
+        z2 = grp.getDataAsDouble(31);
+
+        /*if (grp.hasCode(31)) {
+            z2 = grp.getDataAsDouble(31);
+        } else {
+            // Cuando no se especifican z para las lineas se asume que la
+            // z es cero.
+            Double doub = new Double(0.0);
+            //feature.setProp("elevation", doub.toString());
+        }*/
+        pt2 = proj.createPoint(x, y);
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in1 = new Point3D(pt1.getX(), pt1.getY(), z1);
+        Point3D point_in2 = new Point3D(pt2.getX(), pt2.getY(), z2);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out1 = DxfCalXtru.CalculateXtru(point_in1, xtru);
+        Point3D point_out2 = DxfCalXtru.CalculateXtru(point_in2, xtru);
+
+        if (point_out1.getZ() != 0.0) {
+            dxf3DFile = true;
+        }
+
+        if (point_out2.getZ() != 0.0) {
+            dxf3DFile = true;
+        }
+
+        if (point_out1.getZ() == point_out2.getZ()) {
+            elev = z1;
+
+            Double doub = new Double(elev);
+            String string = doub.toString();
+            feature.setProp("elevation", string);
+        } else {
+            elev = 0.0;
+
+            Double doub = new Double(elev);
+            String string = doub.toString();
+            feature.setProp("elevation", string);
+        }
+
+        //pt1.setLocation(point_out1);
+        //pt2.setLocation(point_out2);
+        lineString3D.add(point_out1);
+        lineString3D.add(point_out2);
+
+        feature.setGeometry(lineString3D);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feature);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            features.add(feature);
+        } else {
+            blk.add(feature);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createText(org.cresques.io.DxfGroupVector)
+     */
+    public void createText(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double h = 0.0;
+        double rot = 0.0;
+        DxfGroup g = null;
+
+        //Point3D pt1 = null, pt2 = null;
+        Point3D pt = null;
+        org.gvsig.dxf.px.gml.Point3D point = new org.gvsig.dxf.px.gml.Point3D();
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        point.setTextPoint(true);
+
+        Feature feature = new Feature();
+
+        feature.setProp("dxfEntity", "Text");
+
+        if (grp.hasCode(8)) {
+            feature.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feature.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(1)) {
+            String strAux1 = grp.getDataAsString(1);
+            strAux1 = DxfConvTexts.ConvertText(strAux1);
+            feature.setProp("text", strAux1);
+        } else {
+            feature.setProp("text", "No Text Code");
+        }
+
+        if (grp.hasCode(40)) {
+            Double heightD = new Double(grp.getDataAsDouble(40));
+            String heightS = heightD.toString();
+            feature.setProp("textHeight", heightS);
+        } else {
+            feature.setProp("textHeight", "20.0");
+        }
+
+        if (grp.hasCode(50)) {
+            Double rotD = new Double(grp.getDataAsDouble(50));
+            String rotS = rotD.toString();
+            feature.setProp("textRotation", rotS);
+
+        } else {
+            feature.setProp("textRotation", "0.0");
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        if (grp.hasCode(30)) {
+        	z = grp.getDataAsDouble(30);
+        }
+        /*if (grp.hasCode(30)){
+            Double doub = new Double(z);
+            String string = doub.toString();
+            feature.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("elevation", doub.toString());
+        }*/
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+
+        Double doub = new Double(z);
+        feature.setProp("elevation", doub.toString());
+
+        if (z != 0.0) {
+            dxf3DFile = true;
+        }
+
+        point.add(new Point3D(x, y, z));
+        feature.setGeometry(point);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feature);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            features.add(feature);
+        } else {
+            blk.add(feature);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createMText(org.cresques.io.DxfGroupVector)
+     */
+    public void createMText(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double h = 0.0;
+        double rot = 0.0;
+        DxfGroup g = null;
+
+        //Point2D pt1 = null, pt2 = null;
+        Point3D pt = null;
+        org.gvsig.dxf.px.gml.Point3D point = new org.gvsig.dxf.px.gml.Point3D();
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        point.setTextPoint(true);
+
+        Feature feature = new Feature();
+
+        feature.setProp("dxfEntity", "Text");
+
+        if (grp.hasCode(8)) {
+            feature.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feature.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(1)) {
+            String strAux1 = grp.getDataAsString(1);
+            strAux1 = DxfConvTexts.ConvertText(strAux1);
+            feature.setProp("text", strAux1);
+        } else {
+            feature.setProp("text", "No Text Code");
+        }
+
+        if (grp.hasCode(40)) {
+            Double heightD = new Double(grp.getDataAsDouble(40));
+            String heightS = heightD.toString();
+            feature.setProp("textHeight", heightS);
+        } else {
+            feature.setProp("textHeight", "20.0");
+        }
+
+        if (grp.hasCode(50)) {
+            Double rotD = new Double(grp.getDataAsDouble(50));
+            String rotS = rotD.toString();
+            feature.setProp("textRotation", rotS);
+
+        } else {
+            feature.setProp("textRotation", "0.0");
+        }
+
+        if (grp.hasCode(71)) {
+            int attachPoint = grp.getDataAsInt(71);
+
+            if (attachPoint == 1) {
+            } else if (attachPoint == 2) {
+            } else if (attachPoint == 3) {
+            } else if (attachPoint == 4) {
+            } else if (attachPoint == 5) {
+            } else if (attachPoint == 6) {
+            } else if (attachPoint == 7) {
+            } else if (attachPoint == 8) {
+            } else if (attachPoint == 9) {
+            }
+        }
+
+        if (grp.hasCode(72)) {
+            int drawDirection = grp.getDataAsInt(71);
+
+            if (drawDirection == 1) {
+            } else if (drawDirection == 3) {
+            } else if (drawDirection == 5) {
+            }
+        }
+
+        if (grp.hasCode(73)) {
+            int spacingStyle = grp.getDataAsInt(71);
+
+            if (spacingStyle == 1) {
+            } else if (spacingStyle == 2) {
+            }
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        z = grp.getDataAsDouble(30);
+
+        /*if (grp.hasCode(30)){
+            z = grp.getDataAsDouble(30);
+            Double doub = new Double(z);
+            String string = doub.toString();
+            feature.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("elevation", doub.toString());
+        }*/
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+
+        Double doub = new Double(z);
+        feature.setProp("elevation", doub.toString());
+
+        if (z != 0.0) {
+            dxf3DFile = true;
+        }
+
+        point.add(new Point3D(x, y, z));
+        feature.setGeometry(point);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feature);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            features.add(feature);
+        } else {
+            blk.add(feature);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createPoint(org.cresques.io.DxfGroupVector)
+     */
+    public void createPoint(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        DxfGroup g = null;
+        Point3D pt = null;
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+        org.gvsig.dxf.px.gml.Point3D point = new org.gvsig.dxf.px.gml.Point3D();
+        Feature feature = new Feature();
+
+        feature.setProp("dxfEntity", "Point");
+
+        if (grp.hasCode(8)) {
+            feature.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feature.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "true");
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        z = grp.getDataAsDouble(30);
+
+        /*if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+            Double doub = new Double(z);
+            String string = doub.toString();
+            feature.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("elevation", doub.toString());
+        }*/
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+
+        Double doub = new Double(z);
+        feature.setProp("elevation", doub.toString());
+
+        if (z != 0.0) {
+            dxf3DFile = true;
+        }
+
+        point.add(new Point3D(x, y, z));
+        feature.setGeometry(point);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feature);
+
+        /*for (int i=0;i<attributes.size();i++) {
+            String[] att = new String[2];
+            att = (String[])attributes.get(i);
+            feature.setProp(att[0],att[1]);
+        }*/
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            features.add(feature);
+        } else {
+            blk.add(feature);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createCircle(org.cresques.io.DxfGroupVector)
+     */
+    public void createCircle(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double r = 0.0;
+        Point3D firstPt = new Point3D();
+        DxfGroup g = null;
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+        LineString3D lineString3D = new LineString3D();
+        Polygon3D polygon3D = new Polygon3D();
+        Feature feaBordes = new Feature();
+        Feature feaFondos = new Feature();
+
+        feaBordes.setProp("dxfEntity", "Circle");
+        feaFondos.setProp("dxfEntity", "Circle");
+
+        if (grp.hasCode(8)) {
+            feaBordes.setProp("layer", grp.getDataAsString(8));
+        }
+
+        feaFondos.setProp("layer", grp.getDataAsString(8));
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feaBordes.setProp("thickness", string);
+            feaFondos.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feaBordes.setProp("thickness", doub.toString());
+            feaFondos.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "false");
+            feaFondos.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "true");
+            feaFondos.setProp("colorByLayer", "true");
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+        }
+
+
+        /*if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+            Double doub = new Double(z);
+            String string = doub.toString();
+            feaBordes.setProp("elevation", string);
+            feaFondos.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+            feaBordes.setProp("elevation", doub.toString());
+            feaFondos.setProp("elevation", doub.toString());
+        }*/
+        if (grp.hasCode(40)) {
+            r = grp.getDataAsDouble(40);
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+
+        Double doub = new Double(z);
+        feaBordes.setProp("elevation", doub.toString());
+        feaFondos.setProp("elevation", doub.toString());
+
+        if (z != 0.0) {
+            dxf3DFile = true;
+        }
+
+        Point2D c = proj.createPoint(x, y);
+        Point3D center = new Point3D(c.getX(), c.getY(), z);
+        Point3D[] pts = new Point3D[360];
+        int angulo = 0;
+
+        for (angulo = 0; angulo < 360; angulo++) {
+            pts[angulo] = new Point3D(center.getX(), center.getY(),
+                                      center.getZ());
+            pts[angulo] = new Point3D(pts[angulo].getX() +
+                                      (r * Math.sin((angulo * Math.PI) / 180.0)),
+                                      pts[angulo].getY() +
+                                      (r * Math.cos((angulo * Math.PI) / 180.0)),
+                                      center.getZ());
+
+            if (pts.length == 1) {
+                firstPt = pts[angulo];
+            }
+        }
+
+        for (int i = 0; i < pts.length; i++) {
+            lineString3D.add(pts[i]);
+            polygon3D.add(pts[i]);
+        }
+
+        feaBordes.setGeometry(lineString3D);
+        feaFondos.setGeometry(polygon3D);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feaBordes);
+        completeAttributes(feaFondos);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            //features.add(feaBordes);
+            features.add(feaFondos);
+        } else {
+            //blk.add(feaBordes);
+            blk.add(feaFondos);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createArc(org.cresques.io.DxfGroupVector)
+     */
+    public void createArc(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double r = 0.0;
+        double empieza = 0.0;
+        double acaba = 0.0;
+        DxfGroup g = null;
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+        LineString3D lineString3D = new LineString3D();
+        Feature feature = new Feature();
+
+        feature.setProp("dxfEntity", "Arc");
+
+        if (grp.hasCode(8)) {
+            feature.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feature.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "true");
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        if (grp.hasCode(30))
+        {
+        	z = grp.getDataAsDouble(30);
+        }
+
+        /*if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+            Double doub = new Double(z);
+            String string = doub.toString();
+            feature.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("elevation", doub.toString());
+        }*/
+        if (grp.hasCode(40)) {
+            r = grp.getDataAsDouble(40);
+        }
+
+        if (grp.hasCode(50)) {
+            empieza = grp.getDataAsDouble(50);
+        }
+
+        if (grp.hasCode(51)) {
+            acaba = grp.getDataAsDouble(51);
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+
+        Double doub = new Double(z);
+        feature.setProp("elevation", doub.toString());
+
+        if (z != 0.0) {
+            dxf3DFile = true;
+        }
+
+        Point2D c = proj.createPoint(x, y);
+        Point3D center = new Point3D(c.getX(), c.getY(), z);
+
+        int iempieza = (int) empieza;
+        int iacaba = (int) acaba;
+
+        double angulo = 0;
+        Point3D[] pts = null;
+
+        if (empieza <= acaba) {
+            pts = new Point3D[(iacaba - iempieza) + 2];
+            angulo = empieza;
+            pts[0] = new Point3D(center.getX() +
+                                 (r * Math.cos((angulo * Math.PI) / 180.0)),
+                                 center.getY() +
+                                 (r * Math.sin((angulo * Math.PI) / 180.0)),
+                                 center.getZ());
+
+            for (int i = 1; i <= ((iacaba - iempieza) + 1); i++) {
+                angulo = (iempieza + i);
+                pts[i] = new Point3D(center.getX() +
+                                     (r * Math.cos((angulo * Math.PI) / 180.0)),
+                                     center.getY() +
+                                     (r * Math.sin((angulo * Math.PI) / 180.0)),
+                                     center.getZ());
+            }
+
+            angulo = acaba;
+            pts[(iacaba - iempieza) + 1] = new Point3D(center.getX() +
+                                                       (r * Math.cos((angulo * Math.PI) / 180.0)),
+                                                       center.getY() +
+                                                       (r * Math.sin((angulo * Math.PI) / 180.0)),
+                                                       center.getZ());
+        } else {
+            pts = new Point3D[(360 - iempieza) + iacaba + 2];
+            angulo = empieza;
+
+            pts[0] = new Point3D(center.getX() +
+                                 (r * Math.cos((angulo * Math.PI) / 180.0)),
+                                 center.getY() +
+                                 (r * Math.sin((angulo * Math.PI) / 180.0)),
+                                 center.getZ());
+
+            for (int i = 1; i <= (360 - iempieza); i++) {
+                angulo = (iempieza + i);
+                pts[i] = new Point3D(center.getX() +
+                                     (r * Math.cos((angulo * Math.PI) / 180.0)),
+                                     center.getY() +
+                                     (r * Math.sin((angulo * Math.PI) / 180.0)),
+                                     center.getZ());
+            }
+
+            for (int i = (360 - iempieza) + 1;
+                     i <= ((360 - iempieza) + iacaba); i++) {
+                angulo = (i - (360 - iempieza));
+                pts[i] = new Point3D(center.getX() +
+                                     (r * Math.cos((angulo * Math.PI) / 180.0)),
+                                     center.getY() +
+                                     (r * Math.sin((angulo * Math.PI) / 180.0)),
+                                     center.getZ());
+            }
+
+            angulo = acaba;
+            pts[(360 - iempieza) + iacaba + 1] = new Point3D(center.getX() +
+                                                             (r * Math.cos((angulo * Math.PI) / 180.0)),
+                                                             center.getY() +
+                                                             (r * Math.sin((angulo * Math.PI) / 180.0)),
+                                                             center.getZ());
+        }
+
+        for (int i = 0; i < pts.length; i++) {
+            lineString3D.add(pts[i]);
+        }
+
+        feature.setGeometry(lineString3D);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feature);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            features.add(feature);
+        } else {
+            blk.add(feature);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createInsert(org.cresques.io.DxfGroupVector)
+     */
+    public void createInsert(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        DxfGroup g = null;
+        Point3D pt = new Point3D(0.0, 0.0, 0.0);
+        Point3D scaleFactor = new Point3D(1.0, 1.0, 1.0);
+        double rotAngle = 0.0;
+        String blockName = "";
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        InsPoint3D insert = new InsPoint3D();
+        Feature feature = new Feature();
+        org.gvsig.dxf.px.gml.Point3D secondGeom = new org.gvsig.dxf.px.gml.Point3D();
+        Feature secondFeat = new Feature();
+        int attributesFollowFlag = 0;
+
+        feature.setProp("dxfEntity", "Insert");
+        secondFeat.setProp("dxfEntity", "Insert");
+
+        if (grp.hasCode(2)) {
+            blockName = grp.getDataAsString(2);
+
+            //feature.setProp("blockName", blockName);
+            insert.setBlockName(blockName);
+        }
+
+        if (grp.hasCode(8)) {
+            feature.setProp("layer", grp.getDataAsString(8));
+            secondFeat.setProp("layer", grp.getDataAsString(8));
+        }
+
+        Double doub = new Double(0.0);
+        secondFeat.setProp("thickness", doub.toString());
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feature.setProp("color", string);
+            secondFeat.setProp("color", string);
+            feature.setProp("colorByLayer", "false");
+            secondFeat.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feature.setProp("color", string);
+            secondFeat.setProp("color", string);
+            feature.setProp("colorByLayer", "true");
+            secondFeat.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(66)) {
+            attributesFollowFlag = grp.getDataAsInt(66);
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        z = grp.getDataAsDouble(30);
+
+        /*if (grp.hasCode(30)) {
+            z = grp.getDataAsDouble(30);
+            Double doubz = new Double(z);
+            String string = doubz.toString();
+            feature.setProp("elevation", string);
+            secondFeat.setProp("elevation", string);
+        } else {
+            Double elev = new Double(z);
+            //feature.setProp("elevation", doub.toString());
+            feature.setProp("elevation", elev.toString());
+            secondFeat.setProp("elevation", elev.toString());
+        }*/
+        if (grp.hasCode(41)) {
+            scaleFactor.setLocation(grp.getDataAsDouble(41), scaleFactor.getY());
+            insert.setScaleFactor(scaleFactor);
+        } else {
+            insert.setScaleFactor(scaleFactor);
+        }
+
+        if (grp.hasCode(42)) {
+            scaleFactor.setLocation(scaleFactor.getX(), grp.getDataAsDouble(42));
+            insert.setScaleFactor(scaleFactor);
+        } else {
+            insert.setScaleFactor(scaleFactor);
+        }
+
+        if (grp.hasCode(43)) {
+            scaleFactor = new Point3D(scaleFactor.getX(), scaleFactor.getY(),
+                                      grp.getDataAsDouble(43));
+            insert.setScaleFactor(scaleFactor);
+        } else {
+            insert.setScaleFactor(scaleFactor);
+        }
+
+        if (grp.hasCode(50)) {
+            rotAngle = grp.getDataAsDouble(50);
+            insert.setRotAngle(rotAngle);
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+
+        Double doubz = new Double(z);
+        feature.setProp("elevation", doubz.toString());
+        secondFeat.setProp("elevation", doubz.toString());
+
+        if (z != 0.0) {
+            dxf3DFile = true;
+        }
+
+        insert.setBlkList(blkList);
+
+        insert.encuentraBloque(blockName);
+
+        insert.add(new Point3D(x, y, z));
+        secondGeom.add(new Point3D(x, y, z));
+
+        feature.setGeometry(insert);
+        secondFeat.setGeometry(secondGeom);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feature);
+        completeAttributes(secondFeat);
+
+        /*for (int i=0;i<attributes.size();i++) {
+            String[] att = new String[2];
+            att = (String[])attributes.get(i);
+            secondFeat.setProp(att[0],att[1]);
+        }*/
+        if ((insert.getBlockFound() == true) && (attributesFollowFlag != 1)) {
+            gestionaInsert(feature);
+        }
+
+        //if (addingToBlock == false) {
+        //features.add(secondFeat);
+        //}
+        //if (addingToBlock == true/* && insert.getBlockFound() == true*/) {
+        //blk.add(feature);
+        //}
+        // 041129: A�adido para implementar los ATTRIBS.
+        if (attributesFollowFlag == 1) {
+            isDoubleFeatured = true;
+            lastFeaBordes = feature;
+            lastFeaFondos = secondFeat;
+        } else {
+            if (addingToBlock == false) {
+                features.add(secondFeat);
+            }
+
+            if (addingToBlock == true /* && insert.getBlockFound() == true*/) {
+                blk.add(feature);
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createSolid(org.cresques.io.DxfGroupVector)
+     */
+    public void createSolid(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z1 = 0.0;
+        double z2 = 0.0;
+        double z3 = 0.0;
+        double z4 = 0.0;
+        DxfGroup g = null;
+
+        //Point2D pt1 = null, pt2 = null, pt3 = null, pt4 = null;
+        Point3D[] pts = new Point3D[4];
+
+        //DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        LineString3D lineString3D = new LineString3D();
+        Polygon3D polygon3D = new Polygon3D();
+        Feature feaBordes = new Feature();
+        Feature feaFondos = new Feature();
+
+        //double elev = 0;
+        feaBordes.setProp("dxfEntity", "Solid");
+        feaFondos.setProp("dxfEntity", "Solid");
+
+        if (grp.hasCode(8)) {
+            feaBordes.setProp("layer", grp.getDataAsString(8));
+        }
+
+        feaFondos.setProp("layer", grp.getDataAsString(8));
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        z1 = grp.getDataAsDouble(30);
+
+        /*if (grp.hasCode(30)) {
+            z1 = grp.getDataAsDouble(30);
+        } else {
+            Double doub = new Double(0.0);
+            feaBordes.setProp("elevation", doub.toString());
+            feaFondos.setProp("elevation", doub.toString());
+        }*/
+        Point2D pto = proj.createPoint(x, y);
+        Point3D pto3D = new Point3D(pto.getX(), pto.getY(), z1);
+        pts[0] = pto3D;
+        x = grp.getDataAsDouble(11);
+        y = grp.getDataAsDouble(21);
+        z2 = grp.getDataAsDouble(31);
+        pto = proj.createPoint(x, y);
+        pto3D = new Point3D(pto.getX(), pto.getY(), z2);
+        pts[1] = pto3D;
+        x = grp.getDataAsDouble(12);
+        y = grp.getDataAsDouble(22);
+        z3 = grp.getDataAsDouble(32);
+        pto = proj.createPoint(x, y);
+        pto3D = new Point3D(pto.getX(), pto.getY(), z3);
+        pts[2] = pto3D;
+
+        if (grp.hasCode(13)) {
+            x = grp.getDataAsDouble(13);
+        }
+
+        if (grp.hasCode(23)) {
+            y = grp.getDataAsDouble(23);
+        }
+
+        if (grp.hasCode(33)) {
+            z4 = grp.getDataAsDouble(33);
+        }
+
+        pto = proj.createPoint(x, y);
+        pto3D = new Point3D(pto.getX(), pto.getY(), z4);
+        pts[3] = pto3D;
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feaBordes.setProp("thickness", string);
+            feaFondos.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feaBordes.setProp("thickness", doub.toString());
+            feaFondos.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "false");
+            feaFondos.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "true");
+            feaFondos.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in1 = new Point3D(pts[0].getX(), pts[0].getY(), z1);
+        Point3D point_in2 = new Point3D(pts[1].getX(), pts[1].getY(), z2);
+        Point3D point_in3 = new Point3D(pts[2].getX(), pts[2].getY(), z3);
+        Point3D point_in4 = new Point3D(pts[3].getX(), pts[3].getY(), z4);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out1 = DxfCalXtru.CalculateXtru(point_in1, xtru);
+        Point3D point_out2 = DxfCalXtru.CalculateXtru(point_in2, xtru);
+        Point3D point_out3 = DxfCalXtru.CalculateXtru(point_in3, xtru);
+        Point3D point_out4 = DxfCalXtru.CalculateXtru(point_in4, xtru);
+        pts[0] = new Point3D(point_out1);
+        pts[1] = new Point3D(point_out2);
+        pts[2] = new Point3D(point_out3);
+        pts[3] = new Point3D(point_out4);
+
+        if ((pts[0].getZ() != 0.0) || (pts[1].getZ() != 0.0) ||
+                (pts[2].getZ() != 0.0) || (pts[3].getZ() != 0.0)) {
+            dxf3DFile = true;
+        }
+
+        Point3D aux = new Point3D(pts[2]);
+        pts[2] = new Point3D(pts[3]);
+        pts[3] = aux;
+
+        Double doub = new Double(0.0);
+        if ((pts[0].getZ() == pts[1].getZ()) &&
+                (pts[1].getZ() == pts[2].getZ()) &&
+                (pts[2].getZ() == pts[3].getZ())) {
+            doub = new Double(pts[0].getZ());
+        }
+        String string = doub.toString();
+        feaBordes.setProp("elevation", string);
+        feaFondos.setProp("elevation", string);
+
+        for (int i = 0; i < pts.length; i++) {
+            lineString3D.add(pts[i]);
+            polygon3D.add(pts[i]);
+        }
+
+        // Para cerrarlos.
+        lineString3D.add(pts[0]);
+        polygon3D.add(pts[0]);
+
+        feaBordes.setGeometry(lineString3D);
+        feaFondos.setGeometry(polygon3D);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feaBordes);
+        completeAttributes(feaFondos);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            //features.add(feaBordes);
+            features.add(feaFondos);
+        } else {
+            //blk.add(feaBordes);
+            blk.add(feaFondos);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createSpline(org.cresques.io.DxfGroupVector)
+     */
+    public void createSpline(DxfGroupVector grp) throws Exception {
+        double x = 0.0; //elev = 0.0;
+        double y = 0.0; //elev = 0.0;
+        double z = 0.0; //elev = 0.0;
+
+        //double elev = 0.0;
+        DxfGroup g = null;
+        LineString3D lineString3D = new LineString3D();
+        Polygon3D polygon3D = new Polygon3D();
+
+        //Geometry geometria;
+        //Feature feature= new Feature();
+        Feature feaBordes = new Feature();
+        Feature feaFondos = new Feature();
+        int flags = 0;
+
+        //feature.setProp("dxfEntity", "LwPolyline");
+        feaBordes.setProp("dxfEntity", "Spline");
+        feaFondos.setProp("dxfEntity", "Spline");
+
+        if (grp.hasCode(8)) {
+            //feature.setProp("layer", grp.getDataAsString(8));
+            feaBordes.setProp("layer", grp.getDataAsString(8));
+            feaFondos.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+
+            //feature.setProp("thickness", string);
+            feaBordes.setProp("thickness", string);
+            feaFondos.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+
+            //feature.setProp("thickness", doub.toString());
+            feaBordes.setProp("thickness", doub.toString());
+            feaFondos.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+
+            //feature.setProp("color", string);
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "false");
+            feaFondos.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+
+            //feature.setProp("color", string);
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "true");
+            feaFondos.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(70)) {
+            flags = grp.getDataAsInt(70);
+        }
+
+        if ((flags & 0x01) == 0x01) {
+            //geometria = new Polygon();
+            feaBordes.setGeometry(lineString3D);
+            feaFondos.setGeometry(polygon3D);
+            isDoubleFeatured = true;
+        } else {
+            //geometria = new LineString();
+            feaBordes.setGeometry(lineString3D);
+            isDoubleFeatured = false;
+        }
+
+        int j = 0;
+        double firstX = 0.0;
+        double firstY = 0.0;
+        double firstZ = 0.0;
+
+        for (int i = 0; i < grp.size(); i++) {
+            g = (DxfGroup) grp.get(i);
+
+            if (g.getCode() == 10) {
+                j++;
+                x = ((Double) g.getData()).doubleValue();
+            } else if (g.getCode() == 20) {
+                y = ((Double) g.getData()).doubleValue();
+            } else if (g.getCode() == 30) {
+                z = ((Double) g.getData()).doubleValue();
+
+                Point2D p = proj.createPoint(x, y);
+                Point3D p3d = new Point3D(p.getX(), p.getY(), z);
+                lineString3D.add(p3d);
+
+                if (isDoubleFeatured) {
+                    polygon3D.add(p3d);
+                }
+
+                if (j == 1) {
+                    firstX = x;
+                    firstY = y;
+                    firstZ = z;
+                }
+
+                //elev = z;
+                x = 0.0;
+                y = 0.0;
+                z = 0.0;
+            }
+        }
+
+        //Double doub = new Double(elev);
+        //String string = doub.toString();
+        //feature.setProp("elevation", string);
+        //feaBordes.setProp("elevation", string);
+        //feaFondos.setProp("elevation", string);
+        if (isDoubleFeatured) {
+            Point2D p = proj.createPoint(firstX, firstY);
+            Point3D p3d = new Point3D(p.getX(), p.getY(), z);
+            lineString3D.add(p3d);
+            polygon3D.add(p3d);
+        }
+
+        double zprev = 0;
+        boolean constSplineElev = true;
+
+        for (int i = 0; i < lineString3D.pointNr(); i++) {
+            z = lineString3D.getPoint3D(i).getZ();
+
+            if (z != 0.0) {
+                dxf3DFile = true;
+            }
+
+            if ((i > 0) && (z != zprev)) {
+                constSplineElev = false;
+            }
+
+            zprev = z;
+        }
+
+        if (constSplineElev) {
+            Double doub = new Double(lineString3D.getPoint3D(0).getZ());
+            String string = doub.toString();
+            feaBordes.setProp("elevation", string);
+
+            if (isDoubleFeatured) {
+                feaFondos.setProp("elevation", string);
+            }
+        } else {
+            Double doub = new Double(0.0);
+            String string = doub.toString();
+            feaBordes.setProp("elevation", string);
+
+            if (isDoubleFeatured) {
+                feaFondos.setProp("elevation", string);
+            }
+        }
+
+        lastFeaBordes = feaBordes;
+
+        if (isDoubleFeatured) {
+            lastFeaFondos = feaFondos;
+        }
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feaBordes);
+        completeAttributes(feaFondos);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            if (isDoubleFeatured) {
+                features.add(feaFondos);
+            } else {
+                features.add(feaBordes);
+            }
+        } else {
+            if (isDoubleFeatured) {
+                blk.add(feaFondos);
+            } else {
+                blk.add(feaBordes);
+            }
+        }
+
+        isDoubleFeatured = false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createAttdef(org.cresques.io.DxfGroupVector)
+     */
+    public void createAttdef(DxfGroupVector grp) throws Exception {
+        DxfGroup g = null;
+
+        String defaultValue = "";
+        String tagString = "";
+        String textStyleName = "";
+        String[] attribute = new String[2];
+        boolean tagDefined = false;
+        boolean defValDefined = false;
+
+        if (grp.hasCode(1)) {
+            defaultValue = grp.getDataAsString(1);
+            attribute[1] = DxfConvTexts.ConvertText(defaultValue);
+            defValDefined = true;
+
+            if (tagDefined) {
+                attributes.add(attribute);
+            }
+        }
+
+        if (grp.hasCode(2)) {
+            tagString = grp.getDataAsString(2);
+            attribute[0] = DxfConvTexts.ConvertText(tagString);
+            tagDefined = true;
+
+            if (defValDefined) {
+                attributes.add(attribute);
+            }
+        }
+
+        if (grp.hasCode(7)) {
+            textStyleName = grp.getDataAsString(7);
+            textStyleName = DxfConvTexts.ConvertText(textStyleName);
+        }
+
+        setNewAttributes();
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createAttrib(org.cresques.io.DxfGroupVector)
+     */
+    public void createAttrib(DxfGroupVector grp) throws Exception {
+        double x = 0.0;
+        double y = 0.0;
+        double z = 0.0;
+        double h = 0.0;
+        double rot = 0.0;
+        DxfGroup g = null;
+
+        //Point2D pt1 = null, pt2 = null;
+        Point3D pt = null;
+        org.gvsig.dxf.px.gml.Point3D point = new org.gvsig.dxf.px.gml.Point3D();
+
+        point.setTextPoint(true);
+
+        String defaultValue = "";
+        String tagString = "";
+        String textStyleName = "";
+        String[] att = new String[2];
+        boolean tagDefined = false;
+        boolean defValDefined = false;
+        int attributeFlags = 0;
+
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+
+        Feature insFea = lastFeaBordes;
+        Feature ptFea = lastFeaFondos;
+
+        Feature feature = new Feature();
+
+        feature.setProp("dxfEntity", "Attrib"); // <-- Es un INSERT con attributes.
+
+        if (grp.hasCode(8)) {
+            feature.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feature.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feature.setProp("color", string);
+            feature.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(1)) {
+            String strAux1 = grp.getDataAsString(1);
+            strAux1 = DxfConvTexts.ConvertText(strAux1);
+            defaultValue = strAux1;
+            att[1] = DxfConvTexts.ConvertText(defaultValue);
+            defValDefined = true;
+
+            if (tagDefined) {
+                insFea.setProp(att[0], att[1]);
+                ptFea.setProp(att[0], att[1]);
+            }
+
+            feature.setProp("text", strAux1);
+        }
+
+        if (grp.hasCode(2)) {
+            String strAux2 = grp.getDataAsString(2);
+            strAux2 = DxfConvTexts.ConvertText(strAux2);
+            tagString = strAux2;
+            att[0] = DxfConvTexts.ConvertText(tagString);
+            tagDefined = true;
+
+            if (defValDefined) {
+                insFea.setProp(att[0], att[1]);
+                ptFea.setProp(att[0], att[1]);
+            }
+        }
+
+        if (grp.hasCode(7)) {
+            textStyleName = grp.getDataAsString(7);
+            textStyleName = DxfConvTexts.ConvertText(textStyleName);
+        }
+
+        if (grp.hasCode(70)) {
+            attributeFlags = grp.getDataAsInt(70);
+        }
+
+        if (grp.hasCode(40)) {
+            Double heightD = new Double(grp.getDataAsDouble(40));
+            String heightS = heightD.toString();
+            feature.setProp("textHeight", heightS);
+        } else {
+            feature.setProp("textHeight", "20.0");
+        }
+
+        if (grp.hasCode(50)) {
+            Double rotD = new Double(grp.getDataAsDouble(50));
+            String rotS = rotD.toString();
+            feature.setProp("textRotation", rotS);
+        } else {
+            feature.setProp("textRotation", "0.0");
+        }
+
+        x = grp.getDataAsDouble(10);
+        y = grp.getDataAsDouble(20);
+        z = grp.getDataAsDouble(30);
+
+        /*if (grp.hasCode(30)){
+            z = grp.getDataAsDouble(30);
+            Double doub = new Double(z);
+            String string = doub.toString();
+            feature.setProp("elevation", string);
+        } else {
+            Double doub = new Double(0.0);
+            feature.setProp("elevation", doub.toString());
+        }*/
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(x, y, z);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        x = point_out.getX();
+        y = point_out.getY();
+        z = point_out.getZ();
+
+        Double doub = new Double(z);
+        feature.setProp("elevation", doub.toString());
+
+        if (z != 0.0) {
+            dxf3DFile = true;
+        }
+
+        point.add(new Point3D(x, y, z));
+        feature.setGeometry(point);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feature);
+
+        if (attributeFlags == 8) {
+            if (addingToBlock == false) {
+                features.add(feature);
+            } else {
+                blk.add(feature);
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createBlock(org.cresques.io.DxfGroupVector)
+     */
+    public void createBlock(DxfGroupVector grp) throws Exception {
+        //DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        blk = new FeatureCollection(proj);
+
+        Point3D basePoint = new Point3D();
+        String blockName = "";
+
+        addingToBlock = true;
+
+        blkList.add(iterator, blk);
+
+        if (grp.hasCode(8)) {
+            blk.setProp("layer", grp.getDataAsString(8));
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            blk.setProp("color", string);
+            blk.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            blk.setProp("color", string);
+            blk.setProp("colorByLayer", "true");
+        }
+
+        if (grp.hasCode(1)) {
+            blockName = grp.getDataAsString(1);
+
+            //blk.setBlkName(blockName);
+            blk.setProp("blockName", blockName);
+        }
+
+        if (grp.hasCode(2)) {
+            blockName = grp.getDataAsString(2);
+
+            //blk.setBlkName(blockName);
+            blk.setProp("blockName", blockName);
+        }
+
+        if (grp.hasCode(10)) {
+            Double basePointX = new Double(grp.getDataAsDouble(10));
+            basePoint.X = grp.getDataAsDouble(10);
+            blk.setProp("basePointX", basePointX.toString());
+        }
+
+        if (grp.hasCode(20)) {
+            Double basePointY = new Double(grp.getDataAsDouble(20));
+            basePoint.Y = grp.getDataAsDouble(20);
+            blk.setProp("basePointY", basePointY.toString());
+        }
+
+        if (grp.hasCode(30)) {
+            Double basePointZ = new Double(grp.getDataAsDouble(30));
+            basePoint.Z = grp.getDataAsDouble(30);
+
+            if (basePoint.getZ() != 0.0) {
+                dxf3DFile = true;
+            }
+
+            blk.setProp("basePointZ", basePointZ.toString());
+        }
+
+        if (grp.hasCode(70)) {
+            //blk.flags = grp.getDataAsInt(70);
+            Integer blockFlags = new Integer(grp.getDataAsInt(70));
+            blk.setProp("blockFlags", blockFlags.toString());
+
+            // 041103: Hoy por hoy esto no lo utilizamos.
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#endBlk(org.cresques.io.DxfGroupVector)
+     */
+    public void endBlk(DxfGroupVector grp) throws Exception {
+        //DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+        setAddingToBlock(false);
+        iterator = iterator + 1;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#testBlocks()
+     */
+    public void testBlocks() {
+        Vector blkList = getBlkList();
+        FeatureCollection block = null;
+        Feature feature = null;
+        InsPoint3D insert = null;
+
+        for (int i = 0; i < blkList.size(); i++) {
+            block = (FeatureCollection) blkList.get(i);
+
+            int aux = block.size();
+
+            for (int j = 0; j < aux; j++) {
+                feature = (Feature) block.get(j);
+
+                //if (feature.getGeometry() instanceof InsPoint && feature.getProp("isAnInsert") == "true") {
+                if (feature.getGeometry() instanceof InsPoint3D) {
+                    insert = (InsPoint3D) feature.getGeometry();
+
+                    String nomBlock = insert.getBlockName();
+
+                    if (insert.getBlockFound() == false) {
+                        insert.encuentraBloque(nomBlock);
+
+                        //gestionaInsert(feature);
+                        //block.add(feature);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * M�todo que permite incluir en la lista general de objetos los objetos que se
+     * encuentran dentro del bloque referenciado por cada InsPoint3D.
+     * @param feature, el punto de inserci�n.
+     */
+    private void gestionaInsert(Feature feature) {
+        Feature feature2 = null;
+        org.gvsig.dxf.px.gml.Point3D point = null;
+        LineString3D lineString3D = null;
+        Polygon3D polygon3D = null;
+        InsPoint3D insert = new InsPoint3D();
+        insert = (InsPoint3D) feature.getGeometry();
+
+        double bPointX = 0.0;
+        double bPointY = 0.0;
+        double bPointZ = 0.0;
+
+        if (insert.getBlockFound() != true)
+        {
+        	DxfFile.logger.debug("BLOQUE NO ENCONTRADO !!!" + insert.getBlockName() + " " + insert.toString());
+        	return;
+        }
+
+        bPointX = Double.parseDouble(insert.getBlock().getProp("basePointX"));
+        bPointY = Double.parseDouble(insert.getBlock().getProp("basePointY"));
+        bPointZ = Double.parseDouble(insert.getBlock().getProp("basePointZ"));
+
+        //}
+        double sFactorX = insert.getScaleFactor().getX();
+        double sFactorY = insert.getScaleFactor().getY();
+        double sFactorZ = insert.getScaleFactor().getZ();
+        double rAngleGra = insert.getRotAngle();
+        double rAngleRad = (rAngleGra * Math.PI) / 180.0;
+        InsPoint3D insert2 = null;
+
+        for (int i = 0; i < insert.getBlock().size(); i++) {
+            feature2 = (Feature) insert.getBlock().get(i);
+
+            // Para que los elementos dentro del bloque tengan la misma layer
+            // y color que el insert al que corresponden.
+            // Segun la especificacion del formato DXF de Autodesk, la layer
+            // de las entities dentro de un bloque es la del bloque. La
+            // layer especifica para estos elementos en la defincion del
+            // bloque se ignora.
+            if ((feature2.getProp("colorByLayer").equals("false") ||
+                    feature2.getProp("layer").equals("0")) &&
+                    !feature.getProp("layer").equals("0")) {
+                feature2.setProp("color", feature.getProp("color"));
+            }
+
+            feature2.setProp("layer", feature.getProp("layer"));
+
+            Point3D point1 = new Point3D();
+            Point3D point11 = new Point3D();
+            Point3D pointAux = null;
+
+            if (feature2.getGeometry() instanceof InsPoint3D) {
+                insert2 = (InsPoint3D) feature2.getGeometry();
+                point1 = insert2.getPoint3D(0);
+
+                pointAux = new Point3D(point1.getX() - bPointX,
+                                       point1.getY() - bPointY,
+                                       point1.getZ() - bPointZ);
+
+                double laX = insert.getPoint3D(0).getX() +
+                             (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                double laY = insert.getPoint3D(0).getY() +
+                             (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                double laZ = insert.getPoint3D(0).getZ() +
+                             (pointAux.getZ() * sFactorZ);
+                point11 = new Point3D(laX, laY, laZ);
+
+                InsPoint3D insert3 = new InsPoint3D();
+
+                insert3.add(point11);
+
+                insert3.setBlkList(insert2.getBlkList());
+                insert3.setBlock(insert2.getBlock());
+                insert3.setBlockName(insert2.getBlockName());
+                insert3.setRotAngle(insert2.getRotAngle());
+
+                Point3D newScale = new Point3D(insert2.getScaleFactor().getX() * sFactorX,
+                                               insert2.getScaleFactor().getY() * sFactorY,
+                                               insert2.getScaleFactor().getZ() * sFactorZ);
+                insert3.setScaleFactor(newScale);
+
+                Feature feature3 = new Feature();
+                feature3.setProp("layer", feature2.getProp("layer"));
+                feature3.setProp("color", feature2.getProp("color"));
+                feature3.setProp("dxfEntity", feature2.getProp("dxfEntity"));
+                feature3.setProp("elevation", feature2.getProp("elevation"));
+
+                //041130
+                for (int j = 0; j < attributes.size(); j++) {
+                    String[] att = new String[2];
+                    att = (String[]) attributes.get(j);
+                    feature3.setProp(att[0], feature2.getProp(att[0]));
+                }
+
+                feature3.setGeometry(insert3);
+
+                gestionaInsert(feature3);
+            } else if (feature2.getGeometry() instanceof LineString3D) {
+                lineString3D = (LineString3D) feature2.getGeometry();
+
+                LineString3D lineString2 = new LineString3D();
+                Point3D[] points = new Point3D[lineString3D.pointNr()];
+                Point3D[] pointss = new Point3D[lineString3D.pointNr()];
+
+                for (int j = 0; j < lineString3D.pointNr(); j++) {
+                    points[j] = (Point3D) lineString3D.get(j);
+                    pointss[j] = new Point3D();
+
+                    pointAux = new Point3D(points[j].getX() - bPointX,
+                                           points[j].getY() - bPointY,
+                                           points[j].getZ() - bPointZ);
+
+                    double laX = insert.getPoint3D(0).getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = insert.getPoint3D(0).getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    double laZ = insert.getPoint3D(0).getZ() +
+                                 (pointAux.getZ() * sFactorZ);
+                    pointss[j] = new Point3D(laX, laY, laZ);
+                    lineString2.add(pointss[j]);
+                }
+
+                Feature feature3 = new Feature();
+                feature3.setProp("layer", feature2.getProp("layer"));
+                feature3.setProp("color", feature2.getProp("color"));
+                feature3.setProp("dxfEntity", feature2.getProp("dxfEntity"));
+
+                if (feature2.getProp("elevation") != null) {
+                    feature3.setProp("elevation", feature2.getProp("elevation"));
+                }
+
+                feature3.setProp("thickness", feature2.getProp("thickness"));
+
+                //041130
+                for (int j = 0; j < attributes.size(); j++) {
+                    String[] att = new String[2];
+                    att = (String[]) attributes.get(j);
+
+                    String str = att[0];
+                    feature3.setProp(str, feature2.getProp(str));
+                }
+
+                feature3.setGeometry(lineString2);
+
+                if (addingToBlock == false) {
+                    features.add(feature3);
+                }
+            } else if (feature2.getGeometry() instanceof Polygon3D) {
+                polygon3D = (Polygon3D) feature2.getGeometry();
+
+                Polygon3D polygon2 = new Polygon3D();
+                Point3D[] points = new Point3D[polygon3D.pointNr()];
+                Point3D[] pointss = new Point3D[polygon3D.pointNr()];
+
+                for (int j = 0; j < polygon3D.pointNr(); j++) {
+                    points[j] = (Point3D) polygon3D.get(j);
+                    pointss[j] = new Point3D();
+
+                    pointAux = new Point3D(points[j].getX() - bPointX,
+                                           points[j].getY() - bPointY,
+                                           points[j].getZ() - bPointZ);
+
+                    double laX = insert.getPoint3D(0).getX() +
+                                 (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                    double laY = insert.getPoint3D(0).getY() +
+                                 (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                                 ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                    double laZ = insert.getPoint3D(0).getZ() +
+                                 (pointAux.getZ() * sFactorZ);
+                    pointss[j] = new Point3D(laX, laY, laZ);
+                    polygon2.add(pointss[j]);
+                }
+
+                Feature feature3 = new Feature();
+                feature3.setProp("layer", feature2.getProp("layer"));
+                feature3.setProp("color", feature2.getProp("color"));
+                feature3.setProp("dxfEntity", feature2.getProp("dxfEntity"));
+
+                if (feature2.getProp("elevation") != null) {
+                    feature3.setProp("elevation", feature2.getProp("elevation"));
+                }
+
+                feature3.setProp("thickness", feature2.getProp("thickness"));
+
+                //041130
+                for (int j = 0; j < attributes.size(); j++) {
+                    String[] att = new String[2];
+                    att = (String[]) attributes.get(j);
+                    feature3.setProp(att[0], feature2.getProp(att[0]));
+                }
+
+                feature3.setGeometry(polygon2);
+
+                if (addingToBlock == false) {
+                    features.add(feature3);
+                }
+            } else if (feature2.getGeometry() instanceof org.gvsig.dxf.px.gml.Point3D) {
+                point = (org.gvsig.dxf.px.gml.Point3D) feature2.getGeometry();
+                point1 = point.getPoint3D(0);
+
+                pointAux = new Point3D(point1.getX() - bPointX,
+                                       point1.getY() - bPointY,
+                                       point1.getZ() - bPointZ);
+
+                double laX = insert.getPoint3D(0).getX() +
+                             (((pointAux.getX() * sFactorX) * Math.cos(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * (-1) * Math.sin(rAngleRad)));
+                double laY = insert.getPoint3D(0).getY() +
+                             (((pointAux.getX() * sFactorX) * Math.sin(rAngleRad)) +
+                             ((pointAux.getY() * sFactorY) * Math.cos(rAngleRad)));
+                double laZ = insert.getPoint3D(0).getZ() +
+                             (pointAux.getZ() * sFactorZ);
+                point11 = new Point3D(laX, laY, laZ);
+
+                org.gvsig.dxf.px.gml.Point3D pointt = new org.gvsig.dxf.px.gml.Point3D();
+                pointt.add(point11);
+
+                Feature feature3 = new Feature();
+                feature3.setProp("layer", feature2.getProp("layer"));
+                feature3.setProp("color", feature2.getProp("color"));
+                feature3.setProp("dxfEntity", feature2.getProp("dxfEntity"));
+                feature3.setProp("elevation", feature2.getProp("elevation"));
+                feature3.setProp("thickness", feature2.getProp("thickness"));
+
+                if (point.isTextPoint()) {
+                    feature3.setProp("text", feature2.getProp("text"));
+                    feature3.setProp("textHeight",
+                                     feature2.getProp("textHeight"));
+
+                    double auxR = Double.parseDouble(feature2.getProp("textRotation"));
+
+                    auxR = auxR + rAngleGra;
+                    feature3.setProp("textRotation", Double.toString(auxR));
+
+                    pointt.setTextPoint(true);
+                }
+
+                //041130
+                for (int j = 0; j < attributes.size(); j++) {
+                    String[] att = new String[2];
+                    att = (String[]) attributes.get(j);
+                    feature3.setProp(att[0], feature2.getProp(att[0]));
+                }
+
+                feature3.setGeometry(pointt);
+
+                //if (addingToBlock == false) {
+                features.add(feature3);
+
+                //}
+            } else {
+            	DxfFile.logger.debug("gestionaInsert(): Encontrado elemento desconocido");
+            }
+        }
+    }
+
+    /**
+     * Gestiona la caracter�stica faces en las polil�neas.
+     * @param face
+     */
+    private void addFace(int[] face) {
+        hasFaces = true;
+
+        if (faces == null) {
+            faces = new Vector();
+        }
+
+        faces.add(face);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#depureAttributes()
+     */
+    public void depureAttributes() {
+        //String[] att = null;
+
+        /*Set conjunto = new HashSet();
+        for (int i=0;i<attributes.size();i++) {
+            att = (String[])attributes.get(i);
+            String str = att[0];
+            conjunto.add(str);
+        }
+        //conjunto.addAll(attributes);
+        Vector atts = new Vector();
+        Vector atts2 = new Vector();
+        atts.addAll(conjunto);
+        for (int i=0;i<atts.size();i++) {
+            if (((String[])(attributes.get(i)))[0] == atts.get(i)) {
+                atts2.add(i, attributes.get(i));
+            }
+        }*/
+        String[] lastAtt = new String[2];
+
+        for (int i = 0; i < attributes.size(); i++) {
+            String[] att = (String[]) attributes.get(i);
+
+            for (int j = i + 1; j < attributes.size(); j++) {
+                String[] st = (String[]) attributes.get(j);
+                String st1 = att[0];
+                String st2 = st[0];
+
+                if (st2.equals(st1)) {
+                    attributes.remove(j);
+                }
+
+                if (i == (attributes.size() - 1)) {
+                    lastAtt = att;
+                }
+            }
+        }
+
+        for (int i = attributes.size() - 2; i >= 0; i--) {
+            String[] att = (String[]) attributes.get(i);
+            String st1 = lastAtt[0];
+            String st2 = att[0];
+
+            if (st2.equals(st1)) {
+                attributes.remove(i);
+            }
+        }
+
+        /*String[] attStrs = new String[attributes.size()];
+        Vector attribs = new Vector();
+        for (int i=0;i<attributes.size();i++) {
+            att = (String[])attributes.get(i);
+            attStrs[i] = att[0];
+        }
+        Set attStrsNR = new HashSet();
+        for (int i=0;i<attStrs.length;i++) {
+            attStrsNR.add(attStrs[i]);
+        }
+        String[] attStrsNRA = new String[attStrsNR.size()];
+        attStrsNR.toArray(attStrsNRA);
+        for (int i=0;i<attStrsNR.size();i++) {
+            att[0] = attStrsNRA[i];
+            attribs.add(att);
+        }
+        for (int i=0;i<attributes.size();i++) {
+            att = (String[])attributes.get(i);
+            String[] att2 = new String[2];
+            for (int j=0;j<attribs.size();j++) {
+                att2 = (String[])attribs.get(j);
+                if (att[0].equals(att2[0])) {
+                    att2[1] = att[1];
+                }
+                attribs.set(j, att2);
+            }
+        }
+        attributes = attribs;*/
+    }
+
+    /**
+     * Hace los setProp para los atributos extra de las entidades.
+     * @param feature
+     */
+    private void completeAttributes(Feature feature) {
+        // 041130: Rellena las props con los atributos.
+        for (int i = 0; i < attributes.size(); i++) {
+            String[] att = new String[2];
+            att = (String[]) attributes.get(i);
+            feature.setProp(att[0], att[1]);
+        }
+    }
+
+    /**
+     * Copia los atributos extra cargados en InsPoint y ya perfectamente definidos a los
+     * elementos del bloque al que referencia el punto de insercion.
+     * @param feaInsert, punto de inserci�n.
+     */
+    private void copyAttributes(Feature feaInsert) {
+        Feature feature = null;
+        InsPoint3D insert = new InsPoint3D();
+        insert = (InsPoint3D) feaInsert.getGeometry();
+
+        for (int i = 0; i < insert.getBlock().size(); i++) {
+            feature = (Feature) insert.getBlock().get(i);
+
+            for (int j = 0; j < attributes.size(); j++) {
+                String[] att = new String[2];
+                att = (String[]) attributes.get(j);
+                feature.setProp(att[0], feaInsert.getProp(att[0]));
+            }
+        }
+    }
+
+    /**
+     * Se ejecuta cuando se declaran nuevos atributos, es decir, tras cada ATTDEF.
+     * A�ade estos atributos a las features existentes.
+     */
+    private void setNewAttributes() {
+        for (int i = 0; i < features.size(); i++) {
+            Feature fea = new Feature();
+            fea = (Feature) features.get(i);
+            completeAttributes(fea);
+        }
+
+        for (int i = 0; i < blkList.size(); i++) {
+            FeatureCollection bloque = new FeatureCollection(proj);
+            bloque = (FeatureCollection) blkList.get(i);
+
+            for (int j = 0; j < bloque.size(); j++) {
+                Feature fea = new Feature();
+                fea = (Feature) bloque.get(j);
+                completeAttributes(fea);
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getAttributes()
+     */
+    public Vector getAttributes() {
+        return attributes;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getExtent()
+     */
+    public Extent getExtent() {
+        Feature feature = new Feature();
+        Extent extent = new Extent();
+        Iterator iter = features.iterator();
+
+        while (iter.hasNext()) {
+            feature = (Feature) iter.next();
+            extent.add(feature.getExtent());
+        }
+
+        return extent;
+    }
+
+    /**
+     * Establece la proyecci�n cartogr�fica en la que se van a crear las features.
+     * @param p, Proyecci�n cartogr�fica.
+     */
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#reProject(org.cresques.geo.ReProjection)
+     */
+    public void reProject(ICoordTrans rp) {
+        Feature feature = new Feature();
+        Extent extent = new Extent();
+        Iterator iter = features.iterator();
+
+        while (iter.hasNext()) {
+            feature = (Feature) iter.next();
+            ((Projected) feature).reProject(rp);
+            extent.add(feature.getExtent());
+        }
+
+        setProjection(rp.getPDest());
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.geo.Projected#getProjection()
+     */
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    /**
+     * Devuelve las features creadas.
+     * @return IObjList
+     */
+    public IObjList getObjects() {
+        return features;
+    }
+
+    /**
+     * Permite dibujar las features creadas.
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        Iterator iter = features.iterator();
+        Extent extent;
+
+        while (iter.hasNext()) {
+            Feature feature = new Feature();
+            feature = (Feature) iter.next();
+            extent = feature.getExtent();
+
+            if (vp.getExtent().minX() > extent.maxX()) {
+                continue;
+            }
+
+            if (vp.getExtent().minY() > extent.maxY()) {
+                continue;
+            }
+
+            if (vp.getExtent().maxX() < extent.minX()) {
+                continue;
+            }
+
+            if (vp.getExtent().maxY() < extent.minY()) {
+                continue;
+            }
+
+            //if (!feature.layer.frozen)
+            feature.draw(g, vp);
+        }
+    }
+
+    /**
+     * Invoca el m�todo de creaci�n de arcos para polil�neas con par�metros de
+     * curvatura.
+     * @param coord1, punto inicial del arco.
+     * @param coord2, punto final del arco.
+     * @param bulge, par�metro de curvatura.
+     * @return Vector con los puntos del arco.
+     */
+    public static Vector createArc(Point2D coord1, Point2D coord2, double bulge) {
+        return new DxfCalArcs(coord1, coord2, bulge).getPoints(1);
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getBlkList()
+     */
+    public Vector getBlkList() {
+        return blkList;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getDxfEntityList()
+     */
+    public DxfEntityList getDxfEntityList() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#getBlk()
+     */
+    public DxfBlock getBlk() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.cresques.io.DxfFile.EntityFactory#createEllipse(org.cresques.io.DxfGroupVector)
+     */
+    public void createEllipse(DxfGroupVector grp) throws Exception {
+        double cx = 0.0;
+        double cy = 0.0;
+        double cz = 0.0;
+
+        double x_end_point_major_axis = 0.0;
+        double y_end_point_major_axis = 0.0;
+        double z_end_point_major_axis = 0.0;
+
+        double extx = 0.0;
+        double exty = 0.0;
+        double extz = 1.0;
+        double ratio_minor_to_major_axis = 1.0;
+        double start = 0.0;
+        double end = 2* Math.PI;
+        LineString3D lineString3D = new LineString3D();
+        Polygon3D polygon3D = new Polygon3D();
+        Feature feaBordes = new Feature();
+        Feature feaFondos = new Feature();
+
+        feaBordes.setProp("dxfEntity", "Ellipse");
+        feaFondos.setProp("dxfEntity", "Ellipse");
+
+        if (grp.hasCode(8)) {
+            feaBordes.setProp("layer", grp.getDataAsString(8));
+        }
+
+        feaFondos.setProp("layer", grp.getDataAsString(8));
+
+        if (grp.hasCode(39)) {
+            Double doub = new Double(grp.getDataAsDouble(39));
+            String string = doub.toString();
+            feaBordes.setProp("thickness", string);
+            feaFondos.setProp("thickness", string);
+        } else {
+            Double doub = new Double(0.0);
+            feaBordes.setProp("thickness", doub.toString());
+            feaFondos.setProp("thickness", doub.toString());
+        }
+
+        if (grp.hasCode(62)) {
+            Integer integer = new Integer(grp.getDataAsInt(62));
+            String string = integer.toString();
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "false");
+            feaFondos.setProp("colorByLayer", "false");
+        } else {
+            DxfLayer layer = (DxfLayer) layers.getByName(grp.getDataAsString(8));
+            int clr = layer.colorNumber;
+            Integer integer = new Integer(clr);
+            String string = integer.toString();
+            feaBordes.setProp("color", string);
+            feaFondos.setProp("color", string);
+            feaBordes.setProp("colorByLayer", "true");
+            feaFondos.setProp("colorByLayer", "true");
+        }
+
+        // Center point
+        cx = grp.getDataAsDouble(10);
+        cy = grp.getDataAsDouble(20);
+        if (grp.hasCode(30)) {
+            cz = grp.getDataAsDouble(30);
+        }
+
+        // end_point_major_axis  (RELATIVE to the center)
+        x_end_point_major_axis = grp.getDataAsDouble(11);
+        y_end_point_major_axis = grp.getDataAsDouble(21);
+        if (grp.hasCode(31)) {
+            z_end_point_major_axis = grp.getDataAsDouble(31);
+        }
+
+        // ratio minor axis to major axis
+        if (grp.hasCode(40)) {
+        	ratio_minor_to_major_axis = grp.getDataAsDouble(40);
+        }
+        Point2D c = proj.createPoint(cx, cy);
+        // Point2D end_major = proj.createPoint(x_end_point_major_axis, y_end_point_major_axis);
+        // double r_major_axis_2D = c.distance(end_major)/2.0;
+        double r_major_axis_2D = Math.sqrt(x_end_point_major_axis*
+        		x_end_point_major_axis +
+        		y_end_point_major_axis * y_end_point_major_axis);
+        double r_minor_axis_2D = r_major_axis_2D * ratio_minor_to_major_axis;
+        double rotation_angle = Math.atan2(y_end_point_major_axis , x_end_point_major_axis);
+
+        if (grp.hasCode(210)) {
+            extx = grp.getDataAsDouble(210);
+        }
+
+        if (grp.hasCode(220)) {
+            exty = grp.getDataAsDouble(220);
+        }
+
+        if (grp.hasCode(230)) {
+            extz = grp.getDataAsDouble(230);
+        }
+
+        Point3D point_in = new Point3D(cx, cy, cz);
+        Point3D xtru = new Point3D(extx, exty, extz);
+        Point3D point_out = DxfCalXtru.CalculateXtru(point_in, xtru);
+        cx = point_out.getX();
+        cy = point_out.getY();
+        cz = point_out.getZ();
+
+        Double doub = new Double(cz);
+        feaBordes.setProp("elevation", doub.toString());
+        feaFondos.setProp("elevation", doub.toString());
+
+        if (cz != 0.0) {
+            dxf3DFile = true;
+        }
+
+
+        Point3D center = new Point3D(c.getX(), c.getY(), cz);
+        Point3D[] pts = new Point3D[360];
+        int angulo = 0;
+
+        for (angulo = 0; angulo < 360; angulo++) {
+            pts[angulo] = new Point3D(center.getX() +
+                                      r_major_axis_2D * Math.cos(Math.toRadians(angulo)),
+                                      center.getY() +
+                                      r_minor_axis_2D * Math.sin(Math.toRadians(angulo)),
+                                      center.getZ());
+
+            if (pts.length == 1) {
+                firstPt = pts[angulo];
+            }
+        }
+
+        AffineTransform at = new AffineTransform();
+        at.rotate(rotation_angle, cx, cy);
+        for (int i = 0; i < pts.length; i++) {
+        	Point2D pAux = pts[i];
+        	Point2D pRot = at.transform(pAux, null);
+            lineString3D.add(pRot);
+            polygon3D.add(pRot);
+        }
+
+        feaBordes.setGeometry(lineString3D);
+        feaFondos.setGeometry(polygon3D);
+
+        // 041130: Rellena las props con los atributos.
+        completeAttributes(feaBordes);
+        completeAttributes(feaFondos);
+
+        //features.add(feature);
+        if (addingToBlock == false) {
+            //features.add(feaBordes);
+            features.add(feaFondos);
+        } else {
+            //blk.add(feaBordes);
+            blk.add(feaFondos);
+        }
+
+    }
+
+    /**
+     * @return Returns the dxf3DFile.
+     */
+    public boolean isDxf3DFile() {
+        return dxf3DFile;
+    }
+
+    /**
+     * @param dxf3DFile The dxf3DFile to set.
+     */
+    public void setDxf3DFile(boolean dxf3DFile) {
+        this.dxf3DFile = dxf3DFile;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntity.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntity.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfEntity.java	(revision 1291)
@@ -0,0 +1,123 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+import org.cresques.geo.Projected;
+import org.gvsig.dxf.px.PxObj;
+
+
+/**
+ * Clase ancestro para las entidades de un fichero DXF.
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ */
+public abstract class DxfEntity extends PxObj implements Projected {
+    IProjection proj = null;
+    DxfLayer layer = null;
+
+    //int dxfColor = 256;
+    int dxfColor = 0;
+    int entitiesFollow = 0;
+    boolean space = false; // false --> model space, true paper space;
+    private int handle;
+    
+    /**
+     * Constructor gen�rico de entidades procedentes de un fichero DXF.
+     * @param proj, proyecci�n cartogr�fica en la que se encuentra la entidad.
+     * @param layer, capa del DXF en la que se encuentra la entidad.
+     */
+    public DxfEntity(IProjection proj, DxfLayer layer) {
+        setProjection(proj);
+        this.layer = layer;
+    }
+    
+    /**
+     * Establece la proyecci�n cartogr�fica en la que se encuentra la entidad.
+     * @param p, Proyecci�n cartogr�fica.
+     */
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+    
+    /**
+     * Devuelve la proyecci�n cartogr�fica en la que se encuentra la entidad.
+     * @return IProjection, proyecci�n cartogr�fica.
+     */
+    public IProjection getProjection() {
+        return proj;
+    }
+    
+    /**
+     * Permite reproyectar una entidad dado un conjunto de coordenadas de transformaci�n.
+     * @param rp, coordenadas de transformaci�n.
+     */
+    abstract public void reProject(ICoordTrans ct);
+    
+    /**
+     * Devuelve el nombre de la capa en la que se encuentra la entidad.
+     * @return String
+     */
+    public String getLayerName() {
+        return layer.getName();
+    }
+    
+    /**
+     * Devuelve el color de la entidad seg�n AutoCAD en forma de texto.
+     * @return String con el color de la entidad seg�n AutoCAD.
+     */
+    public String getColor() {
+        return "" + dxfColor;
+    }
+    
+    /**
+     * Permite la escritura de entidades en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * de la correspondiente entidad.
+     */
+    abstract public String toDxfString();
+
+    /**
+     * @return Returns the handle.
+     */
+    public int getHandle() {
+        return handle;
+    }
+
+    /**
+     * @param handle The handle to set.
+     */
+    public void setHandle(int handle) {
+        this.handle = handle;
+    }
+
+    /**
+     * Devuelve la capa en la que se encuentra la entidad.
+     * @return DxfLayer, la capa.
+     */
+    public DxfLayer getLayer() {
+        return layer;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLayer.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLayer.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/DxfLayer.java	(revision 1291)
@@ -0,0 +1,125 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px.dxf;
+
+import java.awt.Color;
+
+import org.gvsig.dxf.io.DxfFile;
+import org.gvsig.dxf.io.DxfGroup;
+
+
+/**
+ * La clase DxfLayer representa las capas de AutoCAD que aparecen en un fichero
+ * DXF. 
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ * @author jmorell
+ */
+public class DxfLayer extends DxfTableItem {
+    public int colorNumber = 9;
+    public String lType = "CONTINUOUS";
+    public boolean frozen = false;
+    public boolean isOff = false;
+
+    /**
+     * Constructor de DxfLayer.
+     * @param name, nombre de la capa.
+     */
+    public DxfLayer(String name) {
+        super(name, 0);
+        DxfFile.logger.debug("Dxf: Capa '" + name + "'.");
+        colorNumber = 255;
+        lType = "CONTINUOUS";
+    }
+
+    /**
+     * Sobrecarga del constructor de DxfLayer. Mediante este constructor tambi�n es
+     * posible especificar el color de la capa.
+     * @param name, nombre de la capa.
+     * @param clr, color de la capa.
+     */
+    public DxfLayer(String name, int clr) {
+        super(name, 0);
+        colorNumber = clr;
+        lType = "CONTINUOUS";
+        DxfFile.logger.debug("DxfLayer name=" + name + ", color=" + colorNumber);
+    }
+
+    /**
+     * Sobrecarga del constructor de DxfLayer. Mediante este constructor es
+     * posible especificar el nombre, el color y el tipo de l�nea asociado a la capa.
+     * @param name, nombre de la capa.
+     * @param clr, color de la capa.
+     * @param lType, tipo de l�nea asociado a la capa.
+     */
+    public DxfLayer(String name, int clr, String lType) {
+        super(name, 0);
+        colorNumber = clr;
+        this.lType = lType;
+    }
+
+    /**
+     * Devuelve el color asociado a la capa.
+     * @return Color
+     */
+    public Color getColor() {
+        return AcadColor.getColor(colorNumber);
+    }
+
+    /**
+     * Permite la escritura de capas en un fichero DXF2000.
+     * @return String, la cadena que se escribir� en el fichero con la informaci�n
+     * de la capa.
+     */
+    public String toDxfString() {
+        /*5
+        10
+        330
+        2
+        100
+        AcDbSymbolTableRecord
+        100
+        AcDbLayerTableRecord
+          2
+        0
+         70
+             0
+         62
+             7
+          6
+        Continuous
+        370
+            -3
+        390
+        F*/
+        StringBuffer sb = new StringBuffer(LAYER.toString() +
+                                           super.toDxfString());
+        sb.append(DxfGroup.toString(5, 10));
+        sb.append(DxfGroup.toString(100, "AcDbSymbolTableRecord"));
+        sb.append(DxfGroup.toString(100, "AcDbLayerTableRecord"));
+        sb.append(DxfGroup.toString(62, colorNumber));
+        sb.append(DxfGroup.toString(6, lType));
+
+        return sb.toString();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/package.html
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/package.html	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/dxf/package.html	(revision 1291)
@@ -0,0 +1,4 @@
+<html>
+	<body>Dxf: Clases para el acceso al formato dxf.
+</body>
+</html>
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/IPoint.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/IPoint.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/IPoint.java	(revision 1291)
@@ -0,0 +1,34 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+public interface IPoint {
+    public int x();
+
+    public int x(int x);
+
+    public int y();
+
+    public int y(int y);
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxObj.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxObj.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxObj.java	(revision 1291)
@@ -0,0 +1,52 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+import java.awt.Stroke;
+
+import org.cresques.px.Extent;
+
+
+public abstract class PxObj implements Drawable, Extent.Has {
+    public Stroke stroke = null;
+    /**
+     * Extent completo del raster. Este contiene las coordenadas reales tanto
+     * para un raster rotado como sin rotar. Este extent coincide con requestExtent
+     * cuando el raster no tiene rotaci�n. 
+     */
+    protected Extent extent = null;
+    /**
+     * Este es el extent sobre el que se ajusta una petici�n para que esta no exceda el 
+     * extent m�ximo del raster. Para un raster sin rotar ser� igual al extent
+     * pero para un raster rotado ser� igual al extent del raster como si no 
+     * tuviera rotaci�n. Esto ha de ser as� ya que la rotaci�n solo se hace sobre la
+     * vista y las peticiones han de hacerse en coordenadas de la imagen sin shearing
+     * aplicado.
+     */
+    protected Extent requestExtent = null;
+
+    public Extent getExtent() {
+        return extent;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxSize.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxSize.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/px/PxSize.java	(revision 1291)
@@ -0,0 +1,55 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.px;
+
+
+public class PxSize implements ISize {
+    private int pw = 0;
+    private int ph = 0;
+
+    public PxSize(int w, int h) {
+        this.pw = w;
+        this.ph = h;
+    }
+
+    public int w() {
+        return pw;
+    }
+
+    public int w(int w) {
+        pw = w;
+
+        return pw;
+    }
+
+    public int h() {
+        return ph;
+    }
+
+    public int h(int h) {
+        ph = h;
+
+        return ph;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/.cvsignore
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/.cvsignore	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/.cvsignore	(revision 1291)
@@ -0,0 +1,2 @@
+*.dfPackage
+*.wmf
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/Polygon2D.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/Polygon2D.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/Polygon2D.java	(revision 1291)
@@ -0,0 +1,106 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.geo;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.cresques.geo.ViewPortData;
+
+
+/**
+ * Clase que representa un pol�gono 2D
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class Polygon2D extends Vector {
+    GeneralPath gp = null;
+
+    public Polygon2D() {
+        super();
+        gp = null;
+    }
+
+    /**
+     * A�ade un vertice al po?�gono
+     * @param pt        punto 2D que representa el vertice a�adido
+     */
+    public void addPoint(Point2D pt) {
+        super.add(pt);
+    }
+
+    /**
+     * Dibuja el pol�gono
+     * @param g        Graphics sobre el que dibuja
+     * @param vp        ViewPort con la vista
+     */
+    public void draw(Graphics2D g, ViewPortData vp) {
+        newGP(vp);
+        g.draw(gp);
+
+        //g.draw(new Line2D.Double(pt,pt0));
+    }
+
+    /**
+     *
+     * @param g
+     * @param vp
+     */
+    public void fill(Graphics2D g, ViewPortData vp) {
+        newGP(vp);
+        g.fill(gp);
+    }
+
+    /**
+     *
+     * @param vp
+     */
+    private void newGP(ViewPortData vp) {
+        //if (gp != null) return;
+        gp = new GeneralPath();
+
+        Point2D pt0 = null;
+        Point2D pt = null;
+        Point2D pt1 = null;
+        Point2D.Double ptTmp = new Point2D.Double(0.0, 0.0);
+        Iterator iter = iterator();
+
+        while (iter.hasNext()) {
+            pt1 = (Point2D) iter.next();
+            vp.mat.transform(pt1, ptTmp);
+
+            if (pt0 == null) {
+                pt0 = ptTmp;
+                gp.moveTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            } else {
+                gp.lineTo((float) ptTmp.getX(), (float) ptTmp.getY());
+            }
+        }
+
+        gp.closePath();
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/cover/package.html
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/cover/package.html	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/cover/package.html	(revision 1291)
@@ -0,0 +1,4 @@
+<html>
+	<body>Clases relacionadas con coverturas espaciales.
+</body>
+</html>
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/cover/Hoja.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/cover/Hoja.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/cover/Hoja.java	(revision 1291)
@@ -0,0 +1,195 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.geo.cover;
+
+import org.cresques.cts.ICoordTrans;
+import org.cresques.cts.IProjection;
+
+import org.cresques.geo.Projected;
+import org.cresques.px.Extent;
+
+
+import java.awt.geom.Point2D;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import java.util.Vector;
+
+
+/**
+ * @author Luis W. Sevilla <sevilla_lui@gva.es>
+ */
+public class Hoja implements Projected {
+    IProjection proj;
+    String code = null;
+    String name = null;
+    Extent extent = null;
+    Point2D tl;
+    Point2D tr;
+    Point2D bl;
+    Point2D br;
+
+    public Hoja(IProjection proj, String code, String name) {
+        this.proj = proj;
+        this.code = code;
+        this.name = name;
+        tl = tr = bl = br = null;
+    }
+
+    public Hoja(String cod, Point2D p1, Point2D p2, Point2D p3, Point2D p4,
+                String name) {
+        code = cod;
+        tl = p1;
+        tr = p2;
+        bl = p3;
+        br = p4;
+
+        if (name != null) {
+            this.name = name;
+        }
+
+        setExtent();
+    }
+
+    public Hoja(String cod, Point2D[] pt, String name) {
+        code = cod;
+        tl = pt[0];
+        tr = pt[1];
+        br = pt[2];
+        bl = pt[3];
+
+        if (name != null) {
+            this.name = name;
+        }
+
+        setExtent();
+    }
+
+    public Hoja(String cod, Vector pt, String name) {
+        code = cod;
+        tl = (Point2D) pt.get(0);
+        tr = (Point2D) pt.get(1);
+        br = (Point2D) pt.get(2);
+        bl = (Point2D) pt.get(3);
+
+        if (name != null) {
+            this.name = name;
+        }
+
+        setExtent();
+    }
+
+    public Hoja(String cod, Hoja h, String name) {
+        code = cod;
+        tl = h.tl;
+        tr = h.tr;
+        br = h.br;
+        bl = h.bl;
+
+        if (name != null) {
+            this.name = name;
+        }
+
+        setExtent();
+    }
+
+    public IProjection getProjection() {
+        return proj;
+    }
+
+    public void setProjection(IProjection p) {
+        proj = p;
+    }
+
+    public void reProject(ICoordTrans rp) {
+        // TODO metodo reProject pendiente de implementar
+    }
+
+    public Point2D getTL() {
+        return tl;
+    }
+
+    public void setTL(Point2D pt) {
+        tl = pt;
+        extent.add(pt);
+    }
+
+    public Point2D getTR() {
+        return tr;
+    }
+
+    public void setTR(Point2D pt) {
+        tr = pt;
+        extent.add(pt);
+    }
+
+    public Point2D getBL() {
+        return bl;
+    }
+
+    public void setBL(Point2D pt) {
+        bl = pt;
+        extent.add(pt);
+    }
+
+    public Point2D getBR() {
+        return br;
+    }
+
+    public void setBR(Point2D pt) {
+        br = pt;
+        extent.add(pt);
+    }
+
+    public Extent getExtent() {
+        return extent;
+    }
+
+    private void setExtent() {
+        extent = new Extent(tl, br);
+        extent.add(tr);
+        extent.add(bl);
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Point2D[] getVertex() {
+        Point2D[] v = { tl, tr, br, bl };
+
+        return v;
+    }
+
+    public void toXml(OutputStream os) {
+    }
+
+    public void fromXml(InputStream is) {
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/Point3D.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/Point3D.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/src/main/java/org/gvsig/dxf/geo/Point3D.java	(revision 1291)
@@ -0,0 +1,84 @@
+/*
+ * Cresques Mapping Suite. Graphic Library for constructing mapping applications.
+ *
+ * Copyright (C) 2004-5.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
+ *
+ * For more information, contact:
+ *
+ * cresques@gmail.com
+ */
+package org.gvsig.dxf.geo;
+
+import java.awt.geom.Point2D;
+
+
+/**
+ * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
+ */
+public class Point3D extends Point2D {
+    public double X;
+    public double Y;
+    public double Z;
+
+    public Point3D() {
+        setLocation(0.0, 0.0);
+    }
+
+    public Point3D(double x, double y) {
+        setLocation(x, y);
+    }
+
+    public Point3D(double x, double y, double z) {
+        setLocation(x, y, z);
+    }
+
+    public Point3D(Point2D pt) {
+        setLocation(pt.getX(), pt.getY());
+    }
+
+    public Point3D(Point3D pt) {
+        setLocation(pt.getX(), pt.getY(), pt.getZ());
+    }
+
+    public double getX() {
+        return X;
+    }
+
+    public double getY() {
+        return Y;
+    }
+
+    public double getZ() {
+        return Z;
+    }
+
+    public void setLocation(double x, double y) {
+        X = x;
+        Y = y;
+        Z = 0D;
+    }
+
+    public void setLocation(double x, double y, double z) {
+        X = x;
+        Y = y;
+        Z = z;
+    }
+
+    public String toString() {
+        return "(" + getX() + "," + getY() + ")";
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/pom.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/pom.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib/pom.xml	(revision 1291)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.dxf.lib</artifactId>
+  <packaging>jar</packaging>
+  <name>${project.artifactId}</name>
+  <description>Library for access DXF files</description>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.dxf</artifactId>
+      <version>2.0.266</version>
+  </parent>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.tools.lib</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.projection.api</artifactId>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+
+</project>

Property changes on: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.lib
___________________________________________________________________
Added: svn:ignore
   + target


Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/pom.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/pom.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/pom.xml	(revision 1291)
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.dxf</artifactId>
+  <version>2.0.266</version>
+  <packaging>pom</packaging>
+  <name>${project.artifactId}</name>
+  <description>DXF support fort DAL and gvSIG</description>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.desktop</artifactId>
+      <version>2.0.445</version>
+  </parent>
+
+  <url>https://devel.gvsig.org/redmine/projects/gvsig-dxf</url>
+  <scm>
+      <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-dxf/org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266</connection>
+      <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-dxf/org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266</developerConnection>
+      <url>https://devel.gvsig.org/redmine/projects/gvsig-dxf/repository/show/org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266</url>
+  </scm>
+    <repositories>
+      <repository>
+        <id>gvsig-public-http-repository</id>
+        <name>gvSIG maven public HTTP repository</name>
+        <url>http://devel.gvsig.org/m2repo/j2se</url>
+        <releases>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </releases>
+        <snapshots>
+          <enabled>true</enabled>
+          <updatePolicy>daily</updatePolicy>
+          <checksumPolicy>warn</checksumPolicy>
+        </snapshots>
+      </repository>
+    </repositories>
+  
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-release-plugin</artifactId>
+				<configuration>
+					<tagBase>https://devel.gvsig.org/svn/gvsig-dxf/org.gvsig.dxf/tags</tagBase>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+  
+  <dependencyManagement>
+      <dependencies>
+          <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.dxf.provider</artifactId>
+            <version>2.0.266</version>
+          </dependency>
+          <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.dxf.provider.legend</artifactId>
+            <version>2.0.266</version>
+          </dependency>
+          <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.dxf.lib</artifactId>
+            <version>2.0.266</version>
+          </dependency>
+          <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.dxf.exportto</artifactId>
+            <version>2.0.266</version>
+          </dependency>
+          <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.dxf.app.mainplugin</artifactId>
+            <version>2.0.266</version>
+          </dependency>
+      </dependencies>
+  </dependencyManagement>
+
+  <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>compile</scope>
+        </dependency>
+  </dependencies>
+
+  <modules>
+    <module>org.gvsig.dxf.app</module>
+    <module>org.gvsig.dxf.lib</module>
+    <module>org.gvsig.dxf.provider</module>
+    <module>org.gvsig.dxf.provider.legend</module>
+    <module>org.gvsig.dxf.exportto</module>
+  </modules>
+
+
+</project>
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/pom.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/pom.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/pom.xml	(revision 1291)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.dxf.provider.legend</artifactId>
+  <packaging>jar</packaging>
+  <name>${project.artifactId}</name>
+  <description>DAL provider for dxf files</description>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.dxf</artifactId>
+      <version>2.0.266</version>
+  </parent>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.dxf.provider</artifactId>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.tools.lib</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.projection.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.fmap.dal.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.dxf.provider</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.symbology.lib.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.timesupport.lib.api</artifactId>
+        <scope>compile</scope>
+    </dependency>  
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.utils</artifactId>
+      <scope>compile</scope>
+    </dependency>
+
+
+    <!-- TESTS -->
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.tools.lib</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.compat.se</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <!--
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.geometry.generalpath</artifactId>
+      <scope>test</scope>
+    </dependency>
+    -->
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.timesupport.lib.impl</artifactId>
+      <scope>test</scope>
+    </dependency>   
+
+
+  </dependencies>
+
+</project>
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLabeling.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLabeling.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLabeling.java	(revision 1291)
@@ -0,0 +1,83 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 IVER T.I. S.A.   {{Task}}
+ */
+package org.gvsig.fmap.dal.store.dxf.legend;
+
+import org.gvsig.fmap.dal.exception.OpenException;
+import org.gvsig.fmap.dal.store.dxf.DXFStoreProvider;
+import org.gvsig.fmap.dal.store.dxf.LegendBuilder;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynMethod;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.exception.DynMethodException;
+import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
+
+public class DXFGetLabeling implements DynMethod {
+
+    private static Integer code = null;
+
+    static void register(DynClass dxfLegendDynClass) {
+        if (code != null) {
+            return;
+        }
+        code = ToolsLocator.getDynObjectManager()
+                .registerDynMethod(dxfLegendDynClass, new DXFGetLabeling());
+
+    }
+
+    @Override
+    public int getCode() throws DynMethodNotSupportedException {
+        return code;
+    }
+
+    @Override
+    public String getDescription() {
+        return "DXF Labeling";
+    }
+
+    @Override
+    public String getName() {
+        return LegendBuilder.DYNMETHOD_GETLABELING_NAME;
+    }
+
+    @Override
+    public Object invoke(DynObject self, Object[] args)
+            throws DynMethodException {
+        try {
+            return ((DXFStoreProvider) self).getLabeling();
+        } catch (OpenException e) {
+            //FIXME
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public Object clone() throws CloneNotSupportedException {
+        return super.clone();
+    }
+
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLegend.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLegend.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLegend.java	(revision 1291)
@@ -0,0 +1,83 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 IVER T.I. S.A.   {{Task}}
+ */
+package org.gvsig.fmap.dal.store.dxf.legend;
+
+import org.gvsig.fmap.dal.exception.OpenException;
+import org.gvsig.fmap.dal.store.dxf.DXFStoreProvider;
+import org.gvsig.fmap.dal.store.dxf.LegendBuilder;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynMethod;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.exception.DynMethodException;
+import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
+
+public class DXFGetLegend implements DynMethod {
+
+    private static Integer code = null;
+
+    static void register(DynClass dxfLegendDynClass) {
+        if (code != null) {
+            return;
+        }
+        code = ToolsLocator.getDynObjectManager()
+                .registerDynMethod(dxfLegendDynClass, new DXFGetLegend());
+
+    }
+
+    @Override
+    public int getCode() throws DynMethodNotSupportedException {
+        return code;
+    }
+
+    @Override
+    public String getDescription() {
+        return "DXF Legend";
+    }
+
+    @Override
+    public String getName() {
+        return LegendBuilder.DYNMETHOD_GETLEGEND_NAME;
+    }
+
+    @Override
+    public Object invoke(DynObject self, Object[] args)
+            throws DynMethodException {
+        try {
+            return ((DXFStoreProvider) self).getLegend();
+        } catch (OpenException e) {
+            //FIXME
+            throw new RuntimeException(e);
+        }
+    }
+
+    @Override
+    public Object clone() throws CloneNotSupportedException {
+        return super.clone(); 
+    }
+
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFLegendLibrary.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFLegendLibrary.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFLegendLibrary.java	(revision 1291)
@@ -0,0 +1,68 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+* AUTHORS (In addition to CIT):
+* 2008 IVER T.I. S.A.   {{Task}}
+*/
+
+/**
+ *
+ */
+package org.gvsig.fmap.dal.store.dxf.legend;
+
+import org.gvsig.fmap.dal.DALLibrary;
+import org.gvsig.fmap.dal.store.dxf.DXFLibrary;
+import org.gvsig.fmap.dal.store.dxf.DXFStoreProvider;
+import org.gvsig.metadata.MetadataLibrary;
+import org.gvsig.metadata.MetadataLocator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ * @author jmvivo
+ *
+ */
+public class DXFLegendLibrary extends AbstractLibrary {
+
+    @Override
+    public void doRegistration() {
+        registerAsServiceOf(DALLibrary.class);
+        require(DXFLibrary.class);
+        require(MetadataLibrary.class);
+        require(DALLibrary.class);
+    }
+
+	@Override
+	protected void doInitialize() throws LibraryException {
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+		DynClass metadataDefinition = (DynClass) MetadataLocator.getMetadataManager()
+			.getDefinition(DXFStoreProvider.METADATA_DEFINITION_NAME);
+		DXFGetLegendBuilder.register(metadataDefinition);
+		DXFGetLegend.register(metadataDefinition);
+		DXFGetLabeling.register(metadataDefinition);
+	}
+}
\ No newline at end of file
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLegendBuilder.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLegendBuilder.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFGetLegendBuilder.java	(revision 1291)
@@ -0,0 +1,78 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 IVER T.I. S.A.   {{Task}}
+ */
+package org.gvsig.fmap.dal.store.dxf.legend;
+
+import org.gvsig.fmap.dal.store.dxf.LegendBuilder;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dynobject.DynClass;
+import org.gvsig.tools.dynobject.DynMethod;
+import org.gvsig.tools.dynobject.DynObject;
+import org.gvsig.tools.dynobject.exception.DynMethodException;
+import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
+
+public class DXFGetLegendBuilder implements DynMethod {
+
+    private static Integer code = null;
+
+    static void register(DynClass dxfLegendDynClass) {
+        if (code != null) {
+            return;
+        }
+        code = ToolsLocator.getDynObjectManager()
+                .registerDynMethod(
+                        dxfLegendDynClass, new DXFGetLegendBuilder());
+
+    }
+
+    @Override
+    public int getCode() throws DynMethodNotSupportedException {
+        return code;
+    }
+
+    @Override
+    public String getDescription() {
+        return "DXF LegendBuilder creator";
+    }
+
+    @Override
+    public String getName() {
+        return LegendBuilder.DYNMETHOD_BUILDER_NAME;
+    }
+
+    @Override
+    public Object invoke(DynObject self, Object[] args)
+            throws DynMethodException {
+        return new DXFLegendBuilder();
+    }
+
+    @Override
+    public Object clone() throws CloneNotSupportedException {
+        return super.clone();
+    }
+
+    
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFLegendBuilder.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFLegendBuilder.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dxf/legend/DXFLegendBuilder.java	(revision 1291)
@@ -0,0 +1,134 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+* AUTHORS (In addition to CIT):
+* 2008 IVER T.I. S.A.   {{Task}}
+*/
+
+package org.gvsig.fmap.dal.store.dxf.legend;
+
+import java.awt.Color;
+
+import org.gvsig.dxf.px.dxf.AcadColor;
+import org.gvsig.fmap.dal.DataTypes;
+import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
+import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider;
+import org.gvsig.fmap.dal.store.dxf.DXFStoreProvider;
+import org.gvsig.fmap.dal.store.dxf.LegendBuilder;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.mapcontext.MapContextLocator;
+import org.gvsig.fmap.mapcontext.MapContextManager;
+import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend;
+import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
+import org.gvsig.symbology.SymbologyLocator;
+import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol;
+import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol;
+
+public class DXFLegendBuilder implements LegendBuilder {
+
+	private MapContextManager mapContextManager = MapContextLocator
+			.getMapContextManager();
+
+	private IVectorialUniqueValueLegend defaultLegend = null;
+	private IAttrInTableLabelingStrategy labelingStragegy = null;
+
+	public void begin() {
+		// Nothing to do
+	}
+
+	public void end() {
+		defaultLegend.useDefaultSymbol(true);
+	}
+
+	public Object getLegend() {
+		return defaultLegend;
+	}
+
+	public LegendBuilder initialize(FeatureStoreProvider store) {
+		defaultLegend = (IVectorialUniqueValueLegend) mapContextManager
+				.createLegend(IVectorialUniqueValueLegend.LEGEND_NAME);
+		defaultLegend.setShapeType(Geometry.TYPES.GEOMETRY);
+		defaultLegend
+				.setClassifyingFieldNames(new String[] { DXFStoreProvider.NAME_FIELD_COLOR });
+		defaultLegend.setClassifyingFieldTypes(new int[] { DataTypes.INT });
+
+		ISymbol myDefaultSymbol =
+				mapContextManager.getSymbolManager().createSymbol(
+				Geometry.TYPES.GEOMETRY, Color.BLACK);
+
+		defaultLegend.setDefaultSymbol(myDefaultSymbol);
+		defaultLegend.useDefaultSymbol(false);
+
+		labelingStragegy = SymbologyLocator.getSymbologyManager().createAttrInTableLabelingStrategy();
+		labelingStragegy.setTextField(DXFStoreProvider.NAME_FIELD_TEXT);
+		labelingStragegy
+				.setRotationField(DXFStoreProvider.NAME_FIELD_ROTATIONTEXT);
+		labelingStragegy.setHeightField(DXFStoreProvider.NAME_FIELD_HEIGHTTEXT);
+		labelingStragegy.setUnit(1); // MapContext.NAMES[1] (meters)
+		return this;
+	}
+
+	public void process(FeatureProvider feature) {
+		Integer clave = (Integer) feature.get("Color");
+		if (clave == null) {
+			return;
+		}
+
+		if (defaultLegend.getSymbolByValue(clave) == null) {
+			ISymbol theSymbol;
+			Color color = null;
+			try {
+				color = AcadColor.getColor(clave.intValue());
+			} catch (ArrayIndexOutOfBoundsException e) {
+				color = AcadColor.getColor(255);
+			}
+			// jaume, moved to ISymbol
+			theSymbol =
+					mapContextManager.getSymbolManager().createSymbol(
+							Geometry.TYPES.GEOMETRY,
+					color);
+			theSymbol.setDescription(clave.toString());
+			// Asigna los colores de Autocad a los
+			// bordes de los pol�gonos y pone el relleno transparente.
+			if (theSymbol instanceof IFillSymbol) {
+				((IFillSymbol) theSymbol).getOutline().setLineColor(color);
+				Color fillColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), 0);
+				((IFillSymbol) theSymbol).setFillColor(fillColor);
+			}
+			// Asigna los colores de Autocad a las l�neas
+			if (theSymbol instanceof ILineSymbol) {
+				((ILineSymbol) theSymbol).setLineColor(color);
+			}
+			if (theSymbol != null) {
+				defaultLegend.addSymbol(clave, theSymbol);
+			}
+		}
+	}
+
+	public Object getLabeling() {
+		return labelingStragegy;
+	}
+
+
+}

Property changes on: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider.legend
___________________________________________________________________
Added: svn:ignore
   + target


Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 1291)
@@ -0,0 +1 @@
+org.gvsig.fmap.dal.store.dxf.DXFLibrary
\ No newline at end of file
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/org/gvsig/fmap/dal/store/dxf/DXFMetadata.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/org/gvsig/fmap/dal/store/dxf/DXFMetadata.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/org/gvsig/fmap/dal/store/dxf/DXFMetadata.xml	(revision 1291)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!--
+Definitions of metadata fields of a shp file.  
+ -->
+<definitions>
+  <version>1.0.0</version>
+  <classes>
+    
+    <class name="DXF" namespace="Metadata">
+      <extends>
+      	<class namespace="Metadata" name="SpatialProvider"/>
+      </extends>
+      <description>Metadata of a DXF store</description>
+      <fields>
+      </fields>
+    </class>
+
+  </classes>
+</definitions>  
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/org/gvsig/fmap/dal/store/dxf/DXFParameters.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/org/gvsig/fmap/dal/store/dxf/DXFParameters.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/resources/org/gvsig/fmap/dal/store/dxf/DXFParameters.xml	(revision 1291)
@@ -0,0 +1,20 @@
+<?xml version= "1.0 "?>
+<definitions>
+  <version>1.0.0</version>
+  <classes>
+    <class name="DXFStoreParameters">
+       <extends>
+      	<class namespace="dal" name="ProviderParameters"/>
+      </extends>
+      <description>Store the parameters need to open a dxf file</description>
+      <fields>
+        <field name="File" type="file" mandatory="true" group="Basic">
+          <description>dxf file</description>
+        </field>
+        <field name="CRS" type="crs" mandatory="true" group="Basic">
+          <description>The coordinate reference system used in this dxf file</description>
+        </field>
+      </fields>
+    </class>
+  </classes>
+</definitions>  
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFNewStoreParameters.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFNewStoreParameters.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFNewStoreParameters.java	(revision 1291)
@@ -0,0 +1,148 @@
+package org.gvsig.fmap.dal.store.dxf;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.cresques.cts.ICRSFactory;
+import org.cresques.cts.IProjection;
+
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.FileHelper;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters;
+import org.gvsig.fmap.dal.spi.AbstractDataStoreParameters;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import static org.gvsig.fmap.dal.store.dxf.DXFOpenStoreParameters.CRS_PARAMTER_NAME;
+import static org.gvsig.fmap.dal.store.dxf.DXFOpenStoreParameters.FILE_PARAMTER_NAME;
+import static org.gvsig.fmap.dal.store.dxf.DXFOpenStoreParameters.PARAMETERS_DEFINITION_NAME;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.tools.dynobject.DelegatedDynObject;
+
+public class DXFNewStoreParameters
+        extends AbstractDataStoreParameters implements
+        FilesystemStoreParameters,
+        NewFeatureStoreParameters {
+
+    private DelegatedDynObject parameters;
+
+    public DXFNewStoreParameters() {
+        this(PARAMETERS_DEFINITION_NAME);
+    }
+
+    protected DXFNewStoreParameters(String parametersDefinitionName) {
+        this(parametersDefinitionName, DXFStoreProvider.NAME);
+    }
+
+    public DXFNewStoreParameters(String parametersDefinitionName, String name) {
+        super();
+        this.parameters = (DelegatedDynObject) FileHelper.newParameters(parametersDefinitionName);
+        this.setDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME, name);
+    }
+
+    @Override
+    public String getDataStoreName() {
+        return (String) this.getDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME);
+    }
+
+    @Override
+    public String getDescription() {
+        return this.getDynClass().getDescription();
+    }
+
+    @Override
+    protected DelegatedDynObject getDelegatedDynObject() {
+        return parameters;
+    }
+
+    public void setCRS(String srs) {
+        setDynValue(CRS_PARAMTER_NAME, srs);
+    }
+
+    public void setCRS(IProjection srs) {
+        setDynValue(CRS_PARAMTER_NAME, srs);
+    }
+
+    public IProjection getCRS() {
+        return (IProjection) getDynValue(CRS_PARAMTER_NAME);
+    }
+
+    public String getFileName() {
+        if (this.getFile() == null) {
+            return null;
+        }
+        return this.getFile().getPath();
+    }
+
+    @Override
+    public boolean isValid() {
+        if (getCRS() == null) {
+            return false;
+        }
+        return getFileName() != null;
+    }
+
+    @Override
+    public File getFile() {
+        return (File) this.getDynValue(FILE_PARAMTER_NAME);
+    }
+
+    @Override
+    public void setFile(File file) {
+        this.setDynValue(FILE_PARAMTER_NAME, file);
+
+        if (getCRS() == null) {
+            String wktEsri = loadPrj(file);
+            if (wktEsri != null) {
+                IProjection proj = CRSFactory.getCRSFactory().get(ICRSFactory.FORMAT_WKT_ESRI, wktEsri);
+                setCRS(proj);
+            }
+        }
+
+    }
+
+    public void setFile(String file) {
+        this.setDynValue(FILE_PARAMTER_NAME, file);
+
+        File dxfFile = (File) this.getDynValue(FILE_PARAMTER_NAME);
+        if (getCRS() == null) {
+            String wktEsri = loadPrj(dxfFile);
+            if (wktEsri != null) {
+                IProjection proj = CRSFactory.getCRSFactory().get(ICRSFactory.FORMAT_WKT_ESRI, wktEsri);
+                setCRS(proj);
+            }
+        }
+
+    }
+
+    @Override
+    public EditableFeatureType getDefaultFeatureType() {
+        // FIXME: Esto no se si funciona.
+        DataManager manager = DALLocator.getDataManager();
+        EditableFeatureType featureType = manager.createFeatureType();
+        DXFStoreProvider.initializeFeatureType(featureType, null, Geometry.SUBTYPES.GEOM3D);
+        return featureType;
+    }
+
+    @Override
+    public void setDefaultFeatureType(FeatureType defaultFeatureType) {
+        throw new UnsupportedOperationException();
+    }
+
+    private String loadPrj(File dxfFile) {
+        File prjFile = new File(FilenameUtils.removeExtension(dxfFile.getAbsolutePath()) + ".prj");
+        if (prjFile.exists()) {
+            try {
+                return FileUtils.readFileToString(prjFile);
+            } catch (IOException e) {
+                return null;
+            }
+        }
+        return null;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFStoreProviderFactory.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFStoreProviderFactory.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFStoreProviderFactory.java	(revision 1291)
@@ -0,0 +1,61 @@
+package org.gvsig.fmap.dal.store.dxf;
+
+import java.util.List;
+
+import org.gvsig.fmap.dal.DataParameters;
+import org.gvsig.fmap.dal.DataStoreProvider;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.feature.FeatureStoreProviderFactory;
+import org.gvsig.fmap.dal.feature.spi.AbstractFeatureStoreProviderFactory;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.tools.dynobject.DynObject;
+
+public class DXFStoreProviderFactory extends AbstractFeatureStoreProviderFactory implements FeatureStoreProviderFactory{
+
+	protected DXFStoreProviderFactory(String name, String description) {
+		super(name, description);
+	}
+
+	public DataStoreProvider createProvider(DataParameters parameters,
+			DataStoreProviderServices providerServices)
+			throws InitializeException {
+		return new DXFStoreProvider((DXFOpenStoreParameters) parameters, providerServices);
+	}
+
+	public DynObject createParameters() {
+		return new DXFOpenStoreParameters();
+	}
+	
+	public int allowCreate() {
+		return YES;
+	}
+	
+	public int allowWrite() {
+		return YES;
+	}
+
+	public int allowRead() {
+		return YES;
+	}
+	
+	public int hasRasterSupport() {
+		return NO;
+	}
+	
+	public int hasTabularSupport() {
+		return YES;
+	}
+	
+	public int hasVectorialSupport() {
+		return YES;
+	}
+
+	public int allowMultipleGeometryTypes() {
+		return NO;
+	}
+	
+	public int allowEditableFeatureType() {
+		return NO;
+	}
+
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFOpenStoreParameters.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFOpenStoreParameters.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFOpenStoreParameters.java	(revision 1291)
@@ -0,0 +1,132 @@
+package org.gvsig.fmap.dal.store.dxf;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.cresques.cts.ICRSFactory;
+import org.cresques.cts.IProjection;
+
+import org.gvsig.fmap.crs.CRSFactory;
+import org.gvsig.fmap.dal.FileHelper;
+import org.gvsig.fmap.dal.feature.OpenFeatureStoreParameters;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters;
+import org.gvsig.fmap.dal.spi.AbstractDataStoreParameters;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.tools.dynobject.DelegatedDynObject;
+
+public class DXFOpenStoreParameters
+        extends AbstractDataStoreParameters
+        implements
+        OpenFeatureStoreParameters,
+        FilesystemStoreParameters {
+
+    public static final String PARAMETERS_DEFINITION_NAME = "DXFStoreParameters";
+
+    static final String FILE_PARAMTER_NAME = "File";
+    static final String CRS_PARAMTER_NAME = "CRS";
+
+    private DelegatedDynObject parameters;
+
+    public DXFOpenStoreParameters() {
+        this(PARAMETERS_DEFINITION_NAME);
+    }
+
+    protected DXFOpenStoreParameters(String parametersDefinitionName) {
+        this(parametersDefinitionName, DXFStoreProvider.NAME);
+    }
+
+    public DXFOpenStoreParameters(String parametersDefinitionName, String name) {
+        super();
+        this.parameters = (DelegatedDynObject) FileHelper.newParameters(parametersDefinitionName);
+        this.setDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME, name);
+    }
+
+    @Override
+    public String getDataStoreName() {
+        return (String) this.getDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME);
+    }
+
+    @Override
+    public String getDescription() {
+        return this.getDynClass().getDescription();
+    }
+
+    @Override
+    protected DelegatedDynObject getDelegatedDynObject() {
+        return parameters;
+    }
+
+    public void setCRS(String srs) {
+        setDynValue(CRS_PARAMTER_NAME, srs);
+    }
+
+    public void setCRS(IProjection srs) {
+        setDynValue(CRS_PARAMTER_NAME, srs);
+    }
+
+    public IProjection getCRS() {
+        return (IProjection) getDynValue(CRS_PARAMTER_NAME);
+    }
+
+    public String getFileName() {
+        if (this.getFile() == null) {
+            return null;
+        }
+        return this.getFile().getPath();
+    }
+
+    @Override
+    public boolean isValid() {
+        if (getCRS() == null) {
+            return false;
+        }
+        return getFileName() != null;
+    }
+
+    @Override
+    public File getFile() {
+        return (File) this.getDynValue(FILE_PARAMTER_NAME);
+    }
+
+    @Override
+    public void setFile(File file) {
+        this.setDynValue(FILE_PARAMTER_NAME, file);
+
+        if (getCRS() == null) {
+            String wktEsri = loadPrj(file);
+            if (wktEsri != null) {
+                IProjection proj = CRSFactory.getCRSFactory().get(ICRSFactory.FORMAT_WKT_ESRI, wktEsri);
+                setCRS(proj);
+            }
+        }
+
+    }
+
+    public void setFile(String file) {
+        this.setDynValue(FILE_PARAMTER_NAME, file);
+
+        File dxfFile = (File) this.getDynValue(FILE_PARAMTER_NAME);
+        if (getCRS() == null) {
+            String wktEsri = loadPrj(dxfFile);
+            if (wktEsri != null) {
+                IProjection proj = CRSFactory.getCRSFactory().get(ICRSFactory.FORMAT_WKT_ESRI, wktEsri);
+                setCRS(proj);
+            }
+        }
+
+    }
+
+    private String loadPrj(File dxfFile) {
+        File prjFile = new File(FilenameUtils.removeExtension(dxfFile.getAbsolutePath()) + ".prj");
+        if (prjFile.exists()) {
+            try {
+                return FileUtils.readFileToString(prjFile);
+            } catch (IOException e) {
+                return null;
+            }
+        }
+        return null;
+    }
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/LegendBuilder.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/LegendBuilder.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/LegendBuilder.java	(revision 1291)
@@ -0,0 +1,24 @@
+package org.gvsig.fmap.dal.store.dxf;
+
+import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
+import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider;
+
+
+public interface LegendBuilder {
+
+	final public static String DYNMETHOD_BUILDER_NAME = "getLegendBuilder";
+	final public static String DYNMETHOD_GETLEGEND_NAME = "getLegend";
+	final public static String DYNMETHOD_GETLABELING_NAME = "getLabeling";
+
+	public LegendBuilder initialize(FeatureStoreProvider store);
+
+	public void begin();
+
+	public void process(FeatureProvider feature);
+
+	public void end();
+
+	public Object getLegend();
+	public Object getLabeling();
+
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFLibrary.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFLibrary.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFLibrary.java	(revision 1291)
@@ -0,0 +1,95 @@
+/* gvSIG. Geographic Information System of the Valencian Government
+ *
+ * Copyright (C) 2007-2008 Infrastructures and Transports Department
+ * of the Valencian Government (CIT)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ */
+
+/*
+ * AUTHORS (In addition to CIT):
+ * 2008 IVER T.I. S.A.   {{Task}}
+ */
+
+package org.gvsig.fmap.dal.store.dxf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.gvsig.fmap.dal.DALFileLibrary;
+import org.gvsig.fmap.dal.DALFileLocator;
+import org.gvsig.fmap.dal.DALLibrary;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.FileHelper;
+import org.gvsig.fmap.dal.spi.DataManagerProviderServices;
+import org.gvsig.metadata.exceptions.MetadataException;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+public class DXFLibrary extends AbstractLibrary {
+
+    @Override
+    public void doRegistration() {
+        registerAsServiceOf(DALLibrary.class);
+        require(DALFileLibrary.class);
+    }
+
+	@Override
+	protected void doInitialize() throws LibraryException {
+	}
+
+	@Override
+	protected void doPostInitialize() throws LibraryException {
+		List<Throwable> exs = new ArrayList<Throwable>();
+
+		FileHelper.registerParametersDefinition(
+				DXFOpenStoreParameters.PARAMETERS_DEFINITION_NAME,
+				DXFOpenStoreParameters.class, "DXFParameters.xml");
+		try {
+			FileHelper.registerMetadataDefinition(
+					DXFStoreProvider.METADATA_DEFINITION_NAME,
+					DXFStoreProvider.class, "DXFMetadata.xml");
+		} catch (MetadataException e) {
+			exs.add(e);
+		}
+
+		DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator
+				.getDataManager();
+
+		try {
+			if (!dataman.getStoreProviders().contains(DXFStoreProvider.NAME)) {
+				dataman.registerStoreProviderFactory(new DXFStoreProviderFactory(DXFStoreProvider.NAME, DXFStoreProvider.DESCRIPTION));
+
+			}
+		} catch (RuntimeException e) {
+			exs.add(e);
+		}
+
+		try {
+			DALFileLocator.getFilesystemServerExplorerManager()
+					.registerProvider(DXFStoreProvider.NAME,
+							DXFStoreProvider.DESCRIPTION,
+							DXFFilesystemServerProvider.class);
+		} catch (RuntimeException e) {
+			exs.add(e);
+		}
+
+		if (exs.size() > 0) {
+			throw new LibraryException(this.getClass(), exs);
+		}
+	}
+}
\ No newline at end of file
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFFilesystemServerProvider.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFFilesystemServerProvider.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFFilesystemServerProvider.java	(revision 1291)
@@ -0,0 +1,202 @@
+package org.gvsig.fmap.dal.store.dxf;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.cresques.cts.IProjection;
+import org.gvsig.dxf.io.DxfFile;
+import org.gvsig.dxf.px.dxf.DxfEntityMaker;
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.fmap.dal.DataStoreParameters;
+import org.gvsig.fmap.dal.NewDataStoreParameters;
+import org.gvsig.fmap.dal.exception.CreateException;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.FileNotFoundException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.RemoveException;
+import org.gvsig.fmap.dal.resource.ResourceAction;
+import org.gvsig.fmap.dal.resource.file.FileResource;
+import org.gvsig.fmap.dal.resource.spi.ResourceConsumer;
+import org.gvsig.fmap.dal.resource.spi.ResourceProvider;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.AbsolutePathRequiredException;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.impl.AbstractFilesystemServerExplorerProvider;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProvider;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProviderServices;
+
+public class DXFFilesystemServerProvider extends AbstractFilesystemServerExplorerProvider
+        implements FilesystemServerExplorerProvider, ResourceConsumer {
+
+    private FilesystemServerExplorerProviderServices serverExplorer;
+
+    @Override
+    public String getDataStoreProviderName() {
+        return DXFStoreProvider.NAME;
+    }
+
+    @Override
+    public int getMode() {
+        return DataServerExplorer.MODE_FEATURE | DataServerExplorer.MODE_GEOMETRY;
+    }
+
+    @Override
+    public boolean accept(File pathname) {
+        return (pathname.getName().toLowerCase().endsWith(".dxf"));
+    }
+
+    @Override
+    public String getDescription() {
+        return DXFStoreProvider.DESCRIPTION;
+    }
+
+    @Override
+    public boolean canCreate() {
+        return true;
+    }
+
+    @Override
+    public boolean canCreate(NewDataStoreParameters parameters) {
+        if (!(parameters instanceof DXFOpenStoreParameters)) {
+            throw new IllegalArgumentException(); // FIXME ???
+        }
+        DXFOpenStoreParameters dxfParams = (DXFOpenStoreParameters) parameters;
+        // TODO comporbar si el ftype es correcto (para este formato es fijo)
+        File file = new File(dxfParams.getFileName());
+
+        if (dxfParams.getCRS() == null) {
+            return false;
+        }
+        // TODO comprobamos extension del fichero ??
+        if (file.exists()) {
+            return file.canWrite();
+        } else {
+            return file.getParentFile().canWrite();
+        }
+    }
+
+    @Override
+    public void create(NewDataStoreParameters parameters, boolean overwrite)
+            throws CreateException {
+
+        final IProjection projection = null;
+        DXFNewStoreParameters params = (DXFNewStoreParameters) parameters;
+
+        File file = params.getFile();
+        if (!file.isAbsolute()) {
+            throw new AbsolutePathRequiredException(file.getPath());
+        }
+
+        if (file.exists()) {
+            if (overwrite) {
+                if (!file.delete()) {
+                    throw new CreateException(this.getDataStoreProviderName(),
+                            new IOException(
+                                    "cannot delete file"));
+                }
+            } else {
+                throw new CreateException(this.getDataStoreProviderName(),
+                        new IOException(
+                                "file already exist"));
+            }
+        }
+
+		//		projection = CRSFactory.getCRS(params.getSRSID());
+        final FileResource resource;
+        try {
+            resource = (FileResource) this.serverExplorer
+                    .getServerExplorerProviderServices().createResource(
+                            FileResource.NAME,
+                            new Object[]{file.getAbsolutePath()});
+        } catch (InitializeException e1) {
+            throw new CreateException(params.getFileName(), e1);
+        }
+        resource.addConsumer(this);
+
+        try {
+            resource.execute(new ResourceAction() {
+                public Object run() throws Exception {
+                    Builder builder
+                            = new Builder().initialice(resource.getFileName(),
+                                    projection);
+                    resource.notifyOpen();
+                    builder.begin();
+                    builder.create();
+                    builder.end();
+                    resource.notifyClose();
+
+                    resource.setData(null); // FIXME: Seguro que hay que ponerlo
+                    // a null ??
+                    resource.notifyChanges();
+                    return null;
+                }
+            });
+        } catch (Exception e) {
+            throw new CreateException(params.getFileName(), e);
+        } finally {
+            resource.removeConsumer(this);
+        }
+    }
+
+    public class Builder {
+
+        private String fileName;
+        private IProjection projection;
+
+        public Builder initialice(String fileName, IProjection projection) {
+            this.fileName = fileName;
+            this.projection = projection;
+            return this;
+        }
+
+        public void begin() {
+
+        }
+
+        public void end() {
+
+        }
+
+        public void create() throws IOException {
+            DxfEntityMaker entityMaker = new DxfEntityMaker(projection);
+            DxfFile dxfFile = new DxfFile(null, fileName, entityMaker);
+            dxfFile.setCadFlag(true);
+            dxfFile.setDxf3DFlag(false);
+            dxfFile.save(fileName);
+        }
+    }
+
+    @Override
+    public NewDataStoreParameters getCreateParameters() throws DataException {
+        return new DXFNewStoreParameters();
+    }
+
+    @Override
+    public void initialize(
+            FilesystemServerExplorerProviderServices serverExplorer) {
+        this.serverExplorer = serverExplorer;
+    }
+
+    @Override
+    public void remove(DataStoreParameters parameters) throws RemoveException {
+        File file = new File(((DXFOpenStoreParameters) parameters).getFileName());
+        if (!file.exists()) {
+            throw new RemoveException(this.getDataStoreProviderName(),
+                    new FileNotFoundException(file));
+        }
+        if (!file.delete()) {
+            // FIXME throws ???
+        }
+
+    }
+
+    public boolean closeResourceRequested(ResourceProvider resource) {
+        // while it is using a resource anyone can't close it
+        return false;
+    }
+
+    @Override
+    public void resourceChanged(ResourceProvider resource) {
+        //Do nothing
+
+    }
+
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFStoreProvider.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFStoreProvider.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/main/java/org/gvsig/fmap/dal/store/dxf/DXFStoreProvider.java	(revision 1291)
@@ -0,0 +1,1933 @@
+package org.gvsig.fmap.dal.store.dxf;
+
+import java.awt.geom.PathIterator;
+import java.awt.geom.Point2D;
+import java.io.File;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.cresques.cts.IProjection;
+import org.gvsig.dxf.geo.Point3D;
+import org.gvsig.dxf.io.DxfFile;
+import org.gvsig.dxf.io.DxfGroup;
+import org.gvsig.dxf.io.DxfGroupVector;
+import org.gvsig.dxf.px.IObjList;
+import org.gvsig.dxf.px.dxf.DxfEntityMaker;
+import org.gvsig.dxf.px.dxf.DxfFeatureMaker;
+import org.gvsig.dxf.px.dxf.DxfHeaderManager;
+import org.gvsig.dxf.px.gml.Feature;
+import org.gvsig.dxf.px.gml.LineString;
+import org.gvsig.dxf.px.gml.LineString3D;
+import org.gvsig.dxf.px.gml.Point;
+import org.gvsig.dxf.px.gml.Polygon;
+import org.gvsig.dxf.px.gml.Polygon3D;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.fmap.dal.DataStore;
+import org.gvsig.fmap.dal.DataStoreNotification;
+import org.gvsig.fmap.dal.DataTypes;
+import org.gvsig.fmap.dal.FileHelper;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.exception.InitializeException;
+import org.gvsig.fmap.dal.exception.LoadException;
+import org.gvsig.fmap.dal.exception.OpenException;
+import org.gvsig.fmap.dal.exception.ReadException;
+import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
+import org.gvsig.fmap.dal.exception.WriteException;
+import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.EditableFeatureType;
+import org.gvsig.fmap.dal.feature.FeatureSet;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.dal.feature.exception.PerformEditingException;
+import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
+import org.gvsig.fmap.dal.feature.spi.FeatureStoreProviderServices;
+import org.gvsig.fmap.dal.feature.spi.memory.AbstractMemoryStoreProvider;
+import org.gvsig.fmap.dal.resource.ResourceAction;
+import org.gvsig.fmap.dal.resource.exception.AccessResourceException;
+import org.gvsig.fmap.dal.resource.exception.ResourceNotifyCloseException;
+import org.gvsig.fmap.dal.resource.exception.ResourceNotifyOpenException;
+import org.gvsig.fmap.dal.resource.file.FileResource;
+import org.gvsig.fmap.dal.resource.spi.ResourceConsumer;
+import org.gvsig.fmap.dal.resource.spi.ResourceProvider;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorer;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters;
+import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
+import org.gvsig.fmap.geom.Geometry;
+import org.gvsig.fmap.geom.Geometry.SUBTYPES;
+import org.gvsig.fmap.geom.Geometry.TYPES;
+import org.gvsig.fmap.geom.GeometryLocator;
+import org.gvsig.fmap.geom.GeometryManager;
+import org.gvsig.fmap.geom.aggregate.MultiLine;
+import org.gvsig.fmap.geom.exception.CreateEnvelopeException;
+import org.gvsig.fmap.geom.exception.CreateGeometryException;
+import org.gvsig.fmap.geom.operation.GeometryOperationContext;
+import org.gvsig.fmap.geom.operation.distance.PointDistance;
+import org.gvsig.fmap.geom.operation.utils.PointGetAngle;
+import org.gvsig.fmap.geom.primitive.Arc;
+import org.gvsig.fmap.geom.primitive.Circle;
+import org.gvsig.fmap.geom.primitive.Curve;
+import org.gvsig.fmap.geom.primitive.Ellipse;
+import org.gvsig.fmap.geom.primitive.Envelope;
+import org.gvsig.fmap.geom.primitive.Line;
+import org.gvsig.fmap.geom.primitive.OrientablePrimitive;
+import org.gvsig.fmap.geom.type.GeometryType;
+import org.gvsig.fmap.geom.type.GeometryTypeNotSupportedException;
+import org.gvsig.fmap.geom.type.GeometryTypeNotValidException;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.dispose.DisposableIterator;
+import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException;
+import org.gvsig.tools.dynobject.exception.DynMethodException;
+import org.gvsig.tools.exception.BaseException;
+import org.gvsig.tools.exception.NotYetImplemented;
+import org.gvsig.tools.locator.LocatorException;
+import org.gvsig.tools.logger.FilteredLogger;
+import org.gvsig.tools.persistence.PersistentState;
+import org.gvsig.tools.persistence.exception.PersistenceException;
+import org.gvsig.tools.task.SimpleTaskStatus;
+import org.gvsig.tools.task.TaskStatusManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * @author gvSIG team
+ *
+ */
+public class DXFStoreProvider extends AbstractMemoryStoreProvider implements
+ResourceConsumer {
+    private static final Logger logger = LoggerFactory.getLogger(DXFStoreProvider.class);
+
+    public static final String NAME = "DXF";
+    public static final String DESCRIPTION = "DXF file";
+
+    public static final String METADATA_DEFINITION_NAME = NAME;
+
+    public static final String NAME_FIELD_ID = "ID";
+    public static final String NAME_FIELD_GEOMETRY = "Geometry";
+    public static final String NAME_FIELD_ENTITY = "Entity";
+    public static final String NAME_FIELD_LAYER = "Layer";
+    public static final String NAME_FIELD_COLOR = "Color";
+    public static final String NAME_FIELD_ELEVATION = "Elevation";
+    public static final String NAME_FIELD_THICKNESS = "Thickness";
+    public static final String NAME_FIELD_TEXT = "Text";
+    public static final String NAME_FIELD_HEIGHTTEXT = "HeightText";
+    public static final String NAME_FIELD_ROTATIONTEXT = "Rotation";
+
+    private static final int ID_FIELD_ID = 0;
+    private static final int ID_FIELD_GEOMETRY = 1;
+    private static final int ID_FIELD_ENTITY = 2;
+    private static final int ID_FIELD_LAYER = 3;
+    private static final int ID_FIELD_COLOR = 4;
+    private static final int ID_FIELD_ELEVATION = 5;
+    private static final int ID_FIELD_THICKNESS = 6;
+    private static final int ID_FIELD_TEXT = 7;
+    private static final int ID_FIELD_HEIGHTTEXT = 8;
+    private static final int ID_FIELD_ROTATIONTEXT = 9;
+    
+    public static final Integer DEFAULT_VALUE_FIELD_COLOR = 0;
+    public static final Double DEFAULT_VALUE_FIELD_THICKNESS = 0d;
+    public static final String DEFAULT_VALUE_FIELD_LAYER = "default";
+
+    private IProjection projection;
+    private ResourceProvider resource;
+    private LegendBuilder legendBuilder;
+
+    private long counterNewsOIDs = 0;
+    private Envelope envelope;
+    private Writer writer;
+    protected GeometryManager geomManager = GeometryLocator.getGeometryManager();
+
+    private SimpleTaskStatus taskStatus;
+
+
+    /**
+     * @param parameters
+     * @param storeServices
+     * @throws InitializeException
+     */
+    public DXFStoreProvider(DXFOpenStoreParameters parameters,
+        DataStoreProviderServices storeServices) throws InitializeException {
+        super(
+            parameters,
+            storeServices,
+            FileHelper.newMetadataContainer(METADATA_DEFINITION_NAME)
+        );
+
+        TaskStatusManager manager = ToolsLocator.getTaskStatusManager();
+        this.taskStatus = manager.createDefaultSimpleTaskStatus("DXF");
+
+        counterNewsOIDs = 0;
+        //		projection = CRSFactory.getCRS(getParameters().getSRSID());
+
+        File file = getDXFParameters().getFile();
+        resource = this.createResource(
+            FileResource.NAME,
+            new Object[] { file.getAbsolutePath() }
+        );
+
+        resource.addConsumer(this);
+
+        this.projection = this.getDXFParameters().getCRS();
+
+
+        try {
+            legendBuilder = (LegendBuilder) this.invokeDynMethod(
+                LegendBuilder.DYNMETHOD_BUILDER_NAME, null);
+        } catch (DynMethodException e) {
+            legendBuilder = null;
+        } catch (Exception e) {
+            throw new InitializeException(e);
+        }
+
+        this.initializeFeatureTypes();
+    }
+
+    private DXFOpenStoreParameters getDXFParameters() {
+        return (DXFOpenStoreParameters) this.getParameters();
+    }
+
+    public String getProviderName() {
+        return NAME;
+    }
+
+    public boolean allowWrite() {
+        return true;
+    }
+
+    /**
+     * @return the legend
+     * @throws OpenException
+     */
+    public Object getLegend() throws OpenException {
+        this.open();
+        if (legendBuilder == null) {
+            return null;
+        }
+        return legendBuilder.getLegend();
+    }
+
+    /**
+     * @return the labeling strategy
+     * @throws OpenException
+     */
+    public Object getLabeling() throws OpenException {
+        this.open();
+        if (legendBuilder == null) {
+            return null;
+        }
+        return legendBuilder.getLabeling();
+    }
+
+    private class DXFData {
+        public List<FeatureProvider> data = null;
+        public FeatureType defaultFType = null;
+        public List<FeatureType> fTypes = null;
+        public Envelope envelope = null;
+        public IProjection projection;
+        public LegendBuilder legendBuilder;
+        public Envelope getEnvelopeCopy() throws CreateEnvelopeException {
+            if (envelope == null) {
+                return null;
+            }
+            Envelope newEnvelope;
+            if (envelope.getDimension() == 2) {
+                newEnvelope = geomManager.createEnvelope(SUBTYPES.GEOM2D);
+            } else {
+                newEnvelope = geomManager.createEnvelope(SUBTYPES.GEOM3D);
+
+            }
+            newEnvelope.setLowerCorner(envelope.getLowerCorner());
+            newEnvelope.setUpperCorner(envelope.getUpperCorner());
+            return newEnvelope;
+        }
+    }
+
+    public void open() throws OpenException {
+        if (this.data != null) {
+            return;
+        }
+        openEver();
+    }
+
+    private void openEver() throws OpenException {
+        try {
+            this.taskStatus.add();
+            getResource().execute(new ResourceAction() {
+                public Object run() throws Exception {
+                    DXFData dxfData = null;
+                    resource.setData(new HashMap<Object, Object>());
+                    FeatureStoreProviderServices store = getStoreServices();
+                    dxfData = new DXFData();
+                    dxfData.data = new ArrayList<FeatureProvider>();
+                    data = dxfData.data;
+                    counterNewsOIDs = 0;
+                    File file = (File) resource.get();
+                    Reader reader = new Reader().initialice(
+                        getMemoryProvider(),
+                        file,
+                        projection,
+                        legendBuilder
+                    );
+                    reader.begin(store);
+                    dxfData.defaultFType = reader.getDefaultType()
+                    .getNotEditableCopy();
+                    ArrayList<FeatureType> types = new ArrayList<FeatureType>();
+                    Iterator<EditableFeatureType> it = reader.getTypes().iterator();
+                    EditableFeatureType fType;
+                    while (it.hasNext()) {
+                        fType = it.next();
+                        if (fType.getId().equals(dxfData.defaultFType.getId())) {
+                            types.add(dxfData.defaultFType);
+                        } else {
+                            types.add(fType.getNotEditableCopy());
+                        }
+                    }
+                    dxfData.fTypes = types;
+
+                    resource.notifyOpen();
+                    store.setFeatureTypes(dxfData.fTypes, dxfData.defaultFType);
+                    reader.load();
+
+                    dxfData.envelope = reader.getEnvelope();
+
+                    dxfData.legendBuilder = legendBuilder;
+
+                    dxfData.projection = projection;
+
+                    reader.end();
+                    resource.notifyClose();
+                    ((Map<String, DXFData>) resource.getData()).put(projection.getAbrev(),
+                        dxfData); // OJO la reproyeccion
+
+                    data = dxfData.data;
+                    store.setFeatureTypes(dxfData.fTypes, dxfData.defaultFType);
+                    legendBuilder = dxfData.legendBuilder;
+                    envelope= dxfData.getEnvelopeCopy();
+                    // setDynValue("CRS", projection.getAbrev());
+                    counterNewsOIDs = data.size();
+                    return null;
+                }
+            });
+            this.taskStatus.terminate();
+        } catch (Exception e) {
+            data = null;
+            this.taskStatus.abort();
+            try {
+                throw new OpenException(resource.getName(), e);
+            } catch (AccessResourceException e1) {
+                throw new OpenException(getProviderName(), e);
+            }
+        } finally {
+            this.taskStatus.remove();
+        }
+    }
+
+
+    public DataServerExplorer getExplorer() throws ReadException {
+        DataManager manager = DALLocator.getDataManager();
+        FilesystemServerExplorerParameters params;
+        try {
+            params = (FilesystemServerExplorerParameters) manager
+            .createServerExplorerParameters(FilesystemServerExplorer.NAME);
+            params.setRoot(this.getDXFParameters().getFile().getParent());
+            return manager.openServerExplorer(FilesystemServerExplorer.NAME,params);
+        } catch (DataException e) {
+            throw new ReadException(this.getProviderName(), e);
+        } catch (ValidateDataParametersException e) {
+            throw new ReadException(this.getProviderName(), e);
+        }
+
+    }
+
+
+
+    public void performChanges(Iterator deleteds, Iterator inserteds, Iterator updateds, Iterator originalFeatureTypesUpdated) throws PerformEditingException {
+
+        try {
+            this.taskStatus.add();
+            taskStatus.message("_preparing");
+            getResource().execute(new ResourceAction() {
+                public Object run() throws Exception {
+                    FeatureSet features = null;
+                    DisposableIterator it = null;
+                    counterNewsOIDs = 0;
+                    try {
+                        File file = (File) resource.get();
+                        writer = new Writer().initialice(file, projection);
+                        features =
+                            getStoreServices().getFeatureStore()
+                            .getFeatureSet();
+                        List<FeatureProvider> newdata = new ArrayList<FeatureProvider>();
+                        writer.begin();
+                        it = features.fastIterator();
+                        taskStatus.setRangeOfValues(0,0);
+                        long counter=0;
+                        while (it.hasNext()) {
+                            taskStatus.setCurValue(counter++);
+                            FeatureProvider featureProvider = getStoreServices().getFeatureProviderFromFeature(
+                                (org.gvsig.fmap.dal.feature.Feature) it.next());
+                            writer.add(featureProvider);
+                            featureProvider.setOID(createNewOID());
+                            newdata.add(featureProvider);
+                        }
+                        data = newdata;
+                        writer.end();
+                        if (writer.getEnvelope() != null){
+                            envelope = writer.getEnvelope().getGeometry().getEnvelope();
+                        }
+                        resource.notifyChanges();
+//                        counterNewsOIDs = 0;
+
+                        savePrjFile(file, projection);
+
+                    } finally {
+                        if (it != null) {
+                            it.dispose();
+                        }
+                        if (features != null) {
+                            features.dispose();
+                        }
+                    }
+                    return null;
+                }
+            });
+            this.taskStatus.terminate();
+        } catch (Exception e) {
+            this.taskStatus.abort();
+            throw new PerformEditingException(getResource().toString(), e);
+        } finally {
+            this.taskStatus.remove();
+        }
+    }
+
+    /**
+     * @param featureType
+     * @param projection
+     * @param geometrySubtype
+     * @throws LocatorException
+     * @throws GeometryTypeNotValidException
+     * @throws GeometryTypeNotSupportedException
+     */
+    public static void initializeFeatureType(EditableFeatureType featureType, IProjection projection, int geometrySubtype) {
+        featureType.setHasOID(true);
+
+//        ID_FIELD_ID = 0;
+        featureType.add(NAME_FIELD_ID, DataTypes.INT)
+        .setDefaultValue(Integer.valueOf(0))
+        .getIndex();
+
+        EditableFeatureAttributeDescriptor attr = featureType.add(
+            NAME_FIELD_GEOMETRY, DataTypes.GEOMETRY);
+        attr.setSRS(projection);
+        GeometryManager geometryManager = GeometryLocator.getGeometryManager();
+
+        try {
+            GeometryType geometryType = geometryManager.getGeometryType(Geometry.TYPES.GEOMETRY, geometrySubtype);
+            attr.setGeometryType(geometryType);
+        } catch (GeometryTypeNotSupportedException | GeometryTypeNotValidException e) {
+            logger.error("Can't create geometry type " + Geometry.TYPES.GEOMETRY + " with subtype " + geometrySubtype, e);
+            attr.setGeometryType(Geometry.TYPES.GEOMETRY);
+            attr.setGeometrySubType(geometrySubtype);
+        }
+
+//        ID_FIELD_GEOMETRY = 1; //attr.getIndex();
+
+        featureType.setDefaultGeometryAttributeName(NAME_FIELD_GEOMETRY);
+
+        // FIXME: Cual es el size y el valor por defecto para Entity ?
+//        ID_FIELD_ENTITY = 2;
+        featureType.add(NAME_FIELD_ENTITY,
+            DataTypes.STRING, 100)
+            .setDefaultValue("")
+            .getIndex();
+
+        // FIXME: Cual es el size de Layer ?
+//        ID_FIELD_LAYER = 3;
+        featureType.add(NAME_FIELD_LAYER,
+            DataTypes.STRING, 100)
+            .setDefaultValue(
+            DEFAULT_VALUE_FIELD_LAYER).getIndex();
+
+//        ID_FIELD_COLOR = 4;
+        featureType.add(NAME_FIELD_COLOR,
+            DataTypes.INT)
+            .setDefaultValue(DEFAULT_VALUE_FIELD_COLOR)
+            .getIndex();
+
+//        ID_FIELD_ELEVATION = 5;
+        featureType.add(NAME_FIELD_ELEVATION,
+            DataTypes.DOUBLE)
+            .setDefaultValue(
+                Double.valueOf(0)).getIndex();
+
+//        ID_FIELD_THICKNESS = 6;
+        featureType.add(NAME_FIELD_THICKNESS,
+            DataTypes.DOUBLE)
+            .setDefaultValue(DEFAULT_VALUE_FIELD_THICKNESS).getIndex();
+
+        // FIXME: Cual es el size de Text ?
+//        ID_FIELD_TEXT = 7;
+        featureType.add(NAME_FIELD_TEXT,
+            DataTypes.STRING, 100)
+            .setDefaultValue("")
+            .getIndex();
+
+//        ID_FIELD_HEIGHTTEXT = 8;
+        featureType.add(NAME_FIELD_HEIGHTTEXT,
+            DataTypes.DOUBLE).setDefaultValue(
+                Double.valueOf(10)).getIndex();
+
+//        ID_FIELD_ROTATIONTEXT = 9;
+        featureType.add(NAME_FIELD_ROTATIONTEXT,
+            DataTypes.DOUBLE).setDefaultValue(
+                Double.valueOf(0)).getIndex();
+
+        // FIXME: Parece que el DXF puede tener mas atributos opcionales.
+        // Habria que ver de pillarlos ?
+
+    }
+
+    /**
+     * @author gvSIG team
+     *
+     */
+    public class Reader {
+        private File file;
+        private String fileName;
+        private IProjection projection;
+        private List<EditableFeatureType> types;
+        private LegendBuilder leyendBuilder;
+        private AbstractMemoryStoreProvider store;
+        private Envelope envelope;
+
+        //Next two variables are used to read the DXF file
+        private DxfFeatureMaker featureMaker;
+        private DxfHeaderManager headerManager;
+
+        /**
+         * @param store
+         * @param file
+         * @param projection
+         * @param leyendBuilder
+         * @return the reader
+         */
+        public Reader initialice(AbstractMemoryStoreProvider store, File file,
+            IProjection projection,
+            LegendBuilder leyendBuilder) {
+            this.store = store;
+            this.file = file;
+            this.fileName = file.getAbsolutePath();
+            this.projection = projection;
+            this.leyendBuilder = leyendBuilder;
+            if (leyendBuilder != null) {
+                leyendBuilder.initialize(store);
+            }
+            return this;
+        }
+
+        /**
+         * @return the envelope
+         */
+        public Envelope getEnvelope() {
+            return this.envelope;
+        }
+
+        /**
+         * @param store
+         * @throws LoadException
+         */
+        public void begin(FeatureStoreProviderServices store) throws LoadException {
+            taskStatus.message("_preloading_data");
+            featureMaker = new DxfFeatureMaker(projection);
+            headerManager = new DxfHeaderManager();
+            DxfFile dxfFeatureFile = new DxfFile(projection, file
+                .getAbsolutePath(), featureMaker, headerManager);
+
+            try {
+                dxfFeatureFile.load();
+            } catch (Exception e1) {
+                throw new LoadException(e1, fileName);
+            }
+
+            taskStatus.message("_preparing_featureType");
+            int geometrySubtype;
+			if (featureMaker.isDxf3DFile() && headerManager.isWritedDxf3D()){
+                geometrySubtype = Geometry.SUBTYPES.GEOM3D;
+            }else{
+            	geometrySubtype = Geometry.SUBTYPES.GEOM2D;
+            }
+			EditableFeatureType featureType = store.createFeatureType(getName());
+			initializeFeatureType(featureType, this.projection, geometrySubtype);
+
+            types = new ArrayList<EditableFeatureType>();
+            types.add(featureType);
+
+            if (leyendBuilder != null) {
+                taskStatus.message("_preparing_leyend");
+                leyendBuilder.begin();
+            }
+
+        }
+
+        /**
+         *
+         */
+        public void end() {
+            if (leyendBuilder != null) {
+                leyendBuilder.end();
+            }
+        }
+
+        /**
+         * @return the list of feature types
+         */
+        public List<EditableFeatureType> getTypes() {
+            return types;
+        }
+
+        /**
+         * @return the default editable feature type
+         */
+        public EditableFeatureType getDefaultType() {
+            return types.get(0);
+        }
+
+        private Double toDouble(String value) {
+            if (value == null) {
+                return Double.valueOf(0);
+            }
+            return Double.valueOf(value);
+        }
+
+        private FeatureProvider createFeature(Feature fea, FeatureType ft, int id) throws DataException {
+
+            FeatureProvider feature = store.createFeatureProvider(ft);
+
+            feature.setOID(new Long(id));
+            feature.set(ID_FIELD_ID, Integer.valueOf(id));
+            feature.set(ID_FIELD_ENTITY, fea.getProp("dxfEntity"));
+            feature.set(ID_FIELD_LAYER, fea.getProp("layer"));
+            feature.set(ID_FIELD_COLOR, Integer.valueOf(fea.getProp("color")));
+            feature.set(ID_FIELD_TEXT, fea.getProp("text"));
+            feature.set(ID_FIELD_HEIGHTTEXT, toDouble(fea.getProp("textHeight")));
+            feature.set(ID_FIELD_ROTATIONTEXT, toDouble(fea.getProp("textRotation")));
+            feature.set(ID_FIELD_ELEVATION, toDouble(fea.getProp("elevation")));
+            feature.set(ID_FIELD_THICKNESS, toDouble(fea.getProp("thickness")));
+            feature.set(ID_FIELD_GEOMETRY, null);
+            // FIXME: Habria que pillar el resto de atributos del DXF.
+
+            // FIXME: Habia una incongruencia en el codigo ya que al
+            // campo
+            // ID_FIELD_GEOMETRY igual le asignaba una geometria que un
+            // valor de cadena como 'Point3D', 'Polyline2D' o
+            // 'Polyline3D'
+            // Faltaria un atributo ID_FIELD_FSHAPE ?
+            //
+            return feature;
+        }
+
+        private Geometry processPoints(GeometryManager gManager, Feature dxffeature) throws CreateGeometryException {
+            if (dxffeature.getGeometry() instanceof org.gvsig.dxf.px.gml.Point3D) {
+                org.gvsig.dxf.px.gml.Point3D point = (org.gvsig.dxf.px.gml.Point3D) dxffeature.getGeometry();
+                Point3D pto = point.getPoint3D(0);
+                org.gvsig.fmap.geom.primitive.Point geom = gManager.createPoint(pto.getX(), pto.getY(), SUBTYPES.GEOM3D);
+                geom.setCoordinateAt(Geometry.DIMENSIONS.Z, pto.getZ());
+
+                if (point.isTextPoint()) {
+                    /// TODO labeling
+                }
+                return geom;
+
+            }
+            if (dxffeature.getGeometry() instanceof Point) {
+                Point point = (Point) dxffeature.getGeometry();
+                Point2D pto = point.get(0);
+
+                org.gvsig.fmap.geom.primitive.Point geom = gManager.createPoint(pto.getX(), pto.getY(), SUBTYPES.GEOM2D);
+
+                if (point.isTextPoint()) {
+                    /// TODO labeling
+                }
+                return geom;
+            }
+            return null;
+        }
+
+        private Geometry processLines(GeometryManager gManager, Feature dxffeature) throws CreateGeometryException {
+            if (dxffeature.getGeometry() instanceof LineString3D) {
+                Line line = gManager.createLine(SUBTYPES.GEOM3D);
+                for (int j = 0; j < dxffeature.getGeometry().pointNr(); j++) {
+                    Point3D point = ((LineString3D) dxffeature.getGeometry()).getPoint3D(j);
+                    line.addVertex(point.getX(), point.getY(), point.getZ());
+                }
+                return line;
+
+            }
+            if (dxffeature.getGeometry() instanceof LineString) {
+                Line line = gManager.createLine(SUBTYPES.GEOM2D);
+                for (int j = 0; j < dxffeature.getGeometry().pointNr(); j++) {
+                    Point2D point = dxffeature.getGeometry().get(j);
+                    line.addVertex(point.getX(), point.getY());
+                }
+                return line;
+            }
+            return null;
+        }
+
+        private Geometry processPolygons(GeometryManager gManager, Feature dxffeature) throws CreateGeometryException {
+            org.gvsig.dxf.px.gml.Geometry geom = dxffeature.getGeometry();
+            if( geom instanceof Polygon ) {
+                if ( ((Polygon) geom).is3D() ) {
+                    org.gvsig.fmap.geom.primitive.Polygon polygon = gManager.createPolygon(SUBTYPES.GEOM3D);
+                    for (int j = 0; j < dxffeature.getGeometry().pointNr(); j++) {
+                        Point3D point = (Point3D) dxffeature.getGeometry().get(j);
+                        polygon.addVertex(point.getX(), point.getY(), point.getZ());
+                    }
+                    Point3D point = (Point3D) dxffeature.getGeometry().get(0);
+                    polygon.addVertex(point.getX(), point.getY(), point.getZ());
+                    return polygon;
+
+                } else {
+                    org.gvsig.fmap.geom.primitive.Polygon polygon = gManager.createPolygon(SUBTYPES.GEOM2D);
+                    for (int j = 0; j < dxffeature.getGeometry().pointNr(); j++) {
+                        Point2D point = dxffeature.getGeometry().get(j);
+                        polygon.addVertex(point.getX(), point.getY());
+                    }
+                    Point2D point = dxffeature.getGeometry().get(0);
+                    polygon.addVertex(point.getX(), point.getY());
+                    return polygon;
+                }
+            }
+            return null;
+        }
+
+        private void addGeometryToFeature(Geometry geometry, FeatureProvider feature) {
+            if( geometry != null ) {
+                feature.set(ID_FIELD_GEOMETRY, geometry);
+                feature.setDefaultGeometry(geometry);
+                if (this.envelope == null) {
+                    this.envelope = geometry.getEnvelope();
+                } else {
+                    this.envelope.add(geometry.getEnvelope());
+                }
+            }
+        }
+
+        private void addfeatureToLegend(FeatureProvider feature) {
+            if (leyendBuilder != null) {
+                try {
+                    leyendBuilder.process(feature);
+                } catch (Exception e) {
+                    logger.warn(
+                        MessageFormat.format(
+                            "load: legendBuilder process fails in the feature {1}",
+                            feature
+                        )
+                    );
+                }
+            }
+        }
+
+        /**
+         * @throws DataException
+         */
+        public void load() throws DataException {
+
+            this.envelope = null;
+
+            IObjList.vector features = (IObjList.vector)featureMaker.getObjects();
+            String acadVersion = headerManager.getAcadVersion();
+
+            logger.info("load: acadVersion = '" + acadVersion + "'");
+
+            GeometryManager gManager = GeometryLocator.getGeometryManager();
+
+            if (!featureMaker.isDxf3DFile() && !headerManager.isWritedDxf3D()) {
+                taskStatus.message("_fixing_3dgeometries");
+                Feature[] features2D = new Feature[features.size()];
+                taskStatus.setRangeOfValues(0,features.size());
+                for (int i = 0; i < features.size(); i++) {
+                    taskStatus.setCurValue(i);
+                    Feature fea = (Feature) features.get(i);
+                    if (fea.getGeometry() instanceof org.gvsig.dxf.px.gml.Point3D) {
+                        Point point = (Point) fea.getGeometry();
+                        Point point2 = new Point();
+                        for (int j = 0; j < point.pointNr(); j++) {
+                            point2.add(point.get(j));
+                        }
+                        point2.setTextPoint(point.isTextPoint());
+                        fea.setGeometry(point2);
+                        features2D[i] = fea;
+
+                    } else if (fea.getGeometry() instanceof LineString3D) {
+                        LineString lineString = (LineString) fea.getGeometry();
+                        LineString lineString2 = new LineString();
+                        for (int j = 0; j < lineString.pointNr(); j++) {
+                            lineString2.add(lineString.get(j));
+                        }
+                        fea.setGeometry(lineString2);
+                        features2D[i] = fea;
+                    } else if (fea.getGeometry() instanceof Polygon3D) {
+                        Polygon polygon = (Polygon) fea.getGeometry();
+                        Polygon polygon2 = new Polygon();
+                        for (int j = 0; j < polygon.pointNr(); j++) {
+                            polygon2.add(polygon.get(j));
+                        }
+                        fea.setGeometry(polygon2);
+                        features2D[i] = fea;
+                    }
+                }
+                features.clear();
+                for (int i = 0; i < features2D.length; i++) {
+                    features.add(features2D[i]);
+                }
+            }
+
+            FilteredLogger logger = new FilteredLogger(DXFStoreProvider.logger,"DXFLoafing",20);
+
+            FeatureType ft = store.getStoreServices().getDefaultFeatureType();
+            taskStatus.message("_loading");
+            // Nos recorremos las geometrias tres veces para cargarlas en orden:
+            // - poligonos
+            // - lineas
+            // - puntos
+            // Y garantizar que siempre se pinten los puntos sobre lineas y
+            // poligonos y las lineas sobre los polignos.
+            int n = 0;
+            taskStatus.setRangeOfValues(0,features.size()*3);
+            for (int i = 0; i < features.size(); i++) {
+                taskStatus.setCurValue(n++);
+                try {
+                    Feature dxffeature = (Feature) features.get(i);
+                    FeatureProvider feature = createFeature(dxffeature, ft, i);
+                    Geometry geometry = processPolygons(gManager, dxffeature);
+                    if( geometry != null ) {
+                        addGeometryToFeature(geometry, feature);
+                        store.addFeatureProvider(feature);
+                        addfeatureToLegend(feature);
+                    }
+                } catch (Exception e) {
+                    logger.warn("Can't proccess feature '"+i+", of file '"+fileName+"'.", e);
+                }
+            }
+            for (int i = 0; i < features.size(); i++) {
+                taskStatus.setCurValue(n++);
+                try {
+                    Feature dxffeature = (Feature) features.get(i);
+                    FeatureProvider feature = createFeature(dxffeature, ft, i);
+                    Geometry geometry = processLines(gManager, dxffeature);
+                    if( geometry != null ) {
+                        addGeometryToFeature(geometry, feature);
+                        store.addFeatureProvider(feature);
+                        addfeatureToLegend(feature);
+                    }
+                } catch (Exception e) {
+                    logger.warn("Can't proccess feature '"+i+", of file '"+fileName+"'.", e);
+                }
+            }
+            for (int i = 0; i < features.size(); i++) {
+                taskStatus.setCurValue(n++);
+                try {
+                    Feature dxffeature = (Feature) features.get(i);
+                    FeatureProvider feature = createFeature(dxffeature, ft, i);
+                    Geometry geometry = processPoints(gManager, dxffeature);
+                    if( geometry != null ) {
+                        addGeometryToFeature(geometry, feature);
+                        store.addFeatureProvider(feature);
+                        addfeatureToLegend(feature);
+                    }
+                } catch (Exception e) {
+                    logger.warn("Can't proccess feature '"+i+", of file '"+fileName+"'.", e);
+                }
+            }
+        }
+
+    }
+
+    /**
+     * @author gvSIG team
+     *
+     */
+    public class Writer {
+        private Double DEFAULT_ELEVATION = new Double(0);
+
+        private DxfFile.EntityFactory entityMaker;
+
+        private IProjection proj = null;
+
+        private int handle = 40; // Revisar porqu� es 40.
+
+        private int k = 0;
+
+        private boolean dxf3DFile = false;
+        private String fileName;
+        private Envelope envelope;
+
+        /**
+         * @param file
+         * @param projection
+         * @return the writer
+         */
+        public Writer initialice(File file, IProjection projection) {
+            this.proj = projection;
+            this.fileName = file.getAbsolutePath();
+            entityMaker = new DxfEntityMaker(proj);
+            return this;
+        }
+
+        /**
+         *
+         */
+        public void begin() {
+            envelope = null;
+            entityMaker = new DxfEntityMaker(proj);
+        }
+
+        /**
+         * @throws WriteException
+         */
+        public void end() throws WriteException {
+            try {
+                DxfFile dxfFile = new DxfFile(null, fileName, entityMaker);
+                dxfFile.setCadFlag(true);
+                if (dxf3DFile) {
+                    dxfFile.setDxf3DFlag(true);
+                }
+                dxfFile.save(fileName);
+                dxfFile.close();
+            } catch (Exception e) {
+                throw new WriteException(fileName, e);
+            }
+        }
+
+        /**
+         * @param feature
+         * @throws WriteException
+         */
+        public void add(FeatureProvider feature) throws WriteException {
+            try {
+                Geometry geom = feature.getDefaultGeometry();
+                if(geom == null){
+                    //FIXME: tirar al log y avisar al usuario
+                    return;
+                }
+                GeometryType type = geom.getGeometryType();
+                boolean geometrySupported = true;
+
+                if ((type.isTypeOf(TYPES.POINT)) && (type.isSubTypeOf(SUBTYPES.GEOM3D) || type.isSubTypeOf(SUBTYPES.GEOM3DM))) {
+                    dxf3DFile = true;
+                    k = createPoint3D(handle, k, feature);
+
+                } else if ((type.isTypeOf(TYPES.POINT)) && (SUBTYPES.GEOM2D == type.getSubType())) {
+                    k = createPoint2D(handle, k, feature);
+
+                } else if ((type.isTypeOf(TYPES.ARC)) && (SUBTYPES.GEOM2D == type.getSubType())) {
+                    k = createArc2D(handle, k, feature);
+
+                } else if ((type.isTypeOf(TYPES.CURVE) || type.isTypeOf(TYPES.MULTICURVE)) && (type.isSubTypeOf(SUBTYPES.GEOM3D) || type.isSubTypeOf(SUBTYPES.GEOM3DM))) {
+                    dxf3DFile = true;
+                    k = createPolyline3D(handle, k, feature, false);
+
+                } else if ((type.isTypeOf(TYPES.CURVE) || type.isTypeOf(TYPES.MULTICURVE)) && (SUBTYPES.GEOM2D == type.getSubType())) {
+                    k = createLwPolyline2D(handle, k, feature, false);
+
+                } else if ((type.isTypeOf(TYPES.CIRCLE)) && (SUBTYPES.GEOM2D == type.getSubType())) {
+                    k = createCircle2D(handle, k, feature);
+
+                } else if ((type.isTypeOf(TYPES.ELLIPSE)) && (SUBTYPES.GEOM2D == type.getSubType())) {
+                    k = createEllipse2D(handle, k, feature);
+
+                } else if ((type.isTypeOf(TYPES.SURFACE) || (type.isTypeOf(TYPES.MULTISURFACE))) && (type.isSubTypeOf(SUBTYPES.GEOM3D) || type.isSubTypeOf(SUBTYPES.GEOM3DM))) {
+
+                    dxf3DFile = true;
+                    k = createPolyline3D(handle, k, feature, true);
+
+                } else if ((type.isTypeOf(TYPES.SURFACE) || (type.isTypeOf(TYPES.MULTISURFACE))) && (SUBTYPES.GEOM2D == type.getSubType())) {
+                    k = createLwPolyline2D(handle, k, feature, true);
+
+                } else {
+                    geometrySupported = false;
+                    logger.warn(
+                        MessageFormat.format(
+                            "Geometry '{1}' not yet supported",
+                            new Object[] {geom.getClass().getName()}
+                        )
+                    );
+                    k++;
+                }
+                if (geometrySupported){
+                    if (this.envelope != null){
+                        this.envelope.add(feature.getDefaultEnvelope());
+                    } else {
+                        this.envelope = feature.getDefaultEnvelope().getGeometry().getEnvelope();
+                    }
+                }
+            } catch (Exception e) {
+                throw new WriteException(fileName, e);
+            }
+
+        }
+
+        private boolean hasText(FeatureProvider feature) {
+            if (feature.isNull(ID_FIELD_TEXT)) {
+                return false;
+            }
+            if (feature.get(ID_FIELD_TEXT).equals("")) {
+                return false;
+            }
+            return true;
+        }
+
+        private DxfGroupVector updateProperties(FeatureProvider feature, int k) {
+            DxfGroupVector polv = new DxfGroupVector();
+
+            String layer = (String) feature.get(ID_FIELD_LAYER);
+            if(StringUtils.isBlank(layer)){
+                layer = DEFAULT_VALUE_FIELD_LAYER;
+            }
+            Integer color = (Integer) feature.get(ID_FIELD_COLOR);
+            if(color == null) {
+                color = DEFAULT_VALUE_FIELD_COLOR;
+            }
+            Double thickness = (Double) feature.get(ID_FIELD_THICKNESS);
+            if(thickness == null) {
+                thickness = DEFAULT_VALUE_FIELD_THICKNESS;
+            }
+
+            DxfGroup geometryLayer = new DxfGroup(8, layer);
+
+            DxfGroup handleGroup = new DxfGroup();
+            handleGroup.setCode(5);
+            handleGroup.setData(new Integer(handle + k).toString());
+
+            DxfGroup handleColor = new DxfGroup();
+            handleColor.setCode(62);
+            handleColor.setData(color);
+
+            DxfGroup handleThickness = new DxfGroup();
+            handleThickness.setCode(39);
+            handleThickness.setData(thickness);
+
+            polv.add(geometryLayer);
+            polv.add(handleGroup);
+            polv.add(handleColor);
+
+//            DxfGroup prueba = new DxfGroup();
+//            prueba.setCode(1000);
+//            prueba.setData("prueba");
+//            polv.add(prueba);
+            return polv;
+        }
+
+        private int createPoint2D(int handle, int k, FeatureProvider feature)
+        throws Exception {
+
+            if (hasText(feature)) {
+                return createText2D(handle, k, feature);
+            }
+            org.gvsig.fmap.geom.primitive.Point point = geomManager.createPoint(0, 0, SUBTYPES.GEOM2D);
+            double[] pointCoords = new double[6];
+            PathIterator pointIt = (feature.getDefaultGeometry())
+            .getPathIterator(null);
+            while (!pointIt.isDone()) {
+                pointIt.currentSegment(pointCoords);
+                point = geomManager.createPoint(pointCoords[0], pointCoords[1], SUBTYPES.GEOM2D);
+                pointIt.next();
+            }
+            Point2D pto = new Point2D.Double(point.getX(), point.getY());
+
+            DxfGroup px = new DxfGroup();
+            DxfGroup py = new DxfGroup();
+            DxfGroup pz = new DxfGroup();
+            px.setCode(10);
+            px.setData(new Double(pto.getX()));
+            py.setCode(20);
+            py.setData(new Double(pto.getY()));
+            pz.setCode(30);
+            // FIXME: POINT del DXF tiene cota. Le asigno cero arbitrariamente.
+            pz.setData(new Double(0.0));
+            DxfGroupVector pv = updateProperties(feature, k);
+            pv.add(px);
+            pv.add(py);
+            pv.add(pz);
+            entityMaker.createPoint(pv);
+            k++;
+            return k;
+        }
+
+        private int createText2D(int handle, int k, FeatureProvider feature)
+        throws Exception {
+
+            String text = feature.get(ID_FIELD_TEXT).toString();
+            Double heightText = (Double) feature.get(ID_FIELD_HEIGHTTEXT);
+            Double rotationText = (Double) feature.get(ID_FIELD_ROTATIONTEXT);
+
+            DxfGroup handleText = new DxfGroup();
+            handleText.setCode(1);
+            handleText.setData(text);
+
+            DxfGroup handleHeightText = new DxfGroup();
+            handleHeightText.setCode(40);
+            handleHeightText.setData(heightText);
+
+            DxfGroup handleRotationText = new DxfGroup();
+            handleRotationText.setCode(50);
+            handleRotationText.setData(rotationText);
+
+            org.gvsig.fmap.geom.primitive.Point point = geomManager.createPoint(0, 0, SUBTYPES.GEOM2D);
+            double[] pointCoords = new double[6];
+            PathIterator pointIt = (feature.getDefaultGeometry())
+            .getPathIterator(null);
+            while (!pointIt.isDone()) {
+                pointIt.currentSegment(pointCoords);
+                point = geomManager.createPoint(pointCoords[0], pointCoords[1], SUBTYPES.GEOM2D);
+                pointIt.next();
+            }
+            Point2D pto = new Point2D.Double(point.getX(), point.getY());
+            DxfGroup handleGroup = new DxfGroup();
+            handleGroup.setCode(5);
+            handleGroup.setData(new Integer(handle + k).toString());
+            DxfGroup px = new DxfGroup();
+            DxfGroup py = new DxfGroup();
+            DxfGroup pz = new DxfGroup();
+            px.setCode(10);
+            px.setData(new Double(pto.getX()));
+            py.setCode(20);
+            py.setData(new Double(pto.getY()));
+            pz.setCode(30);
+            // FIXME: POINT del DXF tiene cota. Le asigno cero arbitrariamente.
+            pz.setData(new Double(0.0));
+            DxfGroupVector pv = updateProperties(feature, k);
+            pv.add(handleText);
+            pv.add(handleHeightText);
+            pv.add(handleRotationText);
+            pv.add(handleGroup);
+            pv.add(px);
+            pv.add(py);
+            pv.add(pz);
+            entityMaker.createText(pv);
+            k++;
+            return k;
+        }
+
+        private int createPoint3D(int handle, int k, FeatureProvider feature)
+        throws Exception {
+            if (hasText(feature)) {
+                return createText3D(handle, k, feature);
+            }
+            org.gvsig.fmap.geom.primitive.Point point = (org.gvsig.fmap.geom.primitive.Point)geomManager.create(TYPES.POINT, SUBTYPES.GEOM3D);
+            double[] pointCoords = new double[6];
+            PathIterator pointIt = (feature.getDefaultGeometry())
+            .getPathIterator(null);
+            while (!pointIt.isDone()) {
+                pointIt.currentSegment(pointCoords);
+                point = (org.gvsig.fmap.geom.primitive.Point)geomManager.create(TYPES.POINT, SUBTYPES.GEOM3D);
+                point.setCoordinateAt(0, pointCoords[0]);
+                point.setCoordinateAt(1, pointCoords[1]);
+                point.setCoordinateAt(2, pointCoords[2]);
+                pointIt.next();
+            }
+            org.gvsig.fmap.geom.primitive.Point pto = (org.gvsig.fmap.geom.primitive.Point)geomManager.create(TYPES.POINT, SUBTYPES.GEOM3D);
+            pto.setCoordinateAt(0, point.getCoordinateAt(0));
+            pto.setCoordinateAt(1,  point.getCoordinateAt(1));
+            pto.setCoordinateAt(2, point.getCoordinateAt(2));
+            DxfGroup px = new DxfGroup();
+            DxfGroup py = new DxfGroup();
+            DxfGroup pz = new DxfGroup();
+            px.setCode(10);
+            px.setData(new Double(pto.getX()));
+            py.setCode(20);
+            py.setData(new Double(pto.getY()));
+            pz.setCode(30);
+            pz.setData(new Double(pto.getCoordinateAt(2)));
+            double velev = ((org.gvsig.fmap.geom.primitive.Point) feature.getDefaultGeometry())
+            .getCoordinateAt(2);
+            Double elevation = DEFAULT_ELEVATION;
+            elevation = new Double(velev);
+            DxfGroup handleElevation = new DxfGroup();
+            handleElevation.setCode(38);
+            handleElevation.setData(elevation);
+
+            DxfGroupVector pv = updateProperties(feature, k);
+            pv.add(handleElevation);
+            pv.add(px);
+            pv.add(py);
+            pv.add(pz);
+            entityMaker.createPoint(pv);
+            k++;
+            return k;
+        }
+
+        private int createText3D(int handle, int k, FeatureProvider feature)
+        throws Exception {
+
+            double velev = ((org.gvsig.fmap.geom.primitive.Point) feature.getDefaultGeometry())
+            .getCoordinateAt(0);
+
+            Double elevation = new Double(velev);
+            String text = feature.get(ID_FIELD_TEXT).toString();
+            Double heightText = (Double) feature.get(ID_FIELD_HEIGHTTEXT);
+            Double rotationText = (Double) feature.get(ID_FIELD_ROTATIONTEXT);
+
+            DxfGroup handleText = new DxfGroup();
+            handleText.setCode(1);
+            handleText.setData(text);
+
+            DxfGroup handleHeightText = new DxfGroup();
+            handleHeightText.setCode(40);
+            handleHeightText.setData(heightText);
+
+            DxfGroup handleRotationText = new DxfGroup();
+            handleRotationText.setCode(50);
+            handleRotationText.setData(rotationText);
+
+            DxfGroup handleElevation = new DxfGroup();
+            handleElevation.setCode(38);
+            handleElevation.setData(elevation);
+
+            org.gvsig.fmap.geom.primitive.Point point =
+                (org.gvsig.fmap.geom.primitive.Point) (feature
+                    .getDefaultGeometry());
+
+            DxfGroup handleGroup = new DxfGroup();
+            handleGroup.setCode(5);
+            handleGroup.setData(new Integer(handle + k).toString());
+            DxfGroup px = new DxfGroup();
+            DxfGroup py = new DxfGroup();
+            DxfGroup pz = new DxfGroup();
+            px.setCode(10);
+            px.setData(new Double(point.getX()));
+            py.setCode(20);
+            py.setData(new Double(point.getY()));
+            pz.setCode(30);
+            pz.setData(new Double(point.getCoordinateAt(2)));
+            DxfGroupVector pv = updateProperties(feature, k);
+            pv.add(handleElevation);
+            pv.add(handleText);
+            pv.add(handleHeightText);
+            pv.add(handleRotationText);
+            pv.add(handleGroup);
+            pv.add(px);
+            pv.add(py);
+            pv.add(pz);
+            entityMaker.createText(pv);
+            k++;
+            return k;
+        }
+        
+
+        private int createLwPolyline2D(int handle, int k, FeatureProvider feature,
+            boolean isPolygon) throws Exception {
+
+            Geometry geom = feature.getDefaultGeometry();
+            MultiLine lines = geom.toLines();
+            for (Geometry line : lines) {
+
+                DxfGroup polylineFlag = new DxfGroup();
+                polylineFlag.setCode(70);
+                if (isPolygon) {
+                    polylineFlag.setData(1); // cerrada
+                } else {
+                    polylineFlag.setData(0); // abierta
+                }
+
+                DxfGroupVector polv = updateProperties(feature, k);
+                polv.add(polylineFlag);
+                k++;
+                
+                Line curve = (Line)line;
+                for (int i = 0; i < curve.getNumVertices(); i++) {
+                    org.gvsig.fmap.geom.primitive.Point point = curve.get(i);
+                    DxfGroup xvertex = new DxfGroup();
+                    xvertex.setCode(10);
+                    xvertex.setData(point.getX());
+                    DxfGroup yvertex = new DxfGroup();
+                    yvertex.setCode(20);
+                    yvertex.setData(point.getY());
+                    polv.add(xvertex);
+                    polv.add(yvertex);
+                }
+                entityMaker.createLwPolyline(polv);
+            }
+            return k;
+        }
+        
+        
+        private int createLwPolyline2D_OLD(int handle, int k, FeatureProvider feature,
+            boolean isPolygon) throws Exception {
+            boolean first = true;
+            DxfGroupVector polv = updateProperties(feature, k);
+            Vector<org.gvsig.fmap.geom.primitive.Point> vpoints = new Vector<org.gvsig.fmap.geom.primitive.Point>();
+
+            DxfGroup polylineFlag = new DxfGroup();
+            polylineFlag.setCode(70);
+            if (isPolygon) {
+                polylineFlag.setData(new Integer(1)); // cerrada
+            } else {
+                polylineFlag.setData(new Integer(0)); // abierta
+            }
+
+            PathIterator theIterator = (feature.getDefaultGeometry())
+            .getPathIterator(null, geomManager.getFlatness()); // polyLine.
+            // getPathIterator
+            // (null,
+            // flatness);
+
+            double[] theData = new double[6];
+            while (!theIterator.isDone()) {
+                int theType = theIterator.currentSegment(theData);
+                switch (theType) {
+                case PathIterator.SEG_MOVETO:
+                    if (!first) {
+                        for (int j = 0; j < vpoints.size(); j++) {
+                            DxfGroup xvertex = new DxfGroup();
+                            xvertex.setCode(10);
+                            xvertex
+                            .setData(new Double(
+                                vpoints
+                                    .get(j).getX()));
+                            DxfGroup yvertex = new DxfGroup();
+                            yvertex.setCode(20);
+                            yvertex
+                            .setData(new Double(
+                                vpoints
+                                    .get(j).getY()));
+                            polv.add(xvertex);
+                            polv.add(yvertex);
+                        }
+
+                        entityMaker.createLwPolyline(polv);
+                        k++;
+                        polv = updateProperties(feature, k);
+
+                    }
+                    first = false;
+                    polv.add(polylineFlag);
+                    vpoints.clear();
+                    vpoints.add(geomManager.createPoint(theData[0], theData[1], SUBTYPES.GEOM2D));
+                    break;
+                case PathIterator.SEG_LINETO:
+                    vpoints.add(geomManager.createPoint(theData[0], theData[1], SUBTYPES.GEOM2D));
+                    break;
+                case PathIterator.SEG_QUADTO:
+                    break;
+                case PathIterator.SEG_CUBICTO:
+                    break;
+                case PathIterator.SEG_CLOSE:
+                    polylineFlag.setData(new Integer(1)); // cerrada
+                    break;
+
+                }
+                theIterator.next();
+            }
+
+            for (int j = 0; j < vpoints.size(); j++) {
+                DxfGroup xvertex = new DxfGroup();
+                xvertex.setCode(10);
+                xvertex.setData(new Double(vpoints.get(j).getX()));
+                DxfGroup yvertex = new DxfGroup();
+                yvertex.setCode(20);
+                yvertex.setData(new Double(vpoints.get(j).getY()));
+                polv.add(xvertex);
+                polv.add(yvertex);
+            }
+
+            entityMaker.createLwPolyline(polv);
+            k++;
+            return k;
+        }
+
+        
+        private int createPolyline3D(int handle, int k, FeatureProvider feature,
+            boolean isPolygon) throws Exception {
+
+            Geometry geom = feature.getDefaultGeometry();
+            MultiLine lines = geom.toLines();
+            for (Geometry g : lines) {
+
+                DxfGroup polylineFlag = new DxfGroup();
+                polylineFlag.setCode(70);
+                int flag = 0;
+                if (isPolygon) {
+                    flag = 1; // cerrada
+                }
+                polylineFlag.setData(flag);
+
+                DxfGroupVector polv = updateProperties(feature, k);
+                polv.add(polylineFlag);
+                k++;
+                Line line = (Line)g;
+                
+                if (constantElevation(line)) {
+                    DxfGroup elevation = new DxfGroup();
+                    elevation.setCode(38);
+                    elevation.setData(line.getVertex(0).getCoordinateAt(Geometry.DIMENSIONS.Z));
+                    polv.add(elevation);
+                    
+                    for (int i = 0; i < line.getNumVertices(); i++) {
+                        org.gvsig.fmap.geom.primitive.Point point = line.get(i);
+                        DxfGroup xvertex = new DxfGroup();
+                        xvertex.setCode(10);
+                        xvertex.setData(point.getX());
+                        DxfGroup yvertex = new DxfGroup();
+                        yvertex.setCode(20);
+                        yvertex.setData(point.getY());
+                        polv.add(xvertex);
+                        polv.add(yvertex);
+                    }
+                    entityMaker.createLwPolyline(polv);
+
+                } else {
+
+                    polylineFlag.setData(flag|8);
+                    
+                    DxfGroup xgroup = new DxfGroup();
+                    xgroup.setCode(10);
+                    xgroup.setData(0d);
+                    polv.add(xgroup);
+                    DxfGroup ygroup = new DxfGroup();
+                    ygroup.setCode(20);
+                    ygroup.setData(0d);
+                    polv.add(ygroup);
+                    DxfGroup elevation = new DxfGroup();
+                    elevation.setCode(30);
+                    elevation.setData(0d);
+                    polv.add(elevation);
+                    DxfGroup subclassMarker = new DxfGroup(100, "AcDb3dPolyline");
+                    polv.add(subclassMarker);
+                    
+                    entityMaker.createPolyline(polv);
+                    k++;
+                    
+                    
+                    for (int i = 0; i < line.getNumVertices(); i++) {
+                        org.gvsig.fmap.geom.primitive.Point point = line.get(i);
+
+                        DxfGroupVector verv = new DxfGroupVector();
+                        DxfGroup entityType = new DxfGroup(0, "VERTEX");
+                        verv.add(entityType);
+                        DxfGroup generalSubclassMarker = new DxfGroup(100,"AcDbEntity");
+                        verv.add(generalSubclassMarker);
+                        DxfGroup layerName = new DxfGroup(8, "default");
+                        verv.add(layerName);
+                        DxfGroup vertexSubclassMarker = new DxfGroup(100,"AcDbVertex");
+                        verv.add(vertexSubclassMarker);
+                        
+                        DxfGroup xvertex = new DxfGroup();
+                        xvertex.setCode(10);
+                        xvertex.setData(point.getX());
+                        DxfGroup yvertex = new DxfGroup();
+                        yvertex.setCode(20);
+                        yvertex.setData(point.getY());
+                        DxfGroup zvertex = new DxfGroup();
+                        zvertex.setCode(20);
+                        zvertex.setData(point.getCoordinateAt(Geometry.DIMENSIONS.Z));
+                        verv.add(xvertex);
+                        verv.add(yvertex);
+                        verv.add(zvertex);
+                        entityMaker.addVertex(verv);
+                        k++;
+                    }
+//                    DxfGroupVector seqv = new DxfGroupVector();
+//                    DxfGroup entityType = new DxfGroup(0, "SEQEND");
+//                    seqv.add(entityType);
+//                    DxfGroup generalSubclassMarker = new DxfGroup(100, "AcDbEntity");
+//                    seqv.add(generalSubclassMarker);
+//                    DxfGroup layerName = new DxfGroup(8, "default");
+//                    seqv.add(layerName);
+//                    DxfGroup handleSeqGroup = new DxfGroup();
+//                    handleSeqGroup.setCode(5);
+//                    handleSeqGroup.setData(String.valueOf(handle + k));
+//                    seqv.add(handleSeqGroup);
+                    entityMaker.endSeq();
+                    k++;
+
+                }
+            }
+            return k;
+        }
+
+        private int createPolyline3D_OLD(int handle, int k, FeatureProvider feature,
+            boolean isPolygon)
+        throws Exception {
+            DxfGroupVector polv = updateProperties(feature, k);
+            Vector<org.gvsig.fmap.geom.primitive.Point> vpoints = new Vector<org.gvsig.fmap.geom.primitive.Point>();
+            PathIterator theIterator = (feature.getDefaultGeometry())
+            .getPathIterator(null, geomManager.getFlatness());
+            double[] theData = new double[6];
+            OrientablePrimitive curve = (OrientablePrimitive) feature.getDefaultGeometry();
+            double[] velev = new double[curve.getNumVertices()];
+            for (int i = 0; i < curve.getNumVertices(); i++) {
+                velev[i] = curve.getCoordinateAt(i, 2);
+            }
+
+            while (!theIterator.isDone()) {
+                int theType = theIterator.currentSegment(theData);
+                switch (theType) {
+                case PathIterator.SEG_MOVETO:
+                    vpoints.add(geomManager.createPoint(theData[0], theData[1], SUBTYPES.GEOM2D));
+                    break;
+                case PathIterator.SEG_LINETO:
+                    vpoints.add(geomManager.createPoint(theData[0], theData[1], SUBTYPES.GEOM2D));
+                    break;
+                }
+                theIterator.next();
+            }
+            if (constantElevation(velev)) {
+                Integer flag = 0;
+                DxfGroup polylineFlag = new DxfGroup();
+                polylineFlag.setCode(70);
+                polylineFlag.setCode(70);
+                if (isPolygon) {
+                    flag |= 1;
+                }
+                polylineFlag.setData(flag);
+                polv.add(polylineFlag);
+                DxfGroup elevation = new DxfGroup();
+                elevation.setCode(38);
+                elevation.setData(new Double(velev[0]));
+                polv.add(elevation);
+                for (int j = 0; j < vpoints.size(); j++) {
+                    DxfGroup xvertex = new DxfGroup();
+                    xvertex.setCode(10);
+                    xvertex.setData(new Double(
+                        vpoints
+                            .get(j).getX()));
+                    DxfGroup yvertex = new DxfGroup();
+                    yvertex.setCode(20);
+                    yvertex.setData(new Double(
+                        vpoints
+                            .get(j).getY()));
+                    polv.add(xvertex);
+                    polv.add(yvertex);
+                }
+                entityMaker.createLwPolyline(polv);
+                k++;
+            } else {
+                DxfGroup polylineFlag = new DxfGroup();
+                polylineFlag.setCode(70);
+                Integer flag = 8;
+//                polylineFlag.setData(new Integer(8));
+                if (isPolygon) {
+                    flag |= 1;
+                }
+                polylineFlag.setData(flag);
+                polv.add(polylineFlag);
+                DxfGroup xgroup = new DxfGroup();
+                xgroup.setCode(10);
+                xgroup.setData(new Double(0.0));
+                polv.add(xgroup);
+                DxfGroup ygroup = new DxfGroup();
+                ygroup.setCode(20);
+                ygroup.setData(new Double(0.0));
+                polv.add(ygroup);
+                DxfGroup elevation = new DxfGroup();
+                elevation.setCode(30);
+                elevation.setData(new Double(0.0));
+                polv.add(elevation);
+                DxfGroup subclassMarker = new DxfGroup(100, "AcDb3dPolyline");
+                polv.add(subclassMarker);
+                entityMaker.createPolyline(polv);
+                k++;
+                for (int j = 0; j < vpoints.size(); j++) {
+                    DxfGroupVector verv = new DxfGroupVector();
+                    DxfGroup entityType = new DxfGroup(0, "VERTEX");
+                    verv.add(entityType);
+                    DxfGroup generalSubclassMarker = new DxfGroup(100,
+                    "AcDbEntity");
+                    verv.add(generalSubclassMarker);
+                    DxfGroup layerName = new DxfGroup(8, "default");
+                    verv.add(layerName);
+                    DxfGroup vertexSubclassMarker = new DxfGroup(100,
+                    "AcDbVertex");
+                    verv.add(vertexSubclassMarker);
+                    DxfGroup xvertex = new DxfGroup();
+                    xvertex.setCode(10);
+                    xvertex.setData(new Double(
+                        vpoints
+                            .get(j).getX()));
+                    DxfGroup yvertex = new DxfGroup();
+                    yvertex.setCode(20);
+                    yvertex.setData(new Double(
+                        vpoints
+                            .get(j).getY()));
+                    DxfGroup zvertex = new DxfGroup();
+                    zvertex.setCode(30);
+                    zvertex.setData(new Double(velev[j]));
+                    verv.add(xvertex);
+                    verv.add(yvertex);
+                    verv.add(zvertex);
+                    entityMaker.addVertex(verv);
+                    k++;
+                }
+                DxfGroupVector seqv = new DxfGroupVector();
+                DxfGroup entityType = new DxfGroup(0, "SEQEND");
+                seqv.add(entityType);
+                DxfGroup generalSubclassMarker = new DxfGroup(100, "AcDbEntity");
+                seqv.add(generalSubclassMarker);
+                DxfGroup layerName = new DxfGroup(8, "default");
+                seqv.add(layerName);
+                DxfGroup handleSeqGroup = new DxfGroup();
+                handleSeqGroup.setCode(5);
+                handleSeqGroup.setData(new Integer(handle + k).toString());
+                seqv.add(handleSeqGroup);
+                entityMaker.endSeq();
+                k++;
+            }
+            return k;
+        }
+
+        private boolean constantElevation(Line line) {
+            Double elev = null;
+            for (org.gvsig.fmap.geom.primitive.Point point : line) {
+                if(elev == null){
+                    elev = point.getCoordinateAt(Geometry.DIMENSIONS.Z);
+                    continue;
+                }
+                if (elev != point.getCoordinateAt(Geometry.DIMENSIONS.Z)) {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        private boolean constantElevation(double[] velev) {
+            boolean constant = true;
+            for (int i = 0; i < velev.length; i++) {
+                for (int j = 0; j < velev.length; j++) {
+                    if (j > i) {
+                        if (velev[i] != velev[j]) {
+                            constant = false;
+                            break;
+                        }
+                    }
+                }
+                break;
+            }
+            return constant;
+        }
+
+        private int createCircle2D(int handle, int k, FeatureProvider feature)
+        throws Exception {
+            DxfGroupVector polv = updateProperties(feature, k);
+            DxfGroup circleFlag = new DxfGroup();
+            circleFlag.setCode(100);
+            polv.add(circleFlag);
+
+            DxfGroup xvertex = new DxfGroup();
+            xvertex.setCode(10);
+            Circle circle = (Circle) (feature
+                .getDefaultGeometry());
+            xvertex.setData(new Double(circle.getCenter().getX()));
+            DxfGroup yvertex = new DxfGroup();
+            yvertex.setCode(20);
+            yvertex.setData(new Double(circle.getCenter().getY()));
+            DxfGroup zvertex = new DxfGroup();
+            zvertex.setCode(30);
+            // TODO: COORDENADA Z. REVISAR ESTO PARA ENTIDADES 3D
+            zvertex.setData(new Double(0));
+
+            DxfGroup radius = new DxfGroup();
+            radius.setCode(40);
+            radius.setData(new Double(circle.getRadious()));
+
+            polv.add(xvertex);
+            polv.add(yvertex);
+            polv.add(zvertex);
+            polv.add(radius);
+
+            entityMaker.createCircle(polv);
+            k++;
+            return k;
+        }
+
+        private int createArc2D(int handle, int k, FeatureProvider feature)
+        throws Exception {
+            Arc arc = (Arc) (feature.getDefaultGeometry());
+
+            org.gvsig.fmap.geom.primitive.Point[] pts = new org.gvsig.fmap.geom.primitive.Point[3];
+            pts[0] = arc.getInitPoint();
+            pts[1] = arc.getMiddlePoint();
+            pts[2] = arc.getEndPoint();
+            org.gvsig.fmap.geom.primitive.Point center = arc.getCenterPoint();
+            GeometryOperationContext ctx = new GeometryOperationContext();
+            ctx.setAttribute("geom", pts[0]);
+            double radius = ((Double)geomManager.invokeOperation(PointDistance.CODE, center, ctx)).doubleValue();
+
+            double initAngle = ((Double)geomManager.invokeOperation(PointGetAngle.CODE, center, ctx)).doubleValue();
+            initAngle = Math.toDegrees(initAngle);
+            ctx.setAttribute("geom", pts[1]);
+            double midAngle = ((Double)geomManager.invokeOperation(PointGetAngle.CODE, center, ctx)).doubleValue();
+            midAngle = Math.toDegrees(midAngle);
+            ctx.setAttribute("geom", pts[2]);
+            double endAngle = ((Double)geomManager.invokeOperation(PointGetAngle.CODE, center, ctx)).doubleValue();
+            endAngle = Math.toDegrees(endAngle);
+
+            double aux;
+            if(initAngle<=endAngle){
+                if(initAngle<=midAngle && midAngle<=endAngle){
+                    //do nothing
+                } else {
+                    aux = initAngle;
+                    initAngle = endAngle;
+                    endAngle = aux;
+                }
+            } else {
+                if(initAngle>=midAngle && midAngle>=endAngle){
+                    aux = initAngle;
+                    initAngle = endAngle;
+                    endAngle = aux;
+                } else {
+                    //do nothing
+                }
+            }
+
+            DxfGroup ax = new DxfGroup();
+            DxfGroup ay = new DxfGroup();
+            DxfGroup ac = new DxfGroup();
+            DxfGroup ai = new DxfGroup();
+            DxfGroup ae = new DxfGroup();
+            ax.setCode(10);
+            ax.setData(new Double(center.getX()));
+            ay.setCode(20);
+            ay.setData(new Double(center.getY()));
+            ac.setCode(40);
+            ac.setData(new Double(radius));
+            ai.setCode(50);
+            ai.setData(new Double(initAngle));
+            ae.setCode(51);
+            ae.setData(new Double(endAngle));
+            DxfGroupVector av = updateProperties(feature, k);
+            av.add(ax);
+            av.add(ay);
+            av.add(ac);
+            av.add(ai);
+            av.add(ae);
+            entityMaker.createArc(av);
+            k++;
+            return k;
+        }
+
+        private int createEllipse2D(int handle, int k, FeatureProvider feature)
+        throws Exception {
+            Ellipse ellipse = (Ellipse) (feature
+                .getDefaultGeometry());
+
+            org.gvsig.fmap.geom.primitive.Point center = (org.gvsig.fmap.geom.primitive.Point)geomManager.create(TYPES.POINT, SUBTYPES.GEOM2D);
+            center.setCoordinateAt(0, (ellipse.getAxis1Start().getX() + ellipse.getAxis1End().getX()) / 2);
+            center.setCoordinateAt(1, (ellipse.getAxis1Start().getY() + ellipse.getAxis1End().getY()) / 2);
+
+            double mAxisL = ellipse.getAxis2Dist() * 2;
+            GeometryOperationContext ctx = new GeometryOperationContext();
+            ctx.setAttribute("geom", ellipse.getAxis1End());
+            double maAxisL = ((Double)geomManager.invokeOperation(PointDistance.CODE, ellipse.getAxis1Start(), ctx)).doubleValue();
+
+            Point2D endPointOfMajorAxis = new Point2D.Double(ellipse.getAxis1End().getX(), ellipse.getAxis1End().getY());
+            double azimut = Math
+            .atan2(endPointOfMajorAxis.getX() - center.getX(),
+                endPointOfMajorAxis.getY() - center.getY());
+            double azimut2 = azimut + Math.PI / 2.0;
+            if (azimut2 >= Math.PI * 2) {
+                azimut2 = azimut2 - Math.PI * 2;
+            }
+            Point2D endPointOfMinorAxis = new Point2D.Double(center.getX()
+                + (ellipse.getAxis2Dist() * Math.sin(azimut2)), center.getY()
+                + (ellipse.getAxis2Dist() * Math.cos(azimut2)));
+
+            if (mAxisL >= maAxisL) {
+                // El menor debe ser menor que el mayor. Los cambiamos.
+                double aux = mAxisL;
+                mAxisL = maAxisL;
+                maAxisL = aux;
+                // Tambi�n cambiamos los puntos finales de los ejes.
+                Point2D pAux = endPointOfMinorAxis;
+                endPointOfMinorAxis = endPointOfMajorAxis;
+                endPointOfMajorAxis = pAux;
+            }
+            double mToMAR = mAxisL / maAxisL;
+            DxfGroup x = new DxfGroup();
+            DxfGroup y = new DxfGroup();
+            DxfGroup xc = new DxfGroup();
+            DxfGroup yc = new DxfGroup();
+            DxfGroup minToMaj = new DxfGroup();
+            x.setCode(10);
+            x.setData(new Double(center.getX()));
+            y.setCode(20);
+            y.setData(new Double(center.getY()));
+            xc.setCode(11);
+            xc.setData(new Double(endPointOfMajorAxis.getX() - center.getX()));
+            yc.setCode(21);
+            yc.setData(new Double(endPointOfMajorAxis.getY() - center.getY()));
+            minToMaj.setCode(40);
+            minToMaj.setData(new Double(mToMAR));
+            DxfGroupVector av = updateProperties(feature, k);
+            av.add(x);
+            av.add(y);
+            av.add(xc);
+            av.add(yc);
+            av.add(minToMaj);
+            entityMaker.createEllipse(av);
+            k++;
+            return k;
+        }
+
+        /**
+         * @return the envelope
+         */
+        public Envelope getEnvelope() {
+            return this.envelope;
+        }
+
+    }
+
+    public boolean closeResourceRequested(ResourceProvider resource) {
+        return true;
+    }
+
+    public int getOIDType() {
+        return DataTypes.LONG;
+    }
+
+    public boolean supportsAppendMode() {
+        return false;
+    }
+
+    public void append(FeatureProvider featureProvider) {
+        try {
+            writer.add(featureProvider);
+        } catch (WriteException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    public void beginAppend() {
+        try {
+            writer = new Writer().initialice((File) resource.get(), projection);
+            writer.begin();
+        } catch (AccessResourceException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    public void endAppend() {
+        try {
+            resource.notifyOpen();
+            writer.end();
+            resource.notifyClose();
+            counterNewsOIDs = 0;
+        } catch (ResourceNotifyOpenException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ResourceNotifyCloseException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (WriteException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * @param state
+     * @throws PersistenceException
+     */
+    public void saveToState(PersistentState state) throws PersistenceException {
+        // TODO Auto-generated method stub
+        throw new NotYetImplemented();
+    }
+
+    /**
+     * @param state
+     * @throws PersistenceException
+     */
+    public void loadFromState(PersistentState state) throws PersistenceException {
+        // TODO Auto-generated method stub
+        throw new NotYetImplemented();
+    }
+
+    public Object createNewOID() {
+        return new Long(counterNewsOIDs++);
+    }
+
+    protected void initializeFeatureTypes() throws InitializeException {
+        try {
+            this.open();
+        } catch (OpenException e) {
+            throw new InitializeException(this.getProviderName(), e);
+        }
+    }
+
+    public Envelope getEnvelope() throws DataException {
+        this.open();
+        return this.envelope;
+    }
+
+    public Object getDynValue(String name) throws DynFieldNotFoundException {
+        if( DataStore.METADATA_ENVELOPE.equalsIgnoreCase(name) ) {
+            try {
+                return this.getEnvelope();
+            } catch (DataException e) {
+                return null;
+            }
+        } else {
+            if( DataStore.METADATA_CRS.equalsIgnoreCase(name) ) {
+                IProjection pro = this.getDXFParameters().getCRS();
+                if (pro != null){
+                    return pro;
+                }
+            }
+        }
+        return super.getDynValue(name);
+    }
+
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see
+     * org.gvsig.fmap.dal.resource.spi.ResourceConsumer#resourceChanged(org.
+     * gvsig.fmap.dal.resource.spi.ResourceProvider)
+     */
+    public void resourceChanged(ResourceProvider resource) {
+        this.getStoreServices().notifyChange(
+            DataStoreNotification.RESOURCE_CHANGED,
+            resource);
+    }
+
+
+    public Object getSourceId() {
+        return this.getDXFParameters().getFile();
+    }
+
+    public String getName() {
+        String name = this.getDXFParameters().getFile().getName();
+
+        return FilenameUtils.getBaseName(name);
+    }
+
+    public String getFullName() {
+        return this.getDXFParameters().getFile().getAbsolutePath();
+    }
+
+    public ResourceProvider getResource() {
+        return resource;
+    }
+
+    /* (non-Javadoc)
+     * @see org.gvsig.fmap.dal.feature.spi.memory.AbstractMemoryStoreProvider#doDispose()
+     */
+    @Override
+    protected void doDispose() throws BaseException {
+        super.doDispose();
+        resource.removeConsumer(this);
+    }
+
+}
\ No newline at end of file
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/test/java/org/gvsig/fmap/dal/store/dxf/data/prueba.dxf
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/test/java/org/gvsig/fmap/dal/store/dxf/data/prueba.dxf	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/src/test/java/org/gvsig/fmap/dal/store/dxf/data/prueba.dxf	(revision 1291)
@@ -0,0 +1,10410 @@
+999
+TRANSLATION BY geo.cresques.io.DxfFile
+999
+DATE : Thu Mar 13 09:56:42 CET 2008
+  0
+SECTION
+  2
+HEADER
+  9
+$ACADVER
+  1
+AC1015
+  9
+$INSBASE
+ 10
+0.0
+ 20
+0.0
+ 30
+0.0
+  9
+$EXTMIN
+ 10
+999999999.000000
+ 20
+999999999.000000
+ 30
+0.000000
+  9
+$EXTMAX
+ 10
+-999999999.000000
+ 20
+-999999999.000000
+ 30
+0.000000
+  9
+$LIMMIN
+ 10
+999999999.000000
+ 20
+999999999.000000
+  9
+$LIMMAX
+ 10
+-999999999.000000
+ 20
+-999999999.000000
+  9
+$ORTHOMODE
+ 70
+     0
+  9
+$REGENMODE
+ 70
+     1
+  9
+$FILLMODE
+ 70
+     1
+  9
+$QTEXTMODE
+ 70
+     0
+  9
+$MIRRTEXT
+ 70
+     1
+  9
+$DRAGMODE
+ 70
+     2
+  9
+$LTSCALE
+ 40
+1.0
+  9
+$OSMODE
+ 70
+     0
+  9
+$ATTMODE
+ 70
+     1
+  9
+$TEXTSIZE
+ 40
+0.2
+  9
+$TRACEWID
+ 40
+0.05
+  9
+$TEXTSTYLE
+  7
+STANDARD
+  9
+$CLAYER
+  8
+0
+  9
+$CELTYPE
+  6
+CONTINUOUS
+  9
+$CECOLOR
+ 62
+   256
+  9
+$DIMSCALE
+ 40
+1.0
+  9
+$DIMASZ
+ 40
+0.18
+  9
+$DIMEXO
+ 40
+0.0625
+  9
+$DIMDLI
+ 40
+0.38
+  9
+$DIMRND
+ 40
+0.0
+  9
+$DIMDLE
+ 40
+0.0
+  9
+$DIMEXE
+ 40
+0.18
+  9
+$DIMTP
+ 40
+0.0
+  9
+$DIMTM
+ 40
+0.0
+  9
+$DIMTXT
+ 40
+0.18
+  9
+$DIMCEN
+ 40
+0.09
+  9
+$DIMTSZ
+ 40
+0.0
+  9
+$DIMTOL
+ 70
+     0
+  9
+$DIMLIM
+ 70
+     0
+  9
+$DIMTIH
+ 70
+     1
+  9
+$DIMTOH
+ 70
+     1
+  9
+$DIMSE1
+ 70
+     0
+  9
+$DIMSE2
+ 70
+     0
+  9
+$DIMTAD
+ 70
+     0
+  9
+$DIMZIN
+ 70
+     0
+  9
+$DIMBLK
+  1
+
+  9
+$DIMASO
+ 70
+     1
+  9
+$DIMSHO
+ 70
+     1
+  9
+$DIMPOST
+  1
+
+  9
+$DIMAPOST
+  1
+
+  9
+$DIMALT
+ 70
+     0
+  9
+$DIMALTD
+ 70
+     2
+  9
+$DIMALTF
+ 40
+25.4
+  9
+$DIMLFAC
+ 40
+1.0
+  9
+$DIMTOFL
+ 70
+     0
+  9
+$DIMTVP
+ 40
+0.0
+  9
+$DIMTIX
+ 70
+     0
+  9
+$DIMSOXD
+ 70
+     0
+  9
+$DIMSAH
+ 70
+     0
+  9
+$DIMBLK1
+  1
+
+  9
+$DIMBLK2
+  1
+
+  9
+$DIMSTYLE
+  2
+STANDARD
+  9
+$DIMCLRD
+ 70
+     0
+  9
+$DIMCLRE
+ 70
+     0
+  9
+$DIMCLRT
+ 70
+     0
+  9
+$DIMTFAC
+ 40
+1.0
+  9
+$DIMGAP
+ 40
+0.09
+  9
+$LUNITS
+ 70
+     2
+  9
+$LUPREC
+ 70
+     4
+  9
+$AXISMODE
+ 70
+     0
+  9
+$AXISUNIT
+ 10
+0.0
+ 20
+0.0
+  9
+$SKETCHINC
+ 40
+0.1
+  9
+$FILLETRAD
+ 40
+0.0
+  9
+$AUNITS
+ 70
+     0
+  9
+$AUPREC
+ 70
+     0
+  9
+$MENU
+  1
+acad
+  9
+$ELEVATION
+ 40
+0.0
+  9
+$PELEVATION
+ 40
+0.0
+  9
+$THICKNESS
+ 40
+0.0
+  9
+$LIMCHECK
+ 70
+     0
+  9
+$BLIPMODE
+ 70
+     1
+  9
+$CHAMFERA
+ 40
+0.0
+  9
+$CHAMFERB
+ 40
+0.0
+  9
+$SKPOLY
+ 70
+     0
+  9
+$TDCREATE
+ 40
+2453116.436828704
+  9
+$TDUPDATE
+ 40
+2453116.436828704
+  9
+$TDINDWG
+ 40
+0.0000000000
+  9
+$TDUSRTIMER
+ 40
+0.0000000000
+  9
+$USRTIMER
+ 70
+     1
+  9
+$ANGBASE
+ 50
+0.0
+  9
+$ANGDIR
+ 70
+     0
+  9
+$PDMODE
+ 70
+     0
+  9
+$PDSIZE
+ 40
+0.0
+  9
+$PLINEWID
+ 40
+0.0
+  9
+$COORDS
+ 70
+     0
+  9
+$SPLFRAME
+ 70
+     0
+  9
+$SPLINETYPE
+ 70
+     6
+  9
+$SPLINESEGS
+ 70
+    10
+  9
+$ATTDIA
+ 70
+     0
+  9
+$ATTREQ
+ 70
+     1
+  9
+$HANDLING
+ 70
+     1
+  9
+$HANDSEED
+  5
+394B
+  9
+$SURFTAB1
+ 70
+     6
+  9
+$SURFTAB2
+ 70
+     6
+  9
+$SURFTYPE
+ 70
+     6
+  9
+$SURFU
+ 70
+     6
+  9
+$SURFV
+ 70
+     6
+  9
+$UCSNAME
+  2
+
+  9
+$UCSORG
+ 10
+0.0
+ 20
+0.0
+ 30
+0.0
+  9
+$UCSXDIR
+ 10
+1.0
+ 20
+0.0
+ 30
+0.0
+  9
+$UCSYDIR
+ 10
+0.0
+ 20
+1.0
+ 30
+0.0
+  9
+$PUCSNAME
+  2
+
+  9
+$PUCSORG
+ 10
+0.0
+ 20
+0.0
+ 30
+0.0
+  9
+$PUCSXDIR
+ 10
+1.0
+ 20
+0.0
+ 30
+0.0
+  9
+$PUCSYDIR
+ 10
+0.0
+ 20
+1.0
+ 30
+0.0
+  9
+$USERI1
+ 70
+     0
+  9
+$USERI2
+ 70
+     0
+  9
+$USERI3
+ 70
+     0
+  9
+$USERI4
+ 70
+     0
+  9
+$USERI5
+ 70
+     0
+  9
+$USERR1
+ 40
+0.0
+  9
+$USERR2
+ 40
+0.0
+  9
+$USERR3
+ 40
+0.0
+  9
+$USERR4
+ 40
+0.0
+  9
+$USERR5
+ 40
+0.0
+  9
+$WORLDVIEW
+ 70
+     1
+  9
+$SHADEDGE
+ 70
+     3
+  9
+$SHADEDIF
+ 70
+    70
+  9
+$TILEMODE
+ 70
+     1
+  9
+$MAXACTVP
+ 70
+    16
+  9
+$PINSBASE
+ 10
+0.0
+ 20
+0.0
+ 30
+0.0
+  9
+$PLIMCHECK
+ 70
+     0
+  9
+$PEXTMIN
+ 10
+-1.000000E+20
+ 20
+-1.000000E+20
+ 30
+-1.000000E+20
+  9
+$PEXTMAX
+ 10
+-1.000000E+20
+ 20
+-1.000000E+20
+ 30
+-1.000000E+20
+  9
+$PLIMMIN
+ 10
+0.0
+ 20
+0.0
+  9
+$PLIMMAX
+ 10
+12.0
+ 20
+9.0
+  9
+$UNITMODE
+ 70
+     0
+  9
+$VISRETAIN
+ 70
+     0
+  9
+$PLINEGEN
+ 70
+     1
+  9
+$PSLTSCALE
+ 70
+     0
+  9
+$TREEDEPTH
+ 70
+  3020
+  9
+$DWGCODEPAGE
+  3
+ansi_1252
+  0
+ENDSEC
+  0
+SECTION
+  2
+TABLES
+  0
+TABLE
+  2
+VPORT
+  5
+     8
+100
+AcDbSymbolTable
+ 70
+     0
+  0
+ENDTAB
+  0
+TABLE
+  2
+LTYPE
+  5
+     5
+100
+AcDbSymbolTable
+ 70
+     1
+  0
+LTYPE
+  5
+    14
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+  2
+ByBlock
+ 70
+     0
+  3
+
+ 72
+    65
+ 73
+     0
+ 40
+0.0000
+  0
+LTYPE
+  5
+    15
+100
+AcDbSymbolTableRecord
+100
+AcDbLinetypeTableRecord
+  2
+ByLayer
+ 70
+     0
+  3
+
+ 72
+    65
+ 73
+     0
+ 40
+0.0000
+  0
+ENDTAB
+  0
+TABLE
+  2
+LAYER
+  5
+     2
+100
+AcDbSymbolTable
+ 70
+     1
+  0
+LAYER
+  5
+    10
+100
+AcDbSymbolTableRecord
+100
+AcDbLayerTableRecord
+  2
+0
+ 70
+     0
+ 62
+     7
+  6
+CONTINUOUS
+390
+F
+  0
+ENDTAB
+  0
+TABLE
+  2
+STYLE
+  5
+     3
+100
+AcDbSymbolTable
+ 70
+     0
+  0
+STYLE
+  5
+    11
+100
+AcDbSymbolTableRecord
+100
+AcDbTextStyleTableRecord
+  2
+Standard
+ 70
+     0
+ 71
+     0
+ 40
+0.0000
+ 41
+1.0000
+ 42
+2.5000
+ 50
+0.0000
+  3
+txt
+  4
+
+  0
+ENDTAB
+  0
+TABLE
+  2
+VIEW
+  5
+     6
+100
+AcDbSymbolTable
+ 70
+     0
+  0
+ENDTAB
+  0
+TABLE
+  2
+UCS
+  5
+     7
+100
+AcDbSymbolTable
+ 70
+     0
+  0
+ENDTAB
+  0
+TABLE
+  2
+APPID
+  5
+     9
+100
+AcDbSymbolTable
+ 70
+     1
+  0
+APPID
+  5
+    12
+100
+AcDbSymbolTableRecord
+100
+AcDbRegAppTableRecord
+  2
+ACAD
+ 70
+     1
+  0
+ENDTAB
+  0
+TABLE
+  2
+DIMSTYLE
+  5
+A
+100
+AcDbSymbolTable
+ 70
+     0
+100
+AcDbDimStyleTable
+  0
+ENDTAB
+  0
+TABLE
+  2
+BLOCK_RECORD
+  5
+     1
+100
+AcDbSymbolTable
+ 70
+     1
+  0
+BLOCK_RECORD
+  5
+1F
+100
+AcDbSymbolTableRecord
+100
+AcDbBlockTableRecord
+  2
+*Model_Space
+340
+22
+  0
+BLOCK_RECORD
+  5
+1B
+100
+AcDbSymbolTableRecord
+100
+AcDbBlockTableRecord
+  2
+*Paper_Space
+340
+1E
+  0
+BLOCK_RECORD
+  5
+23
+100
+AcDbSymbolTableRecord
+100
+AcDbBlockTableRecord
+  2
+*Paper_Space0
+340
+26
+  0
+ENDTAB
+  0
+ENDSEC
+  0
+SECTION
+  2
+BLOCKS
+  0
+BLOCK
+  5
+20
+100
+AcDbEntity
+  8
+0
+100
+AcDbBlockBegin
+  2
+*Model_Space
+ 70
+     0
+ 10
+0.0000
+ 20
+0.0000
+ 30
+0.0000
+  3
+*Model_Space
+  1
+
+  0
+ENDBLK
+  5
+21
+100
+AcDbEntity
+  8
+0
+100
+AcDbBlockEnd
+  0
+BLOCK
+  5
+1C
+100
+AcDbEntity
+ 67
+     1
+  8
+0
+100
+AcDbBlockBegin
+  2
+*Paper_Space
+ 70
+     0
+ 10
+0.0000
+ 20
+0.0000
+ 30
+0.0000
+  3
+*Paper_Space
+  1
+
+  0
+ENDBLK
+  5
+1D
+100
+AcDbEntity
+ 67
+     1
+  8
+0
+100
+AcDbBlockEnd
+  0
+BLOCK
+  5
+24
+100
+AcDbEntity
+  8
+0
+100
+AcDbBlockBegin
+  2
+*Paper_Space0
+ 70
+     0
+ 10
+0.0000
+ 20
+0.0000
+ 30
+0.0000
+  3
+*Paper_Space0
+  1
+
+  0
+ENDBLK
+  5
+25
+100
+AcDbEntity
+  8
+0
+100
+AcDbBlockEnd
+  0
+ENDSEC
+  0
+SECTION
+  2
+ENTITIES
+  0
+LWPOLYLINE
+  5
+    64
+100
+AcDbEntity
+  8
+Primera
+ 62
+     0
+100
+AcDbPolyline
+ 90
+   264
+ 70
+     1
+ 38
+0.000
+ 10
+759813.387949
+ 20
+4285413.854930
+ 42
+0.000000
+ 10
+759928.208938
+ 20
+4285445.379389
+ 42
+0.000000
+ 10
+759843.259737
+ 20
+4286127.104400
+ 42
+0.000000
+ 10
+760150.094222
+ 20
+4286866.064879
+ 42
+0.000000
+ 10
+760321.572745
+ 20
+4287295.035816
+ 42
+0.000000
+ 10
+760207.429775
+ 20
+4287403.536811
+ 42
+0.000000
+ 10
+760688.379159
+ 20
+4287848.192897
+ 42
+0.000000
+ 10
+760881.917934
+ 20
+4288213.452967
+ 42
+0.000000
+ 10
+761223.246293
+ 20
+4288691.355840
+ 42
+0.000000
+ 10
+761654.494636
+ 20
+4289557.827131
+ 42
+0.000000
+ 10
+762006.942991
+ 20
+4290170.597731
+ 42
+0.000000
+ 10
+762659.927564
+ 20
+4290353.257040
+ 42
+0.000000
+ 10
+762694.463857
+ 20
+4290625.539219
+ 42
+0.000000
+ 10
+762824.411740
+ 20
+4290670.947239
+ 42
+0.000000
+ 10
+762863.432079
+ 20
+4290675.570230
+ 42
+0.000000
+ 10
+763054.523149
+ 20
+4290925.248891
+ 42
+0.000000
+ 10
+763259.610879
+ 20
+4291514.326464
+ 42
+0.000000
+ 10
+763374.071202
+ 20
+4291711.473271
+ 42
+0.000000
+ 10
+763717.086405
+ 20
+4291761.734704
+ 42
+0.000000
+ 10
+763655.069443
+ 20
+4291400.744280
+ 42
+0.000000
+ 10
+763520.598486
+ 20
+4291229.600306
+ 42
+0.000000
+ 10
+763461.290238
+ 20
+4291154.293176
+ 42
+0.000000
+ 10
+763760.288693
+ 20
+4290616.356145
+ 42
+0.000000
+ 10
+764036.518934
+ 20
+4290634.409526
+ 42
+0.000000
+ 10
+764444.376722
+ 20
+4290542.387426
+ 42
+0.000000
+ 10
+764608.794704
+ 20
+4290441.173533
+ 42
+0.000000
+ 10
+764619.172558
+ 20
+4290417.070992
+ 42
+0.000000
+ 10
+764633.824644
+ 20
+4290395.333152
+ 42
+0.000000
+ 10
+764680.131687
+ 20
+4290337.976786
+ 42
+0.000000
+ 10
+764687.384009
+ 20
+4290329.327976
+ 42
+0.000000
+ 10
+764712.878054
+ 20
+4290295.727092
+ 42
+0.000000
+ 10
+764729.159025
+ 20
+4290277.377369
+ 42
+0.000000
+ 10
+765259.755103
+ 20
+4290421.734358
+ 42
+0.000000
+ 10
+765458.639993
+ 20
+4290279.457874
+ 42
+0.000000
+ 10
+765640.231714
+ 20
+4290498.882977
+ 42
+0.000000
+ 10
+765535.110260
+ 20
+4290753.188535
+ 42
+0.000000
+ 10
+765527.558546
+ 20
+4290822.946559
+ 42
+0.000000
+ 10
+765494.464627
+ 20
+4291136.331765
+ 42
+0.000000
+ 10
+765467.729978
+ 20
+4291572.169276
+ 42
+0.000000
+ 10
+765396.532891
+ 20
+4291827.608070
+ 42
+0.000000
+ 10
+765348.515352
+ 20
+4292144.940680
+ 42
+0.000000
+ 10
+765360.924516
+ 20
+4292216.476230
+ 42
+0.000000
+ 10
+765371.520483
+ 20
+4292290.173855
+ 42
+0.000000
+ 10
+765379.396844
+ 20
+4292367.114567
+ 42
+0.000000
+ 10
+765383.037199
+ 20
+4292440.580097
+ 42
+0.000000
+ 10
+765382.404627
+ 20
+4292511.680468
+ 42
+0.000000
+ 10
+765379.052724
+ 20
+4292586.023897
+ 42
+0.000000
+ 10
+765373.240932
+ 20
+4292655.840127
+ 42
+0.000000
+ 10
+765363.877649
+ 20
+4292727.760362
+ 42
+0.000000
+ 10
+765350.592459
+ 20
+4292812.884976
+ 42
+0.000000
+ 10
+765340.545317
+ 20
+4292879.226032
+ 42
+0.000000
+ 10
+765333.901494
+ 20
+4292947.903237
+ 42
+0.000000
+ 10
+765331.920637
+ 20
+4292981.175330
+ 42
+0.000000
+ 10
+765331.641373
+ 20
+4293015.615494
+ 42
+0.000000
+ 10
+765334.967632
+ 20
+4293072.401487
+ 42
+0.000000
+ 10
+765341.956304
+ 20
+4293123.753375
+ 42
+0.000000
+ 10
+765356.101560
+ 20
+4293195.347129
+ 42
+0.000000
+ 10
+765371.301082
+ 20
+4293261.419764
+ 42
+0.000000
+ 10
+765384.077737
+ 20
+4293321.855185
+ 42
+0.000000
+ 10
+765392.767187
+ 20
+4293374.375251
+ 42
+0.000000
+ 10
+765397.831112
+ 20
+4293431.219381
+ 42
+0.000000
+ 10
+765399.067495
+ 20
+4293472.377858
+ 42
+0.000000
+ 10
+765560.031191
+ 20
+4293473.309267
+ 42
+0.000000
+ 10
+765750.308079
+ 20
+4293326.312531
+ 42
+0.000000
+ 10
+765929.581318
+ 20
+4293222.291605
+ 42
+0.000000
+ 10
+766030.271882
+ 20
+4293100.086030
+ 42
+0.000000
+ 10
+766310.135868
+ 20
+4293007.218974
+ 42
+0.000000
+ 10
+766669.633560
+ 20
+4293420.446517
+ 42
+0.000000
+ 10
+766992.245427
+ 20
+4293583.524390
+ 42
+0.000000
+ 10
+767280.336140
+ 20
+4293556.534709
+ 42
+0.000000
+ 10
+767457.837595
+ 20
+4293609.180546
+ 42
+0.000000
+ 10
+767647.850499
+ 20
+4293367.756734
+ 42
+0.000000
+ 10
+767667.495492
+ 20
+4293042.806791
+ 42
+0.000000
+ 10
+767904.272112
+ 20
+4292240.642804
+ 42
+0.000000
+ 10
+768076.401200
+ 20
+4291756.359080
+ 42
+0.000000
+ 10
+768262.111468
+ 20
+4291592.591707
+ 42
+0.000000
+ 10
+768429.027506
+ 20
+4291263.720254
+ 42
+0.000000
+ 10
+768432.767870
+ 20
+4291256.067338
+ 42
+0.000000
+ 10
+768490.866302
+ 20
+4290979.090161
+ 42
+0.000000
+ 10
+768534.852594
+ 20
+4290784.984862
+ 42
+0.000000
+ 10
+768484.128425
+ 20
+4290585.460198
+ 42
+0.000000
+ 10
+768265.191213
+ 20
+4290288.024318
+ 42
+0.000000
+ 10
+768274.778888
+ 20
+4289590.449748
+ 42
+0.000000
+ 10
+768070.700437
+ 20
+4289290.189759
+ 42
+0.000000
+ 10
+768027.382808
+ 20
+4288663.070460
+ 42
+0.000000
+ 10
+768057.779244
+ 20
+4288355.153494
+ 42
+0.000000
+ 10
+767997.738994
+ 20
+4288302.012536
+ 42
+0.000000
+ 10
+768015.050934
+ 20
+4288279.258107
+ 42
+0.000000
+ 10
+768005.808424
+ 20
+4288243.385513
+ 42
+0.000000
+ 10
+767996.154794
+ 20
+4288219.723348
+ 42
+0.000000
+ 10
+767983.779418
+ 20
+4288199.303472
+ 42
+0.000000
+ 10
+767976.623167
+ 20
+4288179.059289
+ 42
+0.000000
+ 10
+767976.500541
+ 20
+4288156.829262
+ 42
+0.000000
+ 10
+767983.475783
+ 20
+4288104.833175
+ 42
+0.000000
+ 10
+767993.706416
+ 20
+4288059.614435
+ 42
+0.000000
+ 10
+768004.871232
+ 20
+4287986.644773
+ 42
+0.000000
+ 10
+768008.778106
+ 20
+4287922.321175
+ 42
+0.000000
+ 10
+768008.858554
+ 20
+4287842.310660
+ 42
+0.000000
+ 10
+768005.293641
+ 20
+4287818.853484
+ 42
+0.000000
+ 10
+767982.307875
+ 20
+4287751.402204
+ 42
+0.000000
+ 10
+768071.559210
+ 20
+4287454.356794
+ 42
+0.000000
+ 10
+768253.269975
+ 20
+4287670.510851
+ 42
+0.000000
+ 10
+768360.766823
+ 20
+4287788.596658
+ 42
+0.000000
+ 10
+768723.390684
+ 20
+4287753.040207
+ 42
+0.000000
+ 10
+768946.607088
+ 20
+4287848.369507
+ 42
+0.000000
+ 10
+769158.707565
+ 20
+4287834.421504
+ 42
+0.000000
+ 10
+769351.633352
+ 20
+4287666.469561
+ 42
+0.000000
+ 10
+769562.524091
+ 20
+4287456.899844
+ 42
+0.000000
+ 10
+769635.358139
+ 20
+4287389.352842
+ 42
+0.000000
+ 10
+769664.136597
+ 20
+4287362.544436
+ 42
+0.000000
+ 10
+769783.597105
+ 20
+4287229.898700
+ 42
+0.000000
+ 10
+769786.432661
+ 20
+4287223.326866
+ 42
+0.000000
+ 10
+769802.919618
+ 20
+4287199.436454
+ 42
+0.000000
+ 10
+769822.016626
+ 20
+4287175.634494
+ 42
+0.000000
+ 10
+769830.072149
+ 20
+4287169.239521
+ 42
+0.000000
+ 10
+769841.908512
+ 20
+4287154.082133
+ 42
+0.000000
+ 10
+769860.817676
+ 20
+4287135.830460
+ 42
+0.000000
+ 10
+769876.853647
+ 20
+4287125.260676
+ 42
+0.000000
+ 10
+769894.592033
+ 20
+4287115.859926
+ 42
+0.000000
+ 10
+769909.645242
+ 20
+4287108.590844
+ 42
+0.000000
+ 10
+769972.167348
+ 20
+4287088.483588
+ 42
+0.000000
+ 10
+770013.772198
+ 20
+4287068.778949
+ 42
+0.000000
+ 10
+770074.098979
+ 20
+4287036.373521
+ 42
+0.000000
+ 10
+770138.926901
+ 20
+4286999.675898
+ 42
+0.000000
+ 10
+770214.078750
+ 20
+4286941.102608
+ 42
+0.000000
+ 10
+770234.348899
+ 20
+4286908.450729
+ 42
+0.000000
+ 10
+770246.073418
+ 20
+4286896.624011
+ 42
+0.000000
+ 10
+770295.962234
+ 20
+4286863.865932
+ 42
+0.000000
+ 10
+770328.300244
+ 20
+4286834.957739
+ 42
+0.000000
+ 10
+770327.265297
+ 20
+4286737.126431
+ 42
+0.000000
+ 10
+770327.491330
+ 20
+4286730.466181
+ 42
+0.000000
+ 10
+770327.299388
+ 20
+4286710.455905
+ 42
+0.000000
+ 10
+770328.840323
+ 20
+4286639.383717
+ 42
+0.000000
+ 10
+770269.582652
+ 20
+4286511.793863
+ 42
+0.000000
+ 10
+770221.939127
+ 20
+4286401.268366
+ 42
+0.000000
+ 10
+770185.571775
+ 20
+4286317.797335
+ 42
+0.000000
+ 10
+770152.081665
+ 20
+4286252.205188
+ 42
+0.000000
+ 10
+770145.831773
+ 20
+4286205.317944
+ 42
+0.000000
+ 10
+770145.563923
+ 20
+4286187.527793
+ 42
+0.000000
+ 10
+770147.454676
+ 20
+4286183.146639
+ 42
+0.000000
+ 10
+770154.067971
+ 20
+4286142.252169
+ 42
+0.000000
+ 10
+770162.685009
+ 20
+4286093.646430
+ 42
+0.000000
+ 10
+770168.696130
+ 20
+4286070.512615
+ 42
+0.000000
+ 10
+770192.515018
+ 20
+4285984.637633
+ 42
+0.000000
+ 10
+770213.389371
+ 20
+4285934.224974
+ 42
+0.000000
+ 10
+770239.367589
+ 20
+4285861.759114
+ 42
+0.000000
+ 10
+770270.567045
+ 20
+4285789.470411
+ 42
+0.000000
+ 10
+770288.229355
+ 20
+4285756.730011
+ 42
+0.000000
+ 10
+770315.195799
+ 20
+4285706.524191
+ 42
+0.000000
+ 10
+770342.459883
+ 20
+4285621.877677
+ 42
+0.000000
+ 10
+770355.165447
+ 20
+4285581.189984
+ 42
+0.000000
+ 10
+770364.959311
+ 20
+4285549.294056
+ 42
+0.000000
+ 10
+770390.446252
+ 20
+4285465.698662
+ 42
+0.000000
+ 10
+770413.402231
+ 20
+4285405.355116
+ 42
+0.000000
+ 10
+770427.656611
+ 20
+4285344.716320
+ 42
+0.000000
+ 10
+769961.380388
+ 20
+4285298.901450
+ 42
+0.000000
+ 10
+769586.889423
+ 20
+4285115.082553
+ 42
+0.000000
+ 10
+769480.398489
+ 20
+4284889.219729
+ 42
+0.000000
+ 10
+769163.319784
+ 20
+4284604.013622
+ 42
+0.000000
+ 10
+768984.191639
+ 20
+4284361.260020
+ 42
+0.000000
+ 10
+768691.472114
+ 20
+4284153.577500
+ 42
+0.000000
+ 10
+768754.927574
+ 20
+4283951.238106
+ 42
+0.000000
+ 10
+768571.979893
+ 20
+4283691.698227
+ 42
+0.000000
+ 10
+768416.964126
+ 20
+4283559.790980
+ 42
+0.000000
+ 10
+768415.143991
+ 20
+4283639.742625
+ 42
+0.000000
+ 10
+768390.448468
+ 20
+4283674.472597
+ 42
+0.000000
+ 10
+768379.513956
+ 20
+4283766.341630
+ 42
+0.000000
+ 10
+768375.658910
+ 20
+4283777.324769
+ 42
+0.000000
+ 10
+768377.223734
+ 20
+4283808.493576
+ 42
+0.000000
+ 10
+768379.274285
+ 20
+4283825.231959
+ 42
+0.000000
+ 10
+768356.357446
+ 20
+4283858.910570
+ 42
+0.000000
+ 10
+768342.357286
+ 20
+4283860.661927
+ 42
+0.000000
+ 10
+768312.119539
+ 20
+4283852.976516
+ 42
+0.000000
+ 10
+768289.031239
+ 20
+4283839.975358
+ 42
+0.000000
+ 10
+768259.663721
+ 20
+4283832.319441
+ 42
+0.000000
+ 10
+768199.983516
+ 20
+4283819.198726
+ 42
+0.000000
+ 10
+768158.207037
+ 20
+4283817.793505
+ 42
+0.000000
+ 10
+768146.855242
+ 20
+4283818.522994
+ 42
+0.000000
+ 10
+768106.457980
+ 20
+4283853.836913
+ 42
+0.000000
+ 10
+768099.271305
+ 20
+4283860.262967
+ 42
+0.000000
+ 10
+768045.185007
+ 20
+4283914.008719
+ 42
+0.000000
+ 10
+768012.845519
+ 20
+4283942.926235
+ 42
+0.000000
+ 10
+767980.804760
+ 20
+4283962.963615
+ 42
+0.000000
+ 10
+767959.618454
+ 20
+4283971.141786
+ 42
+0.000000
+ 10
+767930.872716
+ 20
+4283996.846523
+ 42
+0.000000
+ 10
+767915.554989
+ 20
+4284011.889743
+ 42
+0.000000
+ 10
+767904.738120
+ 20
+4284022.639095
+ 42
+0.000000
+ 10
+767859.208156
+ 20
+4284081.118594
+ 42
+0.000000
+ 10
+767848.242272
+ 20
+4284096.308141
+ 42
+0.000000
+ 10
+767830.388539
+ 20
+4284109.043723
+ 42
+0.000000
+ 10
+767827.703025
+ 20
+4284111.176070
+ 42
+0.000000
+ 10
+767778.145421
+ 20
+4284133.959545
+ 42
+0.000000
+ 10
+767752.049037
+ 20
+4284158.642541
+ 42
+0.000000
+ 10
+767706.918024
+ 20
+4284179.352526
+ 42
+0.000000
+ 10
+767697.954086
+ 20
+4284186.830491
+ 42
+0.000000
+ 10
+767673.673265
+ 20
+4284209.352111
+ 42
+0.000000
+ 10
+767618.684595
+ 20
+4284264.181315
+ 42
+0.000000
+ 10
+767576.588594
+ 20
+4284298.329233
+ 42
+0.000000
+ 10
+767557.753700
+ 20
+4284314.366263
+ 42
+0.000000
+ 10
+767541.753264
+ 20
+4284323.830772
+ 42
+0.000000
+ 10
+767526.219417
+ 20
+4284501.114495
+ 42
+0.000000
+ 10
+767528.561716
+ 20
+4284638.992074
+ 42
+0.000000
+ 10
+767531.600854
+ 20
+4284808.008996
+ 42
+0.000000
+ 10
+767496.097116
+ 20
+4284853.491199
+ 42
+0.000000
+ 10
+767496.594789
+ 20
+4284864.620724
+ 42
+0.000000
+ 10
+767466.722564
+ 20
+4284898.067934
+ 42
+0.000000
+ 10
+767461.253923
+ 20
+4284931.222871
+ 42
+0.000000
+ 10
+767371.368528
+ 20
+4285091.565250
+ 42
+0.000000
+ 10
+767298.950696
+ 20
+4285224.712239
+ 42
+0.000000
+ 10
+767257.372633
+ 20
+4285295.550967
+ 42
+0.000000
+ 10
+767203.100821
+ 20
+4285329.291982
+ 42
+0.000000
+ 10
+766963.832930
+ 20
+4285502.410921
+ 42
+0.000000
+ 10
+766934.247043
+ 20
+4285891.478101
+ 42
+0.000000
+ 10
+766574.769850
+ 20
+4285804.987331
+ 42
+0.000000
+ 10
+766437.530460
+ 20
+4285819.288508
+ 42
+0.000000
+ 10
+766196.765525
+ 20
+4285855.691725
+ 42
+0.000000
+ 10
+766132.397176
+ 20
+4285826.870992
+ 42
+0.000000
+ 10
+766030.225148
+ 20
+4285782.342046
+ 42
+0.000000
+ 10
+765763.173326
+ 20
+4285666.748770
+ 42
+0.000000
+ 10
+765368.985866
+ 20
+4285628.051932
+ 42
+0.000000
+ 10
+765278.478713
+ 20
+4285416.121833
+ 42
+0.000000
+ 10
+765293.667385
+ 20
+4285247.716413
+ 42
+0.000000
+ 10
+765265.281641
+ 20
+4284948.954825
+ 42
+0.000000
+ 10
+765000.340662
+ 20
+4285187.950436
+ 42
+0.000000
+ 10
+764837.478864
+ 20
+4285108.082614
+ 42
+0.000000
+ 10
+764562.624551
+ 20
+4285410.102964
+ 42
+0.000000
+ 10
+764513.527754
+ 20
+4285419.585553
+ 42
+0.000000
+ 10
+764356.482504
+ 20
+4285453.267677
+ 42
+0.000000
+ 10
+764332.426652
+ 20
+4285416.909787
+ 42
+0.000000
+ 10
+764321.703863
+ 20
+4285398.774169
+ 42
+0.000000
+ 10
+764317.366626
+ 20
+4285371.960408
+ 42
+0.000000
+ 10
+764323.668805
+ 20
+4285313.273433
+ 42
+0.000000
+ 10
+764328.230697
+ 20
+4285254.528737
+ 42
+0.000000
+ 10
+764336.434054
+ 20
+4285164.789959
+ 42
+0.000000
+ 10
+764342.455281
+ 20
+4285088.313752
+ 42
+0.000000
+ 10
+764867.649923
+ 20
+4284331.209813
+ 42
+0.000000
+ 10
+764784.973807
+ 20
+4284197.335786
+ 42
+0.000000
+ 10
+764581.245339
+ 20
+4283930.539905
+ 42
+0.000000
+ 10
+764371.723877
+ 20
+4283838.023533
+ 42
+0.000000
+ 10
+764085.731898
+ 20
+4283791.874308
+ 42
+0.000000
+ 10
+764078.622247
+ 20
+4283796.083773
+ 42
+0.000000
+ 10
+763947.611294
+ 20
+4283937.317599
+ 42
+0.000000
+ 10
+763686.489317
+ 20
+4283824.220619
+ 42
+0.000000
+ 10
+763649.983368
+ 20
+4283795.232449
+ 42
+0.000000
+ 10
+763332.082118
+ 20
+4283528.031906
+ 42
+0.000000
+ 10
+762790.181908
+ 20
+4283130.115007
+ 42
+0.000000
+ 10
+762535.400687
+ 20
+4282876.143425
+ 42
+0.000000
+ 10
+762113.509902
+ 20
+4282642.245710
+ 42
+0.000000
+ 10
+761375.407776
+ 20
+4282324.664595
+ 42
+0.000000
+ 10
+761363.403085
+ 20
+4282318.715205
+ 42
+0.000000
+ 10
+761105.605449
+ 20
+4282208.041609
+ 42
+0.000000
+ 10
+760535.067388
+ 20
+4281533.781920
+ 42
+0.000000
+ 10
+760092.957447
+ 20
+4281782.708754
+ 42
+0.000000
+ 10
+757189.414866
+ 20
+4283375.312008
+ 42
+0.000000
+ 10
+757528.306682
+ 20
+4283699.598134
+ 42
+0.000000
+ 10
+757623.161503
+ 20
+4283783.777597
+ 42
+0.000000
+ 10
+757864.164946
+ 20
+4284036.025799
+ 42
+0.000000
+ 10
+758307.080649
+ 20
+4284562.615830
+ 42
+0.000000
+ 10
+758325.541656
+ 20
+4284584.326435
+ 42
+0.000000
+ 10
+758862.088852
+ 20
+4285364.004333
+ 42
+0.000000
+ 10
+759109.905885
+ 20
+4285216.492807
+ 42
+0.000000
+ 10
+759607.998702
+ 20
+4285354.934848
+ 42
+0.000000
+ 10
+759813.387949
+ 20
+4285413.854930
+ 42
+0.000000
+ 10
+759813.387949
+ 20
+4285413.854930
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    65
+100
+AcDbEntity
+  8
+Segunda
+ 62
+     1
+100
+AcDbPolyline
+ 90
+    85
+ 70
+     1
+ 38
+0.000
+ 10
+774285.408273
+ 20
+4292648.256148
+ 42
+0.000000
+ 10
+774295.622883
+ 20
+4292629.715076
+ 42
+0.000000
+ 10
+774755.785965
+ 20
+4291857.631732
+ 42
+0.000000
+ 10
+774770.900050
+ 20
+4291873.713327
+ 42
+0.000000
+ 10
+774787.868143
+ 20
+4291886.524865
+ 42
+0.000000
+ 10
+774793.008426
+ 20
+4291888.925256
+ 42
+0.000000
+ 10
+774803.442421
+ 20
+4291889.285807
+ 42
+0.000000
+ 10
+774822.916669
+ 20
+4291879.956312
+ 42
+0.000000
+ 10
+774839.143143
+ 20
+4291863.846300
+ 42
+0.000000
+ 10
+774872.389537
+ 20
+4291758.302287
+ 42
+0.000000
+ 10
+774890.266215
+ 20
+4291694.459775
+ 42
+0.000000
+ 10
+776091.933898
+ 20
+4290532.440122
+ 42
+0.000000
+ 10
+776446.478754
+ 20
+4290226.890576
+ 42
+0.000000
+ 10
+776168.022128
+ 20
+4289870.464463
+ 42
+0.000000
+ 10
+775848.069111
+ 20
+4289680.432523
+ 42
+0.000000
+ 10
+775579.985123
+ 20
+4289626.688920
+ 42
+0.000000
+ 10
+775387.929154
+ 20
+4289464.446350
+ 42
+0.000000
+ 10
+775354.490998
+ 20
+4289122.093611
+ 42
+0.000000
+ 10
+775211.537175
+ 20
+4288899.318118
+ 42
+0.000000
+ 10
+775193.859233
+ 20
+4288705.326153
+ 42
+0.000000
+ 10
+774503.632887
+ 20
+4287986.886218
+ 42
+0.000000
+ 10
+774389.717982
+ 20
+4288158.556637
+ 42
+0.000000
+ 10
+774212.268041
+ 20
+4288430.285873
+ 42
+0.000000
+ 10
+774003.777952
+ 20
+4288921.000766
+ 42
+0.000000
+ 10
+773681.518314
+ 20
+4289302.226399
+ 42
+0.000000
+ 10
+773657.949942
+ 20
+4289329.200151
+ 42
+0.000000
+ 10
+773613.499287
+ 20
+4289381.017438
+ 42
+0.000000
+ 10
+773568.064958
+ 20
+4289436.135210
+ 42
+0.000000
+ 10
+773551.722483
+ 20
+4289455.578045
+ 42
+0.000000
+ 10
+773547.221074
+ 20
+4289459.868784
+ 42
+0.000000
+ 10
+773444.674163
+ 20
+4289555.256145
+ 42
+0.000000
+ 10
+773436.388761
+ 20
+4289568.307833
+ 42
+0.000000
+ 10
+773380.145767
+ 20
+4289608.607398
+ 42
+0.000000
+ 10
+773342.358445
+ 20
+4289643.984388
+ 42
+0.000000
+ 10
+773239.130239
+ 20
+4289759.355111
+ 42
+0.000000
+ 10
+773148.385699
+ 20
+4289866.264548
+ 42
+0.000000
+ 10
+773120.472157
+ 20
+4289893.090458
+ 42
+0.000000
+ 10
+772991.349761
+ 20
+4290002.018328
+ 42
+0.000000
+ 10
+772976.069882
+ 20
+4290015.941796
+ 42
+0.000000
+ 10
+772687.471508
+ 20
+4291119.626057
+ 42
+0.000000
+ 10
+772646.453989
+ 20
+4291274.921454
+ 42
+0.000000
+ 10
+772443.495770
+ 20
+4291329.091512
+ 42
+0.000000
+ 10
+772052.446817
+ 20
+4291435.732230
+ 42
+0.000000
+ 10
+771115.230031
+ 20
+4291782.696424
+ 42
+0.000000
+ 10
+771132.316082
+ 20
+4291817.730497
+ 42
+0.000000
+ 10
+771150.499589
+ 20
+4291820.573153
+ 42
+0.000000
+ 10
+771167.397235
+ 20
+4291835.596758
+ 42
+0.000000
+ 10
+771160.894489
+ 20
+4291847.599777
+ 42
+0.000000
+ 10
+771143.957983
+ 20
+4291859.247042
+ 42
+0.000000
+ 10
+771127.664913
+ 20
+4291852.023483
+ 42
+0.000000
+ 10
+771112.506205
+ 20
+4291837.059248
+ 42
+0.000000
+ 10
+771040.943711
+ 20
+4291842.399241
+ 42
+0.000000
+ 10
+770632.523236
+ 20
+4292281.914291
+ 42
+0.000000
+ 10
+770634.981648
+ 20
+4292363.125480
+ 42
+0.000000
+ 10
+770639.480285
+ 20
+4292384.393988
+ 42
+0.000000
+ 10
+770646.662718
+ 20
+4292403.531184
+ 42
+0.000000
+ 10
+770650.972355
+ 20
+4292430.349953
+ 42
+0.000000
+ 10
+770653.429455
+ 20
+4292434.878939
+ 42
+0.000000
+ 10
+770667.718261
+ 20
+4292449.812729
+ 42
+0.000000
+ 10
+770671.725223
+ 20
+4292459.951167
+ 42
+0.000000
+ 10
+770675.316475
+ 20
+4292482.300158
+ 42
+0.000000
+ 10
+770678.453997
+ 20
+4292492.409003
+ 42
+0.000000
+ 10
+770675.997147
+ 20
+4292513.440758
+ 42
+0.000000
+ 10
+770930.391836
+ 20
+4292583.229282
+ 42
+0.000000
+ 10
+770965.199442
+ 20
+4292787.790831
+ 42
+0.000000
+ 10
+771439.188815
+ 20
+4292926.208528
+ 42
+0.000000
+ 10
+772276.293033
+ 20
+4293059.303152
+ 42
+0.000000
+ 10
+772424.610681
+ 20
+4293074.386888
+ 42
+0.000000
+ 10
+772621.738584
+ 20
+4293036.690532
+ 42
+0.000000
+ 10
+772695.627823
+ 20
+4293064.786224
+ 42
+0.000000
+ 10
+772702.354207
+ 20
+4293071.685146
+ 42
+0.000000
+ 10
+772742.382757
+ 20
+4293071.947075
+ 42
+0.000000
+ 10
+772752.815054
+ 20
+4293072.305017
+ 42
+0.000000
+ 10
+772778.369261
+ 20
+4293063.179594
+ 42
+0.000000
+ 10
+772800.369902
+ 20
+4293056.155025
+ 42
+0.000000
+ 10
+772826.412609
+ 20
+4293058.160150
+ 42
+0.000000
+ 10
+772850.342546
+ 20
+4293045.645108
+ 42
+0.000000
+ 10
+772868.110812
+ 20
+4293035.141354
+ 42
+0.000000
+ 10
+772875.446759
+ 20
+4293024.279523
+ 42
+0.000000
+ 10
+773432.791692
+ 20
+4292914.511740
+ 42
+0.000000
+ 10
+773745.874126
+ 20
+4292846.378871
+ 42
+0.000000
+ 10
+773782.273764
+ 20
+4292850.966462
+ 42
+0.000000
+ 10
+773888.589020
+ 20
+4292796.836939
+ 42
+0.000000
+ 10
+774285.408273
+ 20
+4292648.256148
+ 42
+0.000000
+ 10
+774285.408273
+ 20
+4292648.256148
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    66
+100
+AcDbEntity
+  8
+Tercera
+ 62
+     2
+100
+AcDbPolyline
+ 90
+   135
+ 70
+     1
+ 38
+0.000
+ 10
+764118.574530
+ 20
+4280562.597719
+ 42
+0.000000
+ 10
+763818.747665
+ 20
+4280324.879106
+ 42
+0.000000
+ 10
+763864.370505
+ 20
+4280078.583073
+ 42
+0.000000
+ 10
+763741.269156
+ 20
+4279978.949183
+ 42
+0.000000
+ 10
+763881.196862
+ 20
+4279806.888204
+ 42
+0.000000
+ 10
+763697.907409
+ 20
+4279681.930360
+ 42
+0.000000
+ 10
+763297.465603
+ 20
+4279903.181134
+ 42
+0.000000
+ 10
+762739.922206
+ 20
+4280104.831626
+ 42
+0.000000
+ 10
+762586.274219
+ 20
+4280111.999008
+ 42
+0.000000
+ 10
+762379.957486
+ 20
+4280263.006630
+ 42
+0.000000
+ 10
+762035.392617
+ 20
+4280403.922898
+ 42
+0.000000
+ 10
+761966.335072
+ 20
+4280542.779355
+ 42
+0.000000
+ 10
+761757.511731
+ 20
+4280611.489714
+ 42
+0.000000
+ 10
+761769.662517
+ 20
+4280931.915581
+ 42
+0.000000
+ 10
+761701.459733
+ 20
+4280965.237185
+ 42
+0.000000
+ 10
+761661.626767
+ 20
+4280983.932656
+ 42
+0.000000
+ 10
+761570.352398
+ 20
+4281029.833259
+ 42
+0.000000
+ 10
+761548.223317
+ 20
+4281040.219955
+ 42
+0.000000
+ 10
+760535.067388
+ 20
+4281533.781920
+ 42
+0.000000
+ 10
+761105.605449
+ 20
+4282208.041609
+ 42
+0.000000
+ 10
+761363.403085
+ 20
+4282318.715205
+ 42
+0.000000
+ 10
+761375.407776
+ 20
+4282324.664595
+ 42
+0.000000
+ 10
+762113.509902
+ 20
+4282642.245710
+ 42
+0.000000
+ 10
+762535.400687
+ 20
+4282876.143425
+ 42
+0.000000
+ 10
+762790.181908
+ 20
+4283130.115007
+ 42
+0.000000
+ 10
+763332.082118
+ 20
+4283528.031906
+ 42
+0.000000
+ 10
+763649.983368
+ 20
+4283795.232449
+ 42
+0.000000
+ 10
+763686.489317
+ 20
+4283824.220619
+ 42
+0.000000
+ 10
+763947.611294
+ 20
+4283937.317599
+ 42
+0.000000
+ 10
+764078.622247
+ 20
+4283796.083773
+ 42
+0.000000
+ 10
+764085.731898
+ 20
+4283791.874308
+ 42
+0.000000
+ 10
+764371.723877
+ 20
+4283838.023533
+ 42
+0.000000
+ 10
+764581.245339
+ 20
+4283930.539905
+ 42
+0.000000
+ 10
+764784.973807
+ 20
+4284197.335786
+ 42
+0.000000
+ 10
+764867.649923
+ 20
+4284331.209813
+ 42
+0.000000
+ 10
+764342.455281
+ 20
+4285088.313752
+ 42
+0.000000
+ 10
+764336.434054
+ 20
+4285164.789959
+ 42
+0.000000
+ 10
+764328.230697
+ 20
+4285254.528737
+ 42
+0.000000
+ 10
+764323.668805
+ 20
+4285313.273433
+ 42
+0.000000
+ 10
+764317.366626
+ 20
+4285371.960408
+ 42
+0.000000
+ 10
+764321.703863
+ 20
+4285398.774169
+ 42
+0.000000
+ 10
+764332.426652
+ 20
+4285416.909787
+ 42
+0.000000
+ 10
+764356.482504
+ 20
+4285453.267677
+ 42
+0.000000
+ 10
+764513.527754
+ 20
+4285419.585553
+ 42
+0.000000
+ 10
+764562.624551
+ 20
+4285410.102964
+ 42
+0.000000
+ 10
+764837.478864
+ 20
+4285108.082614
+ 42
+0.000000
+ 10
+765000.340662
+ 20
+4285187.950436
+ 42
+0.000000
+ 10
+765265.281641
+ 20
+4284948.954825
+ 42
+0.000000
+ 10
+765293.667385
+ 20
+4285247.716413
+ 42
+0.000000
+ 10
+765278.478713
+ 20
+4285416.121833
+ 42
+0.000000
+ 10
+765368.985866
+ 20
+4285628.051932
+ 42
+0.000000
+ 10
+765763.173326
+ 20
+4285666.748770
+ 42
+0.000000
+ 10
+766030.225148
+ 20
+4285782.342046
+ 42
+0.000000
+ 10
+766132.397176
+ 20
+4285826.870992
+ 42
+0.000000
+ 10
+766196.765525
+ 20
+4285855.691725
+ 42
+0.000000
+ 10
+766437.530460
+ 20
+4285819.288508
+ 42
+0.000000
+ 10
+766574.769850
+ 20
+4285804.987331
+ 42
+0.000000
+ 10
+766934.247043
+ 20
+4285891.478101
+ 42
+0.000000
+ 10
+766963.832930
+ 20
+4285502.410921
+ 42
+0.000000
+ 10
+767203.100821
+ 20
+4285329.291982
+ 42
+0.000000
+ 10
+767257.372633
+ 20
+4285295.550967
+ 42
+0.000000
+ 10
+767298.950696
+ 20
+4285224.712239
+ 42
+0.000000
+ 10
+767371.368528
+ 20
+4285091.565250
+ 42
+0.000000
+ 10
+767461.253923
+ 20
+4284931.222871
+ 42
+0.000000
+ 10
+767466.722564
+ 20
+4284898.067934
+ 42
+0.000000
+ 10
+767496.594789
+ 20
+4284864.620724
+ 42
+0.000000
+ 10
+767496.097116
+ 20
+4284853.491199
+ 42
+0.000000
+ 10
+767531.600854
+ 20
+4284808.008996
+ 42
+0.000000
+ 10
+767528.561716
+ 20
+4284638.992074
+ 42
+0.000000
+ 10
+767526.219417
+ 20
+4284501.114495
+ 42
+0.000000
+ 10
+767541.753264
+ 20
+4284323.830772
+ 42
+0.000000
+ 10
+767557.753700
+ 20
+4284314.366263
+ 42
+0.000000
+ 10
+767576.588594
+ 20
+4284298.329233
+ 42
+0.000000
+ 10
+767618.684595
+ 20
+4284264.181315
+ 42
+0.000000
+ 10
+767673.673265
+ 20
+4284209.352111
+ 42
+0.000000
+ 10
+767697.954086
+ 20
+4284186.830491
+ 42
+0.000000
+ 10
+767706.918024
+ 20
+4284179.352526
+ 42
+0.000000
+ 10
+767752.049037
+ 20
+4284158.642541
+ 42
+0.000000
+ 10
+767778.145421
+ 20
+4284133.959545
+ 42
+0.000000
+ 10
+767827.703025
+ 20
+4284111.176070
+ 42
+0.000000
+ 10
+767830.388539
+ 20
+4284109.043723
+ 42
+0.000000
+ 10
+767848.242272
+ 20
+4284096.308141
+ 42
+0.000000
+ 10
+767859.208156
+ 20
+4284081.118594
+ 42
+0.000000
+ 10
+767904.738120
+ 20
+4284022.639095
+ 42
+0.000000
+ 10
+767915.554989
+ 20
+4284011.889743
+ 42
+0.000000
+ 10
+767930.872716
+ 20
+4283996.846523
+ 42
+0.000000
+ 10
+767959.618454
+ 20
+4283971.141786
+ 42
+0.000000
+ 10
+767980.804760
+ 20
+4283962.963615
+ 42
+0.000000
+ 10
+768012.845519
+ 20
+4283942.926235
+ 42
+0.000000
+ 10
+768045.185007
+ 20
+4283914.008719
+ 42
+0.000000
+ 10
+768099.271305
+ 20
+4283860.262967
+ 42
+0.000000
+ 10
+768106.457980
+ 20
+4283853.836913
+ 42
+0.000000
+ 10
+768146.855242
+ 20
+4283818.522994
+ 42
+0.000000
+ 10
+768158.207037
+ 20
+4283817.793505
+ 42
+0.000000
+ 10
+768199.983516
+ 20
+4283819.198726
+ 42
+0.000000
+ 10
+768259.663721
+ 20
+4283832.319441
+ 42
+0.000000
+ 10
+768289.031239
+ 20
+4283839.975358
+ 42
+0.000000
+ 10
+768312.119539
+ 20
+4283852.976516
+ 42
+0.000000
+ 10
+768342.357286
+ 20
+4283860.661927
+ 42
+0.000000
+ 10
+768356.357446
+ 20
+4283858.910570
+ 42
+0.000000
+ 10
+768379.274285
+ 20
+4283825.231959
+ 42
+0.000000
+ 10
+768377.223734
+ 20
+4283808.493576
+ 42
+0.000000
+ 10
+768375.658910
+ 20
+4283777.324769
+ 42
+0.000000
+ 10
+768379.513956
+ 20
+4283766.341630
+ 42
+0.000000
+ 10
+768390.448468
+ 20
+4283674.472597
+ 42
+0.000000
+ 10
+768415.143991
+ 20
+4283639.742625
+ 42
+0.000000
+ 10
+768416.964126
+ 20
+4283559.790980
+ 42
+0.000000
+ 10
+768266.829457
+ 20
+4283438.053019
+ 42
+0.000000
+ 10
+768225.168019
+ 20
+4283277.737345
+ 42
+0.000000
+ 10
+768082.337109
+ 20
+4283094.017294
+ 42
+0.000000
+ 10
+767847.279383
+ 20
+4282776.071135
+ 42
+0.000000
+ 10
+767977.162397
+ 20
+4282619.298074
+ 42
+0.000000
+ 10
+767905.295840
+ 20
+4282475.750961
+ 42
+0.000000
+ 10
+767642.456046
+ 20
+4282205.776606
+ 42
+0.000000
+ 10
+767523.631031
+ 20
+4281565.029399
+ 42
+0.000000
+ 10
+767708.577004
+ 20
+4281507.889996
+ 42
+0.000000
+ 10
+767676.824881
+ 20
+4281311.239929
+ 42
+0.000000
+ 10
+767738.265882
+ 20
+4281116.605212
+ 42
+0.000000
+ 10
+767870.046299
+ 20
+4280929.887923
+ 42
+0.000000
+ 10
+768136.080379
+ 20
+4280846.585898
+ 42
+0.000000
+ 10
+768392.533939
+ 20
+4280504.040882
+ 42
+0.000000
+ 10
+767832.674672
+ 20
+4280563.023271
+ 42
+0.000000
+ 10
+767668.737568
+ 20
+4280590.861798
+ 42
+0.000000
+ 10
+767367.077921
+ 20
+4280670.763495
+ 42
+0.000000
+ 10
+766952.837369
+ 20
+4281380.332005
+ 42
+0.000000
+ 10
+766343.860038
+ 20
+4281451.104285
+ 42
+0.000000
+ 10
+766187.265984
+ 20
+4281547.003127
+ 42
+0.000000
+ 10
+765412.407920
+ 20
+4281470.071927
+ 42
+0.000000
+ 10
+765198.502588
+ 20
+4281455.180527
+ 42
+0.000000
+ 10
+764928.373572
+ 20
+4281296.188584
+ 42
+0.000000
+ 10
+764805.746629
+ 20
+4281183.216238
+ 42
+0.000000
+ 10
+764594.496645
+ 20
+4281061.750814
+ 42
+0.000000
+ 10
+764180.941916
+ 20
+4280811.355872
+ 42
+0.000000
+ 10
+764118.574530
+ 20
+4280562.597719
+ 42
+0.000000
+ 10
+764118.574530
+ 20
+4280562.597719
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    67
+100
+AcDbEntity
+  8
+Cuarta
+ 62
+     3
+100
+AcDbPolyline
+ 90
+    86
+ 70
+     1
+ 38
+0.000
+ 10
+759423.741244
+ 20
+4306115.230214
+ 42
+0.000000
+ 10
+759402.585371
+ 20
+4306124.537969
+ 42
+0.000000
+ 10
+759234.935237
+ 20
+4306176.829591
+ 42
+0.000000
+ 10
+759045.409956
+ 20
+4306233.964767
+ 42
+0.000000
+ 10
+758863.625600
+ 20
+4306293.579858
+ 42
+0.000000
+ 10
+758698.695718
+ 20
+4306342.637516
+ 42
+0.000000
+ 10
+758467.811791
+ 20
+4306416.213673
+ 42
+0.000000
+ 10
+758413.318668
+ 20
+4306435.547511
+ 42
+0.000000
+ 10
+758428.196315
+ 20
+4306219.345196
+ 42
+0.000000
+ 10
+758429.390329
+ 20
+4306209.383193
+ 42
+0.000000
+ 10
+758432.537476
+ 20
+4306192.817636
+ 42
+0.000000
+ 10
+758497.870555
+ 20
+4305841.582701
+ 42
+0.000000
+ 10
+758507.600540
+ 20
+4305809.675029
+ 42
+0.000000
+ 10
+758581.862327
+ 20
+4305557.630710
+ 42
+0.000000
+ 10
+758686.406823
+ 20
+4305203.232549
+ 42
+0.000000
+ 10
+758647.643793
+ 20
+4305139.737830
+ 42
+0.000000
+ 10
+758718.712405
+ 20
+4305092.054676
+ 42
+0.000000
+ 10
+758778.332883
+ 20
+4304889.538069
+ 42
+0.000000
+ 10
+758788.028468
+ 20
+4304858.740705
+ 42
+0.000000
+ 10
+758381.778314
+ 20
+4303860.937125
+ 42
+0.000000
+ 10
+758177.342368
+ 20
+4303814.267666
+ 42
+0.000000
+ 10
+757903.133857
+ 20
+4303882.008752
+ 42
+0.000000
+ 10
+757653.188447
+ 20
+4303738.307617
+ 42
+0.000000
+ 10
+757181.775805
+ 20
+4303456.300516
+ 42
+0.000000
+ 10
+756938.777784
+ 20
+4303258.400991
+ 42
+0.000000
+ 10
+756846.560154
+ 20
+4303180.960725
+ 42
+0.000000
+ 10
+756809.279117
+ 20
+4303258.647129
+ 42
+0.000000
+ 10
+756707.205138
+ 20
+4303485.356478
+ 42
+0.000000
+ 10
+756687.535815
+ 20
+4303529.166941
+ 42
+0.000000
+ 10
+756678.063355
+ 20
+4303553.306311
+ 42
+0.000000
+ 10
+756557.052322
+ 20
+4303828.296036
+ 42
+0.000000
+ 10
+756576.854048
+ 20
+4303914.499373
+ 42
+0.000000
+ 10
+756590.933269
+ 20
+4303962.736807
+ 42
+0.000000
+ 10
+756622.824950
+ 20
+4304104.891768
+ 42
+0.000000
+ 10
+756648.233685
+ 20
+4304205.722661
+ 42
+0.000000
+ 10
+756657.319336
+ 20
+4304247.131330
+ 42
+0.000000
+ 10
+756677.190376
+ 20
+4304331.115013
+ 42
+0.000000
+ 10
+756686.311636
+ 20
+4304371.413706
+ 42
+0.000000
+ 10
+756744.999632
+ 20
+4304517.771695
+ 42
+0.000000
+ 10
+756769.820618
+ 20
+4304583.025896
+ 42
+0.000000
+ 10
+756760.389027
+ 20
+4304632.724014
+ 42
+0.000000
+ 10
+756682.416071
+ 20
+4305081.342590
+ 42
+0.000000
+ 10
+757371.936869
+ 20
+4305172.619741
+ 42
+0.000000
+ 10
+757818.862583
+ 20
+4305589.418440
+ 42
+0.000000
+ 10
+757965.030645
+ 20
+4305743.082576
+ 42
+0.000000
+ 10
+757907.314630
+ 20
+4306127.904554
+ 42
+0.000000
+ 10
+757842.660289
+ 20
+4306299.147579
+ 42
+0.000000
+ 10
+757836.260079
+ 20
+4306308.940013
+ 42
+0.000000
+ 10
+757892.773521
+ 20
+4306654.146622
+ 42
+0.000000
+ 10
+757914.648617
+ 20
+4306675.972579
+ 42
+0.000000
+ 10
+758130.789578
+ 20
+4306894.150921
+ 42
+0.000000
+ 10
+757970.321164
+ 20
+4307073.380275
+ 42
+0.000000
+ 10
+757731.909645
+ 20
+4307058.944255
+ 42
+0.000000
+ 10
+757488.265646
+ 20
+4307392.154532
+ 42
+0.000000
+ 10
+757440.942796
+ 20
+4307485.067654
+ 42
+0.000000
+ 10
+757362.965362
+ 20
+4307639.211590
+ 42
+0.000000
+ 10
+757128.015103
+ 20
+4307759.361226
+ 42
+0.000000
+ 10
+756917.181152
+ 20
+4308233.664272
+ 42
+0.000000
+ 10
+756956.382779
+ 20
+4308417.175754
+ 42
+0.000000
+ 10
+757264.074962
+ 20
+4308142.707430
+ 42
+0.000000
+ 10
+757345.520008
+ 20
+4308068.683009
+ 42
+0.000000
+ 10
+757517.416279
+ 20
+4307910.928570
+ 42
+0.000000
+ 10
+758186.514684
+ 20
+4307396.017736
+ 42
+0.000000
+ 10
+758311.182509
+ 20
+4307302.299263
+ 42
+0.000000
+ 10
+759180.336970
+ 20
+4306782.884442
+ 42
+0.000000
+ 10
+759962.381303
+ 20
+4306565.173779
+ 42
+0.000000
+ 10
+761127.651291
+ 20
+4306293.495361
+ 42
+0.000000
+ 10
+761121.990250
+ 20
+4306254.414774
+ 42
+0.000000
+ 10
+761111.927614
+ 20
+4306190.741456
+ 42
+0.000000
+ 10
+761097.499732
+ 20
+4306101.365396
+ 42
+0.000000
+ 10
+761088.989243
+ 20
+4306043.299611
+ 42
+0.000000
+ 10
+761098.691366
+ 20
+4305749.138079
+ 42
+0.000000
+ 10
+761087.262195
+ 20
+4305753.206140
+ 42
+0.000000
+ 10
+761039.809840
+ 20
+4305769.421308
+ 42
+0.000000
+ 10
+760932.645461
+ 20
+4305804.782095
+ 42
+0.000000
+ 10
+760883.348263
+ 20
+4305824.271084
+ 42
+0.000000
+ 10
+760818.136713
+ 20
+4305852.125997
+ 42
+0.000000
+ 10
+760712.920249
+ 20
+4305907.556194
+ 42
+0.000000
+ 10
+760539.536012
+ 20
+4305975.189946
+ 42
+0.000000
+ 10
+760162.941622
+ 20
+4306119.488906
+ 42
+0.000000
+ 10
+760095.241261
+ 20
+4306143.933832
+ 42
+0.000000
+ 10
+760038.064966
+ 20
+4306165.391313
+ 42
+0.000000
+ 10
+759989.640412
+ 20
+4306184.914159
+ 42
+0.000000
+ 10
+759423.741244
+ 20
+4306115.230214
+ 42
+0.000000
+ 10
+759423.741244
+ 20
+4306115.230214
+ 42
+0.000000
+ 10
+759423.741244
+ 20
+4306115.230214
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    68
+100
+AcDbEntity
+  8
+Quinta
+ 62
+     4
+100
+AcDbPolyline
+ 90
+   285
+ 70
+     1
+ 38
+0.000
+ 10
+769697.447451
+ 20
+4299743.856370
+ 42
+0.000000
+ 10
+769678.260110
+ 20
+4299643.183416
+ 42
+0.000000
+ 10
+769523.824864
+ 20
+4299427.891741
+ 42
+0.000000
+ 10
+769489.720190
+ 20
+4299407.840368
+ 42
+0.000000
+ 10
+769472.760665
+ 20
+4299369.478806
+ 42
+0.000000
+ 10
+769471.815198
+ 20
+4299346.108619
+ 42
+0.000000
+ 10
+769483.029494
+ 20
+4299297.590732
+ 42
+0.000000
+ 10
+769503.156777
+ 20
+4299242.707608
+ 42
+0.000000
+ 10
+769504.174925
+ 20
+4299212.736100
+ 42
+0.000000
+ 10
+769527.116944
+ 20
+4298818.990957
+ 42
+0.000000
+ 10
+769542.092339
+ 20
+4298480.542162
+ 42
+0.000000
+ 10
+769542.167750
+ 20
+4298478.322052
+ 42
+0.000000
+ 10
+769556.663494
+ 20
+4298333.229462
+ 42
+0.000000
+ 10
+769629.617509
+ 20
+4297312.167968
+ 42
+0.000000
+ 10
+769644.816769
+ 20
+4296941.498648
+ 42
+0.000000
+ 10
+769745.608518
+ 20
+4295766.908839
+ 42
+0.000000
+ 10
+769910.139421
+ 20
+4295405.758319
+ 42
+0.000000
+ 10
+769948.454664
+ 20
+4295404.837693
+ 42
+0.000000
+ 10
+770000.599857
+ 20
+4295406.610005
+ 42
+0.000000
+ 10
+770068.842544
+ 20
+4295421.154649
+ 42
+0.000000
+ 10
+770100.584405
+ 20
+4295460.019362
+ 42
+0.000000
+ 10
+770136.710615
+ 20
+4295549.043485
+ 42
+0.000000
+ 10
+770166.865749
+ 20
+4295634.530739
+ 42
+0.000000
+ 10
+770186.024535
+ 20
+4295710.753394
+ 42
+0.000000
+ 10
+770198.494852
+ 20
+4295778.969226
+ 42
+0.000000
+ 10
+770261.029670
+ 20
+4295910.012224
+ 42
+0.000000
+ 10
+770621.605657
+ 20
+4295847.830675
+ 42
+0.000000
+ 10
+770671.172247
+ 20
+4296001.773892
+ 42
+0.000000
+ 10
+770963.166925
+ 20
+4295986.170084
+ 42
+0.000000
+ 10
+771097.886073
+ 20
+4295786.279455
+ 42
+0.000000
+ 10
+771309.432342
+ 20
+4295884.633905
+ 42
+0.000000
+ 10
+771361.126314
+ 20
+4295848.614026
+ 42
+0.000000
+ 10
+771454.386990
+ 20
+4295792.899316
+ 42
+0.000000
+ 10
+771426.535697
+ 20
+4295538.559078
+ 42
+0.000000
+ 10
+771310.687057
+ 20
+4294828.893833
+ 42
+0.000000
+ 10
+771407.633649
+ 20
+4294691.063628
+ 42
+0.000000
+ 10
+771402.745367
+ 20
+4294477.517458
+ 42
+0.000000
+ 10
+771197.859855
+ 20
+4294259.365818
+ 42
+0.000000
+ 10
+770982.199335
+ 20
+4293897.489761
+ 42
+0.000000
+ 10
+770880.770394
+ 20
+4293630.643849
+ 42
+0.000000
+ 10
+770112.578181
+ 20
+4293468.916594
+ 42
+0.000000
+ 10
+770084.572002
+ 20
+4293473.521533
+ 42
+0.000000
+ 10
+769966.462617
+ 20
+4293491.735570
+ 42
+0.000000
+ 10
+769505.295013
+ 20
+4293566.102206
+ 42
+0.000000
+ 10
+768953.884241
+ 20
+4293452.961565
+ 42
+0.000000
+ 10
+768416.587574
+ 20
+4293308.108988
+ 42
+0.000000
+ 10
+768705.127447
+ 20
+4293654.586487
+ 42
+0.000000
+ 10
+768749.568357
+ 20
+4293961.701096
+ 42
+0.000000
+ 10
+768557.361665
+ 20
+4294138.570203
+ 42
+0.000000
+ 10
+768473.460252
+ 20
+4294715.841140
+ 42
+0.000000
+ 10
+768589.556026
+ 20
+4294910.911504
+ 42
+0.000000
+ 10
+768706.600904
+ 20
+4295154.914239
+ 42
+0.000000
+ 10
+768839.101020
+ 20
+4295250.525541
+ 42
+0.000000
+ 10
+768885.723836
+ 20
+4295621.062245
+ 42
+0.000000
+ 10
+768909.122509
+ 20
+4295675.197865
+ 42
+0.000000
+ 10
+768963.519007
+ 20
+4295815.955121
+ 42
+0.000000
+ 10
+768982.454166
+ 20
+4295847.713443
+ 42
+0.000000
+ 10
+769069.615247
+ 20
+4296048.481689
+ 42
+0.000000
+ 10
+769216.950594
+ 20
+4296193.502139
+ 42
+0.000000
+ 10
+769513.426391
+ 20
+4296993.715221
+ 42
+0.000000
+ 10
+769622.741908
+ 20
+4297309.711769
+ 42
+0.000000
+ 10
+769170.135839
+ 20
+4297625.528182
+ 42
+0.000000
+ 10
+769128.604165
+ 20
+4297798.598577
+ 42
+0.000000
+ 10
+769105.905127
+ 20
+4297826.723491
+ 42
+0.000000
+ 10
+768916.123118
+ 20
+4298062.560464
+ 42
+0.000000
+ 10
+768732.424119
+ 20
+4298016.330459
+ 42
+0.000000
+ 10
+768515.921752
+ 20
+4298091.240454
+ 42
+0.000000
+ 10
+768127.312545
+ 20
+4298240.354283
+ 42
+0.000000
+ 10
+767917.585794
+ 20
+4298321.065065
+ 42
+0.000000
+ 10
+767737.663778
+ 20
+4298266.094959
+ 42
+0.000000
+ 10
+767221.085471
+ 20
+4298445.385042
+ 42
+0.000000
+ 10
+766909.761351
+ 20
+4298496.029142
+ 42
+0.000000
+ 10
+766877.435608
+ 20
+4298319.355930
+ 42
+0.000000
+ 10
+766881.239598
+ 20
+4298387.273374
+ 42
+0.000000
+ 10
+766867.407438
+ 20
+4298462.376832
+ 42
+0.000000
+ 10
+766819.959992
+ 20
+4298631.921992
+ 42
+0.000000
+ 10
+766711.720398
+ 20
+4298928.334692
+ 42
+0.000000
+ 10
+766679.210802
+ 20
+4299041.706076
+ 42
+0.000000
+ 10
+766664.539106
+ 20
+4299090.110238
+ 42
+0.000000
+ 10
+766640.903640
+ 20
+4299198.223477
+ 42
+0.000000
+ 10
+766587.766896
+ 20
+4299382.025175
+ 42
+0.000000
+ 10
+766549.872702
+ 20
+4299526.332378
+ 42
+0.000000
+ 10
+766505.158325
+ 20
+4299614.845448
+ 42
+0.000000
+ 10
+766434.461547
+ 20
+4299700.263325
+ 42
+0.000000
+ 10
+766328.314620
+ 20
+4299805.606034
+ 42
+0.000000
+ 10
+766222.230947
+ 20
+4299960.960517
+ 42
+0.000000
+ 10
+766137.219832
+ 20
+4300110.355405
+ 42
+0.000000
+ 10
+766056.095414
+ 20
+4300247.657084
+ 42
+0.000000
+ 10
+765988.323582
+ 20
+4300427.636522
+ 42
+0.000000
+ 10
+765936.597103
+ 20
+4300518.139370
+ 42
+0.000000
+ 10
+765891.720401
+ 20
+4300637.765855
+ 42
+0.000000
+ 10
+765843.147655
+ 20
+4300763.936367
+ 42
+0.000000
+ 10
+765642.136053
+ 20
+4300872.774333
+ 42
+0.000000
+ 10
+765608.539515
+ 20
+4300889.429550
+ 42
+0.000000
+ 10
+765562.412919
+ 20
+4300916.778159
+ 42
+0.000000
+ 10
+765520.517406
+ 20
+4300947.602575
+ 42
+0.000000
+ 10
+765483.298984
+ 20
+4300968.582156
+ 42
+0.000000
+ 10
+765447.743339
+ 20
+4300991.840147
+ 42
+0.000000
+ 10
+765347.765157
+ 20
+4301069.617861
+ 42
+0.000000
+ 10
+765311.379084
+ 20
+4301091.737311
+ 42
+0.000000
+ 10
+765295.264357
+ 20
+4301105.644860
+ 42
+0.000000
+ 10
+765261.409625
+ 20
+4301130.071795
+ 42
+0.000000
+ 10
+765246.126358
+ 20
+4301145.118539
+ 42
+0.000000
+ 10
+765228.349265
+ 20
+4301156.748012
+ 42
+0.000000
+ 10
+765151.102770
+ 20
+4301230.843199
+ 42
+0.000000
+ 10
+765134.157307
+ 20
+4301243.611958
+ 42
+0.000000
+ 10
+765107.822461
+ 20
+4301277.181256
+ 42
+0.000000
+ 10
+765092.576877
+ 20
+4301291.118222
+ 42
+0.000000
+ 10
+765078.993939
+ 20
+4301307.333381
+ 42
+0.000000
+ 10
+765063.748461
+ 20
+4301321.270397
+ 42
+0.000000
+ 10
+765021.300428
+ 20
+4301368.747962
+ 42
+0.000000
+ 10
+764942.358162
+ 20
+4301441.676889
+ 42
+0.000000
+ 10
+764922.882486
+ 20
+4301452.138903
+ 42
+0.000000
+ 10
+764884.910958
+ 20
+4301469.761942
+ 42
+0.000000
+ 10
+764864.752479
+ 20
+4301474.644841
+ 42
+0.000000
+ 10
+764845.351167
+ 20
+4301482.886943
+ 42
+0.000000
+ 10
+764804.997289
+ 20
+4301493.763033
+ 42
+0.000000
+ 10
+764784.044698
+ 20
+4301496.397031
+ 42
+0.000000
+ 10
+764763.812222
+ 20
+4301503.500274
+ 42
+0.000000
+ 10
+764682.347889
+ 20
+4301521.894328
+ 42
+0.000000
+ 10
+764598.464101
+ 20
+4301534.652013
+ 42
+0.000000
+ 10
+764579.174403
+ 20
+4301539.564606
+ 42
+0.000000
+ 10
+764560.641979
+ 20
+4301547.836363
+ 42
+0.000000
+ 10
+764280.753915
+ 20
+4301364.029757
+ 42
+0.000000
+ 10
+764256.384292
+ 20
+4301338.769281
+ 42
+0.000000
+ 10
+764119.919836
+ 20
+4301155.306186
+ 42
+0.000000
+ 10
+764087.290434
+ 20
+4301090.876516
+ 42
+0.000000
+ 10
+764078.181373
+ 20
+4301077.237800
+ 42
+0.000000
+ 10
+764037.864419
+ 20
+4301034.777863
+ 42
+0.000000
+ 10
+763930.067106
+ 20
+4300930.062825
+ 42
+0.000000
+ 10
+763903.385186
+ 20
+4300895.836502
+ 42
+0.000000
+ 10
+763865.394289
+ 20
+4300835.674661
+ 42
+0.000000
+ 10
+763836.697328
+ 20
+4300783.601202
+ 42
+0.000000
+ 10
+763818.551398
+ 20
+4300754.104362
+ 42
+0.000000
+ 10
+763804.415297
+ 20
+4300734.742426
+ 42
+0.000000
+ 10
+763775.699769
+ 20
+4300709.339162
+ 42
+0.000000
+ 10
+763731.147617
+ 20
+4300663.406409
+ 42
+0.000000
+ 10
+763722.037404
+ 20
+4300649.768166
+ 42
+0.000000
+ 10
+763672.567702
+ 20
+4301039.290353
+ 42
+0.000000
+ 10
+763385.975518
+ 20
+4301160.894313
+ 42
+0.000000
+ 10
+763425.121249
+ 20
+4301343.331657
+ 42
+0.000000
+ 10
+763522.591228
+ 20
+4301471.033225
+ 42
+0.000000
+ 10
+763659.706174
+ 20
+4301556.715168
+ 42
+0.000000
+ 10
+763732.672592
+ 20
+4301793.620981
+ 42
+0.000000
+ 10
+763871.736245
+ 20
+4302238.314156
+ 42
+0.000000
+ 10
+763862.461544
+ 20
+4302308.015759
+ 42
+0.000000
+ 10
+763838.129744
+ 20
+4302490.566244
+ 42
+0.000000
+ 10
+763710.069873
+ 20
+4302681.888265
+ 42
+0.000000
+ 10
+763690.802292
+ 20
+4302712.362797
+ 42
+0.000000
+ 10
+763618.185313
+ 20
+4302831.075614
+ 42
+0.000000
+ 10
+763597.961554
+ 20
+4303099.331218
+ 42
+0.000000
+ 10
+763568.098631
+ 20
+4303605.079082
+ 42
+0.000000
+ 10
+763727.357027
+ 20
+4303729.285887
+ 42
+0.000000
+ 10
+763764.460437
+ 20
+4303998.339240
+ 42
+0.000000
+ 10
+763398.463983
+ 20
+4303792.798746
+ 42
+0.000000
+ 10
+763064.403167
+ 20
+4303567.223056
+ 42
+0.000000
+ 10
+763149.424690
+ 20
+4303257.779885
+ 42
+0.000000
+ 10
+763068.617641
+ 20
+4303126.189261
+ 42
+0.000000
+ 10
+762757.568250
+ 20
+4303018.076656
+ 42
+0.000000
+ 10
+762729.785485
+ 20
+4303017.155385
+ 42
+0.000000
+ 10
+762711.332220
+ 20
+4303023.211117
+ 42
+0.000000
+ 10
+762703.260701
+ 20
+4303030.722351
+ 42
+0.000000
+ 10
+762660.166465
+ 20
+4303045.962637
+ 42
+0.000000
+ 10
+762584.176261
+ 20
+4303083.449412
+ 42
+0.000000
+ 10
+762503.382161
+ 20
+4303108.553819
+ 42
+0.000000
+ 10
+762484.818996
+ 20
+4303117.940188
+ 42
+0.000000
+ 10
+762412.987559
+ 20
+4303161.122555
+ 42
+0.000000
+ 10
+762379.908634
+ 20
+4303188.919833
+ 42
+0.000000
+ 10
+762350.192421
+ 20
+4303220.162358
+ 42
+0.000000
+ 10
+762317.150711
+ 20
+4303246.849833
+ 42
+0.000000
+ 10
+762254.356950
+ 20
+4303305.890330
+ 42
+0.000000
+ 10
+762423.383896
+ 20
+4303608.193950
+ 42
+0.000000
+ 10
+762378.022137
+ 20
+4303744.487859
+ 42
+0.000000
+ 10
+762357.916457
+ 20
+4303800.496287
+ 42
+0.000000
+ 10
+762169.185402
+ 20
+4303909.818835
+ 42
+0.000000
+ 10
+762408.071982
+ 20
+4304096.642099
+ 42
+0.000000
+ 10
+762567.298979
+ 20
+4304221.935315
+ 42
+0.000000
+ 10
+762703.908813
+ 20
+4304295.363687
+ 42
+0.000000
+ 10
+762735.916975
+ 20
+4304299.759212
+ 42
+0.000000
+ 10
+762812.843777
+ 20
+4304312.312850
+ 42
+0.000000
+ 10
+762903.217337
+ 20
+4304338.648819
+ 42
+0.000000
+ 10
+762920.652385
+ 20
+4304337.005039
+ 42
+0.000000
+ 10
+762957.942445
+ 20
+4304339.354284
+ 42
+0.000000
+ 10
+763016.565560
+ 20
+4304353.524816
+ 42
+0.000000
+ 10
+763048.573418
+ 20
+4304357.921624
+ 42
+0.000000
+ 10
+763156.752290
+ 20
+4304816.025726
+ 42
+0.000000
+ 10
+763152.499198
+ 20
+4305127.040916
+ 42
+0.000000
+ 10
+763083.763887
+ 20
+4305155.872516
+ 42
+0.000000
+ 10
+763047.512971
+ 20
+4305174.671049
+ 42
+0.000000
+ 10
+763010.431134
+ 20
+4305192.330862
+ 42
+0.000000
+ 10
+762936.693606
+ 20
+4305241.000372
+ 42
+0.000000
+ 10
+762872.430888
+ 20
+4305292.207597
+ 42
+0.000000
+ 10
+762845.728703
+ 20
+4305311.323989
+ 42
+0.000000
+ 10
+762837.732813
+ 20
+4305316.614904
+ 42
+0.000000
+ 10
+762819.026648
+ 20
+4305330.440465
+ 42
+0.000000
+ 10
+762802.130152
+ 20
+4305342.103591
+ 42
+0.000000
+ 10
+762770.404784
+ 20
+4305355.497132
+ 42
+0.000000
+ 10
+762731.662232
+ 20
+4305370.880474
+ 42
+0.000000
+ 10
+762642.305103
+ 20
+4305419.034145
+ 42
+0.000000
+ 10
+762630.800857
+ 20
+4305425.320137
+ 42
+0.000000
+ 10
+762571.580836
+ 20
+4305455.582714
+ 42
+0.000000
+ 10
+762513.266035
+ 20
+4305484.764444
+ 42
+0.000000
+ 10
+762498.290240
+ 20
+4305490.935506
+ 42
+0.000000
+ 10
+762473.619950
+ 20
+4305501.230260
+ 42
+0.000000
+ 10
+762447.213856
+ 20
+4305511.467546
+ 42
+0.000000
+ 10
+762425.221099
+ 20
+4305519.628666
+ 42
+0.000000
+ 10
+762382.824447
+ 20
+4305540.448796
+ 42
+0.000000
+ 10
+762412.039821
+ 20
+4305550.307208
+ 42
+0.000000
+ 10
+762454.737240
+ 20
+4305572.836587
+ 42
+0.000000
+ 10
+762473.316471
+ 20
+4305589.010254
+ 42
+0.000000
+ 10
+762490.659659
+ 20
+4305616.255657
+ 42
+0.000000
+ 10
+762507.245217
+ 20
+4305640.142187
+ 42
+0.000000
+ 10
+762510.995910
+ 20
+4305658.046828
+ 42
+0.000000
+ 10
+762512.605854
+ 20
+4305688.104427
+ 42
+0.000000
+ 10
+762507.419692
+ 20
+4305713.491607
+ 42
+0.000000
+ 10
+762492.539302
+ 20
+4305743.002418
+ 42
+0.000000
+ 10
+762479.358024
+ 20
+4305773.680852
+ 42
+0.000000
+ 10
+762437.094407
+ 20
+4305816.730345
+ 42
+0.000000
+ 10
+762419.184402
+ 20
+4305832.805629
+ 42
+0.000000
+ 10
+762406.886610
+ 20
+4305836.843046
+ 42
+0.000000
+ 10
+762365.190606
+ 20
+4305836.572310
+ 42
+0.000000
+ 10
+762338.138560
+ 20
+4305840.120857
+ 42
+0.000000
+ 10
+762299.009520
+ 20
+4305841.046798
+ 42
+0.000000
+ 10
+762264.256775
+ 20
+4305841.006649
+ 42
+0.000000
+ 10
+762246.751702
+ 20
+4305844.871794
+ 42
+0.000000
+ 10
+762235.969206
+ 20
+4305855.627251
+ 42
+0.000000
+ 10
+762228.364159
+ 20
+4305875.378087
+ 42
+0.000000
+ 10
+762217.052382
+ 20
+4305928.344074
+ 42
+0.000000
+ 10
+762210.874477
+ 20
+4305983.702652
+ 42
+0.000000
+ 10
+762200.298255
+ 20
+4306014.467730
+ 42
+0.000000
+ 10
+762173.387300
+ 20
+4306092.476147
+ 42
+0.000000
+ 10
+762150.499685
+ 20
+4306153.948909
+ 42
+0.000000
+ 10
+763158.928726
+ 20
+4305744.011865
+ 42
+0.000000
+ 10
+763355.575877
+ 20
+4305709.433848
+ 42
+0.000000
+ 10
+763496.234615
+ 20
+4305686.332237
+ 42
+0.000000
+ 10
+763947.978605
+ 20
+4305714.716040
+ 42
+0.000000
+ 10
+764337.552303
+ 20
+4305835.509256
+ 42
+0.000000
+ 10
+764643.497748
+ 20
+4306092.438042
+ 42
+0.000000
+ 10
+765052.197391
+ 20
+4306108.334977
+ 42
+0.000000
+ 10
+765385.307431
+ 20
+4305942.798852
+ 42
+0.000000
+ 10
+765705.479210
+ 20
+4305930.201454
+ 42
+0.000000
+ 10
+765907.277461
+ 20
+4305820.289971
+ 42
+0.000000
+ 10
+766232.375035
+ 20
+4305738.977446
+ 42
+0.000000
+ 10
+766876.158792
+ 20
+4305509.495373
+ 42
+0.000000
+ 10
+767643.858285
+ 20
+4305368.710890
+ 42
+0.000000
+ 10
+768464.353311
+ 20
+4305260.905544
+ 42
+0.000000
+ 10
+768951.893629
+ 20
+4304952.938725
+ 42
+0.000000
+ 10
+769063.110569
+ 20
+4304748.895581
+ 42
+0.000000
+ 10
+769251.818492
+ 20
+4304591.941463
+ 42
+0.000000
+ 10
+769942.210560
+ 20
+4304530.980268
+ 42
+0.000000
+ 10
+770088.654797
+ 20
+4304518.191316
+ 42
+0.000000
+ 10
+770194.967174
+ 20
+4303923.908043
+ 42
+0.000000
+ 10
+770263.484355
+ 20
+4303851.784542
+ 42
+0.000000
+ 10
+770380.588909
+ 20
+4303731.308642
+ 42
+0.000000
+ 10
+770455.159012
+ 20
+4303583.820787
+ 42
+0.000000
+ 10
+770534.337992
+ 20
+4303428.711301
+ 42
+0.000000
+ 10
+770836.953517
+ 20
+4303297.907360
+ 42
+0.000000
+ 10
+771246.978152
+ 20
+4303000.751314
+ 42
+0.000000
+ 10
+771671.403422
+ 20
+4302893.040598
+ 42
+0.000000
+ 10
+772038.334797
+ 20
+4303169.024968
+ 42
+0.000000
+ 10
+772489.500772
+ 20
+4303042.270948
+ 42
+0.000000
+ 10
+773081.727219
+ 20
+4302909.287353
+ 42
+0.000000
+ 10
+773283.715319
+ 20
+4302799.554787
+ 42
+0.000000
+ 10
+773408.634454
+ 20
+4302731.623262
+ 42
+0.000000
+ 10
+773559.887673
+ 20
+4302480.111215
+ 42
+0.000000
+ 10
+773778.592438
+ 20
+4302490.997516
+ 42
+0.000000
+ 10
+773941.871390
+ 20
+4302369.940324
+ 42
+0.000000
+ 10
+774143.489878
+ 20
+4302095.727528
+ 42
+0.000000
+ 10
+774300.058754
+ 20
+4302043.351383
+ 42
+0.000000
+ 10
+774472.333202
+ 20
+4301688.108951
+ 42
+0.000000
+ 10
+774963.912905
+ 20
+4301402.841318
+ 42
+0.000000
+ 10
+774901.568453
+ 20
+4301119.493350
+ 42
+0.000000
+ 10
+774610.435976
+ 20
+4300863.784771
+ 42
+0.000000
+ 10
+774318.695874
+ 20
+4300449.137639
+ 42
+0.000000
+ 10
+774018.467725
+ 20
+4300027.542590
+ 42
+0.000000
+ 10
+773998.604879
+ 20
+4300023.522217
+ 42
+0.000000
+ 10
+773194.943780
+ 20
+4299850.209119
+ 42
+0.000000
+ 10
+772875.435960
+ 20
+4299759.191740
+ 42
+0.000000
+ 10
+771763.493500
+ 20
+4299673.229276
+ 42
+0.000000
+ 10
+771653.973660
+ 20
+4299823.957487
+ 42
+0.000000
+ 10
+771169.844121
+ 20
+4300096.345134
+ 42
+0.000000
+ 10
+770298.883492
+ 20
+4300111.068956
+ 42
+0.000000
+ 10
+769752.550700
+ 20
+4300015.786030
+ 42
+0.000000
+ 10
+769697.447451
+ 20
+4299743.856370
+ 42
+0.000000
+ 10
+769697.447451
+ 20
+4299743.856370
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    69
+100
+AcDbEntity
+  8
+Sexta
+ 62
+     5
+100
+AcDbPolyline
+ 90
+    64
+ 70
+     1
+ 38
+0.000
+ 10
+765386.860623
+ 20
+4293473.081532
+ 42
+0.000000
+ 10
+764805.706666
+ 20
+4293468.144350
+ 42
+0.000000
+ 10
+764252.745120
+ 20
+4293505.303532
+ 42
+0.000000
+ 10
+764278.126588
+ 20
+4293867.307841
+ 42
+0.000000
+ 10
+764203.318916
+ 20
+4294128.189653
+ 42
+0.000000
+ 10
+763953.391687
+ 20
+4294422.146597
+ 42
+0.000000
+ 10
+763945.089877
+ 20
+4294436.317197
+ 42
+0.000000
+ 10
+763793.312566
+ 20
+4294683.532439
+ 42
+0.000000
+ 10
+763607.471850
+ 20
+4294987.404904
+ 42
+0.000000
+ 10
+763944.061336
+ 20
+4295305.289342
+ 42
+0.000000
+ 10
+764078.049935
+ 20
+4296273.209313
+ 42
+0.000000
+ 10
+764523.695558
+ 20
+4296526.965500
+ 42
+0.000000
+ 10
+764927.130946
+ 20
+4296689.327120
+ 42
+0.000000
+ 10
+765352.230753
+ 20
+4296905.776197
+ 42
+0.000000
+ 10
+766175.463874
+ 20
+4297103.361511
+ 42
+0.000000
+ 10
+766579.983446
+ 20
+4297283.629435
+ 42
+0.000000
+ 10
+766588.522948
+ 20
+4297288.361399
+ 42
+0.000000
+ 10
+766627.099721
+ 20
+4297305.215176
+ 42
+0.000000
+ 10
+766602.829848
+ 20
+4297691.131883
+ 42
+0.000000
+ 10
+766717.403179
+ 20
+4297879.456944
+ 42
+0.000000
+ 10
+766838.856622
+ 20
+4298095.798068
+ 42
+0.000000
+ 10
+766877.435608
+ 20
+4298319.355930
+ 42
+0.000000
+ 10
+766909.761351
+ 20
+4298496.029142
+ 42
+0.000000
+ 10
+767221.085471
+ 20
+4298445.385042
+ 42
+0.000000
+ 10
+767737.663778
+ 20
+4298266.094959
+ 42
+0.000000
+ 10
+767917.585794
+ 20
+4298321.065065
+ 42
+0.000000
+ 10
+768127.312545
+ 20
+4298240.354283
+ 42
+0.000000
+ 10
+768515.921752
+ 20
+4298091.240454
+ 42
+0.000000
+ 10
+768732.424119
+ 20
+4298016.330459
+ 42
+0.000000
+ 10
+768916.123118
+ 20
+4298062.560464
+ 42
+0.000000
+ 10
+769105.905127
+ 20
+4297826.723491
+ 42
+0.000000
+ 10
+769128.604165
+ 20
+4297798.598577
+ 42
+0.000000
+ 10
+769170.135839
+ 20
+4297625.528182
+ 42
+0.000000
+ 10
+769622.741908
+ 20
+4297309.711769
+ 42
+0.000000
+ 10
+769513.426391
+ 20
+4296993.715221
+ 42
+0.000000
+ 10
+769216.950594
+ 20
+4296193.502139
+ 42
+0.000000
+ 10
+769069.615247
+ 20
+4296048.481689
+ 42
+0.000000
+ 10
+768982.454166
+ 20
+4295847.713443
+ 42
+0.000000
+ 10
+768963.519007
+ 20
+4295815.955121
+ 42
+0.000000
+ 10
+768909.122509
+ 20
+4295675.197865
+ 42
+0.000000
+ 10
+768885.723836
+ 20
+4295621.062245
+ 42
+0.000000
+ 10
+768839.101020
+ 20
+4295250.525541
+ 42
+0.000000
+ 10
+768706.600904
+ 20
+4295154.914239
+ 42
+0.000000
+ 10
+768589.556026
+ 20
+4294910.911504
+ 42
+0.000000
+ 10
+768473.460252
+ 20
+4294715.841140
+ 42
+0.000000
+ 10
+768557.361665
+ 20
+4294138.570203
+ 42
+0.000000
+ 10
+768749.568357
+ 20
+4293961.701096
+ 42
+0.000000
+ 10
+768705.127447
+ 20
+4293654.586487
+ 42
+0.000000
+ 10
+768416.587574
+ 20
+4293308.108988
+ 42
+0.000000
+ 10
+768264.541402
+ 20
+4293326.313442
+ 42
+0.000000
+ 10
+767667.495492
+ 20
+4293042.806791
+ 42
+0.000000
+ 10
+767647.850499
+ 20
+4293367.756734
+ 42
+0.000000
+ 10
+767457.837595
+ 20
+4293609.180546
+ 42
+0.000000
+ 10
+767280.336140
+ 20
+4293556.534709
+ 42
+0.000000
+ 10
+766992.245427
+ 20
+4293583.524390
+ 42
+0.000000
+ 10
+766669.633560
+ 20
+4293420.446517
+ 42
+0.000000
+ 10
+766310.135868
+ 20
+4293007.218974
+ 42
+0.000000
+ 10
+766030.271882
+ 20
+4293100.086030
+ 42
+0.000000
+ 10
+765929.581318
+ 20
+4293222.291605
+ 42
+0.000000
+ 10
+765750.308079
+ 20
+4293326.312531
+ 42
+0.000000
+ 10
+765560.031191
+ 20
+4293473.309267
+ 42
+0.000000
+ 10
+765399.067495
+ 20
+4293472.377858
+ 42
+0.000000
+ 10
+765386.860623
+ 20
+4293473.081532
+ 42
+0.000000
+ 10
+765386.860623
+ 20
+4293473.081532
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    70
+100
+AcDbEntity
+  8
+Septima
+ 62
+     6
+100
+AcDbPolyline
+ 90
+   171
+ 70
+     1
+ 38
+0.000
+ 10
+769697.447451
+ 20
+4299743.856370
+ 42
+0.000000
+ 10
+769752.550700
+ 20
+4300015.786030
+ 42
+0.000000
+ 10
+770298.883492
+ 20
+4300111.068956
+ 42
+0.000000
+ 10
+771169.844121
+ 20
+4300096.345134
+ 42
+0.000000
+ 10
+771653.973660
+ 20
+4299823.957487
+ 42
+0.000000
+ 10
+771763.493500
+ 20
+4299673.229276
+ 42
+0.000000
+ 10
+772875.435960
+ 20
+4299759.191740
+ 42
+0.000000
+ 10
+773194.943780
+ 20
+4299850.209119
+ 42
+0.000000
+ 10
+773998.604879
+ 20
+4300023.522217
+ 42
+0.000000
+ 10
+774018.467725
+ 20
+4300027.542590
+ 42
+0.000000
+ 10
+774318.695874
+ 20
+4300449.137639
+ 42
+0.000000
+ 10
+774610.435976
+ 20
+4300863.784771
+ 42
+0.000000
+ 10
+774901.568453
+ 20
+4301119.493350
+ 42
+0.000000
+ 10
+774963.912905
+ 20
+4301402.841318
+ 42
+0.000000
+ 10
+775156.437859
+ 20
+4301367.287252
+ 42
+0.000000
+ 10
+775342.509578
+ 20
+4301117.010990
+ 42
+0.000000
+ 10
+775499.704065
+ 20
+4301022.444141
+ 42
+0.000000
+ 10
+775640.458795
+ 20
+4300950.648307
+ 42
+0.000000
+ 10
+776198.513903
+ 20
+4300856.702232
+ 42
+0.000000
+ 10
+776523.800109
+ 20
+4300730.222331
+ 42
+0.000000
+ 10
+776828.785284
+ 20
+4300513.020361
+ 42
+0.000000
+ 10
+777086.114995
+ 20
+4300390.858181
+ 42
+0.000000
+ 10
+777317.879839
+ 20
+4300154.443370
+ 42
+0.000000
+ 10
+777410.035488
+ 20
+4300030.962454
+ 42
+0.000000
+ 10
+777666.848707
+ 20
+4299998.825417
+ 42
+0.000000
+ 10
+777797.994835
+ 20
+4299755.566433
+ 42
+0.000000
+ 10
+777628.728447
+ 20
+4299547.358837
+ 42
+0.000000
+ 10
+777314.789359
+ 20
+4299421.900529
+ 42
+0.000000
+ 10
+777037.055359
+ 20
+4299305.499693
+ 42
+0.000000
+ 10
+776729.939459
+ 20
+4299308.118322
+ 42
+0.000000
+ 10
+776573.993978
+ 20
+4299115.961192
+ 42
+0.000000
+ 10
+776658.784479
+ 20
+4299078.906126
+ 42
+0.000000
+ 10
+776740.272702
+ 20
+4299061.742362
+ 42
+0.000000
+ 10
+776744.040459
+ 20
+4299028.531031
+ 42
+0.000000
+ 10
+776664.736693
+ 20
+4299007.982544
+ 42
+0.000000
+ 10
+776579.695858
+ 20
+4299027.246118
+ 42
+0.000000
+ 10
+776521.469949
+ 20
+4299050.779338
+ 42
+0.000000
+ 10
+776483.178337
+ 20
+4298901.625816
+ 42
+0.000000
+ 10
+776484.208068
+ 20
+4298797.188092
+ 42
+0.000000
+ 10
+776483.586324
+ 20
+4298540.428188
+ 42
+0.000000
+ 10
+776483.409587
+ 20
+4298245.895637
+ 42
+0.000000
+ 10
+776599.103700
+ 20
+4297846.481225
+ 42
+0.000000
+ 10
+776914.204083
+ 20
+4297317.316176
+ 42
+0.000000
+ 10
+777074.815717
+ 20
+4297177.323563
+ 42
+0.000000
+ 10
+777113.569668
+ 20
+4297014.185244
+ 42
+0.000000
+ 10
+777228.135282
+ 20
+4296872.587974
+ 42
+0.000000
+ 10
+777267.219440
+ 20
+4296725.021586
+ 42
+0.000000
+ 10
+777186.737069
+ 20
+4296513.263621
+ 42
+0.000000
+ 10
+777357.525308
+ 20
+4296381.410272
+ 42
+0.000000
+ 10
+777495.801162
+ 20
+4296482.935377
+ 42
+0.000000
+ 10
+777816.058180
+ 20
+4296207.383921
+ 42
+0.000000
+ 10
+778124.986564
+ 20
+4295908.106632
+ 42
+0.000000
+ 10
+778204.615117
+ 20
+4295820.869168
+ 42
+0.000000
+ 10
+778515.531557
+ 20
+4295490.553919
+ 42
+0.000000
+ 10
+778682.745957
+ 20
+4295313.030906
+ 42
+0.000000
+ 10
+778972.816358
+ 20
+4295180.947545
+ 42
+0.000000
+ 10
+779404.470318
+ 20
+4295279.476387
+ 42
+0.000000
+ 10
+779603.019016
+ 20
+4295250.895809
+ 42
+0.000000
+ 10
+779793.455358
+ 20
+4295180.910497
+ 42
+0.000000
+ 10
+779979.669973
+ 20
+4295576.481255
+ 42
+0.000000
+ 10
+780083.891554
+ 20
+4295236.714793
+ 42
+0.000000
+ 10
+779950.893209
+ 20
+4294960.831398
+ 42
+0.000000
+ 10
+779999.860519
+ 20
+4294781.389617
+ 42
+0.000000
+ 10
+780178.775989
+ 20
+4294594.303129
+ 42
+0.000000
+ 10
+780176.917048
+ 20
+4294350.828307
+ 42
+0.000000
+ 10
+780217.578481
+ 20
+4293888.784263
+ 42
+0.000000
+ 10
+780371.266504
+ 20
+4293455.178462
+ 42
+0.000000
+ 10
+780586.109079
+ 20
+4293434.973024
+ 42
+0.000000
+ 10
+780716.965665
+ 20
+4293500.723764
+ 42
+0.000000
+ 10
+780963.887818
+ 20
+4293607.257166
+ 42
+0.000000
+ 10
+780889.152615
+ 20
+4293258.950205
+ 42
+0.000000
+ 10
+780870.928170
+ 20
+4292937.093269
+ 42
+0.000000
+ 10
+781024.875767
+ 20
+4292866.954110
+ 42
+0.000000
+ 10
+780891.630055
+ 20
+4292622.169156
+ 42
+0.000000
+ 10
+781000.980054
+ 20
+4292459.313539
+ 42
+0.000000
+ 10
+780835.842160
+ 20
+4292254.527512
+ 42
+0.000000
+ 10
+780935.015144
+ 20
+4292010.174616
+ 42
+0.000000
+ 10
+780637.762717
+ 20
+4292144.168579
+ 42
+0.000000
+ 10
+780441.709620
+ 20
+4292198.382035
+ 42
+0.000000
+ 10
+780112.184888
+ 20
+4291914.461591
+ 42
+0.000000
+ 10
+779964.707032
+ 20
+4291874.813390
+ 42
+0.000000
+ 10
+779576.902815
+ 20
+4291613.318430
+ 42
+0.000000
+ 10
+779470.533920
+ 20
+4291766.293475
+ 42
+0.000000
+ 10
+779365.572712
+ 20
+4291879.307149
+ 42
+0.000000
+ 10
+779383.200018
+ 20
+4292046.642775
+ 42
+0.000000
+ 10
+778925.656697
+ 20
+4291986.123583
+ 42
+0.000000
+ 10
+778504.681579
+ 20
+4291950.251875
+ 42
+0.000000
+ 10
+778275.993246
+ 20
+4291867.780411
+ 42
+0.000000
+ 10
+778064.946542
+ 20
+4291629.221739
+ 42
+0.000000
+ 10
+778141.404512
+ 20
+4291285.130393
+ 42
+0.000000
+ 10
+778028.566158
+ 20
+4291175.600116
+ 42
+0.000000
+ 10
+777822.626876
+ 20
+4291163.958875
+ 42
+0.000000
+ 10
+777463.891770
+ 20
+4291114.760626
+ 42
+0.000000
+ 10
+777296.177256
+ 20
+4291055.564349
+ 42
+0.000000
+ 10
+776959.833090
+ 20
+4290838.235682
+ 42
+0.000000
+ 10
+776873.562713
+ 20
+4290615.173716
+ 42
+0.000000
+ 10
+776681.006138
+ 20
+4290694.052997
+ 42
+0.000000
+ 10
+776446.478754
+ 20
+4290226.890576
+ 42
+0.000000
+ 10
+776091.933898
+ 20
+4290532.440122
+ 42
+0.000000
+ 10
+774890.266215
+ 20
+4291694.459775
+ 42
+0.000000
+ 10
+774872.389537
+ 20
+4291758.302287
+ 42
+0.000000
+ 10
+774839.143143
+ 20
+4291863.846300
+ 42
+0.000000
+ 10
+774822.916669
+ 20
+4291879.956312
+ 42
+0.000000
+ 10
+774803.442421
+ 20
+4291889.285807
+ 42
+0.000000
+ 10
+774793.008426
+ 20
+4291888.925256
+ 42
+0.000000
+ 10
+774787.868143
+ 20
+4291886.524865
+ 42
+0.000000
+ 10
+774770.900050
+ 20
+4291873.713327
+ 42
+0.000000
+ 10
+774755.785965
+ 20
+4291857.631732
+ 42
+0.000000
+ 10
+774295.622883
+ 20
+4292629.715076
+ 42
+0.000000
+ 10
+774285.408273
+ 20
+4292648.256148
+ 42
+0.000000
+ 10
+773888.589020
+ 20
+4292796.836939
+ 42
+0.000000
+ 10
+773782.273764
+ 20
+4292850.966462
+ 42
+0.000000
+ 10
+773745.874126
+ 20
+4292846.378871
+ 42
+0.000000
+ 10
+773432.791692
+ 20
+4292914.511740
+ 42
+0.000000
+ 10
+772875.446759
+ 20
+4293024.279523
+ 42
+0.000000
+ 10
+772868.110812
+ 20
+4293035.141354
+ 42
+0.000000
+ 10
+772850.342546
+ 20
+4293045.645108
+ 42
+0.000000
+ 10
+772826.412609
+ 20
+4293058.160150
+ 42
+0.000000
+ 10
+772800.369902
+ 20
+4293056.155025
+ 42
+0.000000
+ 10
+772778.369261
+ 20
+4293063.179594
+ 42
+0.000000
+ 10
+772752.815054
+ 20
+4293072.305017
+ 42
+0.000000
+ 10
+772742.382757
+ 20
+4293071.947075
+ 42
+0.000000
+ 10
+772702.354207
+ 20
+4293071.685146
+ 42
+0.000000
+ 10
+772695.627823
+ 20
+4293064.786224
+ 42
+0.000000
+ 10
+772621.738584
+ 20
+4293036.690532
+ 42
+0.000000
+ 10
+772424.610681
+ 20
+4293074.386888
+ 42
+0.000000
+ 10
+772276.293033
+ 20
+4293059.303152
+ 42
+0.000000
+ 10
+771439.188815
+ 20
+4292926.208528
+ 42
+0.000000
+ 10
+770965.199442
+ 20
+4292787.790831
+ 42
+0.000000
+ 10
+770869.633910
+ 20
+4293191.284620
+ 42
+0.000000
+ 10
+770880.770394
+ 20
+4293630.643849
+ 42
+0.000000
+ 10
+770982.199335
+ 20
+4293897.489761
+ 42
+0.000000
+ 10
+771197.859855
+ 20
+4294259.365818
+ 42
+0.000000
+ 10
+771402.745367
+ 20
+4294477.517458
+ 42
+0.000000
+ 10
+771407.633649
+ 20
+4294691.063628
+ 42
+0.000000
+ 10
+771310.687057
+ 20
+4294828.893833
+ 42
+0.000000
+ 10
+771426.535697
+ 20
+4295538.559078
+ 42
+0.000000
+ 10
+771454.386990
+ 20
+4295792.899316
+ 42
+0.000000
+ 10
+771361.126314
+ 20
+4295848.614026
+ 42
+0.000000
+ 10
+771309.432342
+ 20
+4295884.633905
+ 42
+0.000000
+ 10
+771097.886073
+ 20
+4295786.279455
+ 42
+0.000000
+ 10
+770963.166925
+ 20
+4295986.170084
+ 42
+0.000000
+ 10
+770671.172247
+ 20
+4296001.773892
+ 42
+0.000000
+ 10
+770621.605657
+ 20
+4295847.830675
+ 42
+0.000000
+ 10
+770261.029670
+ 20
+4295910.012224
+ 42
+0.000000
+ 10
+770198.494852
+ 20
+4295778.969226
+ 42
+0.000000
+ 10
+770186.024535
+ 20
+4295710.753394
+ 42
+0.000000
+ 10
+770166.865749
+ 20
+4295634.530739
+ 42
+0.000000
+ 10
+770136.710615
+ 20
+4295549.043485
+ 42
+0.000000
+ 10
+770100.584405
+ 20
+4295460.019362
+ 42
+0.000000
+ 10
+770068.842544
+ 20
+4295421.154649
+ 42
+0.000000
+ 10
+770000.599857
+ 20
+4295406.610005
+ 42
+0.000000
+ 10
+769948.454664
+ 20
+4295404.837693
+ 42
+0.000000
+ 10
+769910.139421
+ 20
+4295405.758319
+ 42
+0.000000
+ 10
+769745.608518
+ 20
+4295766.908839
+ 42
+0.000000
+ 10
+769644.816769
+ 20
+4296941.498648
+ 42
+0.000000
+ 10
+769629.617509
+ 20
+4297312.167968
+ 42
+0.000000
+ 10
+769556.663494
+ 20
+4298333.229462
+ 42
+0.000000
+ 10
+769542.167750
+ 20
+4298478.322052
+ 42
+0.000000
+ 10
+769542.092339
+ 20
+4298480.542162
+ 42
+0.000000
+ 10
+769527.116944
+ 20
+4298818.990957
+ 42
+0.000000
+ 10
+769504.174925
+ 20
+4299212.736100
+ 42
+0.000000
+ 10
+769503.156777
+ 20
+4299242.707608
+ 42
+0.000000
+ 10
+769483.029494
+ 20
+4299297.590732
+ 42
+0.000000
+ 10
+769471.815198
+ 20
+4299346.108619
+ 42
+0.000000
+ 10
+769472.760665
+ 20
+4299369.478806
+ 42
+0.000000
+ 10
+769489.720190
+ 20
+4299407.840368
+ 42
+0.000000
+ 10
+769523.824864
+ 20
+4299427.891741
+ 42
+0.000000
+ 10
+769678.260110
+ 20
+4299643.183416
+ 42
+0.000000
+ 10
+769697.447451
+ 20
+4299743.856370
+ 42
+0.000000
+ 10
+769697.447451
+ 20
+4299743.856370
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    71
+100
+AcDbEntity
+  8
+Octava
+ 62
+     7
+100
+AcDbPolyline
+ 90
+   141
+ 70
+     1
+ 38
+0.000
+ 10
+759836.354763
+ 20
+4297472.299741
+ 42
+0.000000
+ 10
+760010.512882
+ 20
+4297970.273690
+ 42
+0.000000
+ 10
+759996.233330
+ 20
+4298777.664558
+ 42
+0.000000
+ 10
+759969.942526
+ 20
+4298863.478482
+ 42
+0.000000
+ 10
+759718.573172
+ 20
+4299688.661811
+ 42
+0.000000
+ 10
+759737.499734
+ 20
+4299694.837664
+ 42
+0.000000
+ 10
+759761.455857
+ 20
+4299706.734388
+ 42
+0.000000
+ 10
+759779.513793
+ 20
+4299712.881900
+ 42
+0.000000
+ 10
+759830.285953
+ 20
+4299728.990821
+ 42
+0.000000
+ 10
+759897.669574
+ 20
+4299742.310692
+ 42
+0.000000
+ 10
+759933.675963
+ 20
+4299757.936497
+ 42
+0.000000
+ 10
+759995.993466
+ 20
+4299766.646313
+ 42
+0.000000
+ 10
+760018.466661
+ 20
+4299770.716673
+ 42
+0.000000
+ 10
+760163.181908
+ 20
+4299812.132554
+ 42
+0.000000
+ 10
+760227.017462
+ 20
+4299827.561397
+ 42
+0.000000
+ 10
+760292.772039
+ 20
+4299837.497606
+ 42
+0.000000
+ 10
+760315.208517
+ 20
+4299842.678858
+ 42
+0.000000
+ 10
+760401.808001
+ 20
+4299853.300150
+ 42
+0.000000
+ 10
+760422.507298
+ 20
+4299858.424681
+ 42
+0.000000
+ 10
+760442.265129
+ 20
+4299865.740815
+ 42
+0.000000
+ 10
+760482.466959
+ 20
+4299885.951931
+ 42
+0.000000
+ 10
+760523.792364
+ 20
+4299898.421551
+ 42
+0.000000
+ 10
+760566.095598
+ 20
+4299907.589824
+ 42
+0.000000
+ 10
+760609.121397
+ 20
+4299921.227003
+ 42
+0.000000
+ 10
+760697.311022
+ 20
+4299936.348799
+ 42
+0.000000
+ 10
+760739.577434
+ 20
+4299946.628052
+ 42
+0.000000
+ 10
+760804.389187
+ 20
+4299958.760099
+ 42
+0.000000
+ 10
+760843.144740
+ 20
+4299970.035712
+ 42
+0.000000
+ 10
+760866.412629
+ 20
+4299976.357160
+ 42
+0.000000
+ 10
+760909.656762
+ 20
+4299983.335801
+ 42
+0.000000
+ 10
+760953.659804
+ 20
+4299993.673365
+ 42
+0.000000
+ 10
+761041.957881
+ 20
+4300005.468957
+ 42
+0.000000
+ 10
+761128.299430
+ 20
+4300023.868567
+ 42
+0.000000
+ 10
+761191.409711
+ 20
+4300034.836609
+ 42
+0.000000
+ 10
+761212.108186
+ 20
+4300039.963249
+ 42
+0.000000
+ 10
+761233.565480
+ 20
+4300048.448660
+ 42
+0.000000
+ 10
+761270.180849
+ 20
+4300071.879597
+ 42
+0.000000
+ 10
+761762.596468
+ 20
+4300273.694694
+ 42
+0.000000
+ 10
+761831.157303
+ 20
+4300224.840580
+ 42
+0.000000
+ 10
+761943.339610
+ 20
+4300145.201413
+ 42
+0.000000
+ 10
+762399.160345
+ 20
+4300401.411789
+ 42
+0.000000
+ 10
+762518.014192
+ 20
+4300304.221078
+ 42
+0.000000
+ 10
+762558.309796
+ 20
+4300268.883603
+ 42
+0.000000
+ 10
+762784.001730
+ 20
+4300096.334908
+ 42
+0.000000
+ 10
+762948.544136
+ 20
+4300247.363683
+ 42
+0.000000
+ 10
+762995.523159
+ 20
+4300430.057112
+ 42
+0.000000
+ 10
+762905.015402
+ 20
+4300563.741127
+ 42
+0.000000
+ 10
+762956.570863
+ 20
+4300713.248386
+ 42
+0.000000
+ 10
+763043.730498
+ 20
+4300863.937261
+ 42
+0.000000
+ 10
+763276.942494
+ 20
+4300936.130859
+ 42
+0.000000
+ 10
+763385.975518
+ 20
+4301160.894313
+ 42
+0.000000
+ 10
+763672.567702
+ 20
+4301039.290353
+ 42
+0.000000
+ 10
+763722.037404
+ 20
+4300649.768166
+ 42
+0.000000
+ 10
+763731.147617
+ 20
+4300663.406409
+ 42
+0.000000
+ 10
+763775.699769
+ 20
+4300709.339162
+ 42
+0.000000
+ 10
+763804.415297
+ 20
+4300734.742426
+ 42
+0.000000
+ 10
+763818.551398
+ 20
+4300754.104362
+ 42
+0.000000
+ 10
+763836.697328
+ 20
+4300783.601202
+ 42
+0.000000
+ 10
+763865.394289
+ 20
+4300835.674661
+ 42
+0.000000
+ 10
+763903.385186
+ 20
+4300895.836502
+ 42
+0.000000
+ 10
+763930.067106
+ 20
+4300930.062825
+ 42
+0.000000
+ 10
+764037.864419
+ 20
+4301034.777863
+ 42
+0.000000
+ 10
+764078.181373
+ 20
+4301077.237800
+ 42
+0.000000
+ 10
+764087.290434
+ 20
+4301090.876516
+ 42
+0.000000
+ 10
+764119.919836
+ 20
+4301155.306186
+ 42
+0.000000
+ 10
+764256.384292
+ 20
+4301338.769281
+ 42
+0.000000
+ 10
+764280.753915
+ 20
+4301364.029757
+ 42
+0.000000
+ 10
+764560.641979
+ 20
+4301547.836363
+ 42
+0.000000
+ 10
+764579.174403
+ 20
+4301539.564606
+ 42
+0.000000
+ 10
+764598.464101
+ 20
+4301534.652013
+ 42
+0.000000
+ 10
+764682.347889
+ 20
+4301521.894328
+ 42
+0.000000
+ 10
+764763.812222
+ 20
+4301503.500274
+ 42
+0.000000
+ 10
+764784.044698
+ 20
+4301496.397031
+ 42
+0.000000
+ 10
+764804.997289
+ 20
+4301493.763033
+ 42
+0.000000
+ 10
+764845.351167
+ 20
+4301482.886943
+ 42
+0.000000
+ 10
+764864.752479
+ 20
+4301474.644841
+ 42
+0.000000
+ 10
+764884.910958
+ 20
+4301469.761942
+ 42
+0.000000
+ 10
+764922.882486
+ 20
+4301452.138903
+ 42
+0.000000
+ 10
+764942.358162
+ 20
+4301441.676889
+ 42
+0.000000
+ 10
+765021.300428
+ 20
+4301368.747962
+ 42
+0.000000
+ 10
+765063.748461
+ 20
+4301321.270397
+ 42
+0.000000
+ 10
+765078.993939
+ 20
+4301307.333381
+ 42
+0.000000
+ 10
+765092.576877
+ 20
+4301291.118222
+ 42
+0.000000
+ 10
+765107.822461
+ 20
+4301277.181256
+ 42
+0.000000
+ 10
+765134.157307
+ 20
+4301243.611958
+ 42
+0.000000
+ 10
+765151.102770
+ 20
+4301230.843199
+ 42
+0.000000
+ 10
+765228.349265
+ 20
+4301156.748012
+ 42
+0.000000
+ 10
+765246.126358
+ 20
+4301145.118539
+ 42
+0.000000
+ 10
+765261.409625
+ 20
+4301130.071795
+ 42
+0.000000
+ 10
+765295.264357
+ 20
+4301105.644860
+ 42
+0.000000
+ 10
+765311.379084
+ 20
+4301091.737311
+ 42
+0.000000
+ 10
+765347.765157
+ 20
+4301069.617861
+ 42
+0.000000
+ 10
+765447.743339
+ 20
+4300991.840147
+ 42
+0.000000
+ 10
+765483.298984
+ 20
+4300968.582156
+ 42
+0.000000
+ 10
+765520.517406
+ 20
+4300947.602575
+ 42
+0.000000
+ 10
+765562.412919
+ 20
+4300916.778159
+ 42
+0.000000
+ 10
+765608.539515
+ 20
+4300889.429550
+ 42
+0.000000
+ 10
+765642.136053
+ 20
+4300872.774333
+ 42
+0.000000
+ 10
+765843.147655
+ 20
+4300763.936367
+ 42
+0.000000
+ 10
+765891.720401
+ 20
+4300637.765855
+ 42
+0.000000
+ 10
+765936.597103
+ 20
+4300518.139370
+ 42
+0.000000
+ 10
+765988.323582
+ 20
+4300427.636522
+ 42
+0.000000
+ 10
+766056.095414
+ 20
+4300247.657084
+ 42
+0.000000
+ 10
+766137.219832
+ 20
+4300110.355405
+ 42
+0.000000
+ 10
+766222.230947
+ 20
+4299960.960517
+ 42
+0.000000
+ 10
+766328.314620
+ 20
+4299805.606034
+ 42
+0.000000
+ 10
+766434.461547
+ 20
+4299700.263325
+ 42
+0.000000
+ 10
+766505.158325
+ 20
+4299614.845448
+ 42
+0.000000
+ 10
+766549.872702
+ 20
+4299526.332378
+ 42
+0.000000
+ 10
+766587.766896
+ 20
+4299382.025175
+ 42
+0.000000
+ 10
+766640.903640
+ 20
+4299198.223477
+ 42
+0.000000
+ 10
+766664.539106
+ 20
+4299090.110238
+ 42
+0.000000
+ 10
+766679.210802
+ 20
+4299041.706076
+ 42
+0.000000
+ 10
+766711.720398
+ 20
+4298928.334692
+ 42
+0.000000
+ 10
+766819.959992
+ 20
+4298631.921992
+ 42
+0.000000
+ 10
+766867.407438
+ 20
+4298462.376832
+ 42
+0.000000
+ 10
+766881.239598
+ 20
+4298387.273374
+ 42
+0.000000
+ 10
+766877.435608
+ 20
+4298319.355930
+ 42
+0.000000
+ 10
+766838.856622
+ 20
+4298095.798068
+ 42
+0.000000
+ 10
+766717.403179
+ 20
+4297879.456944
+ 42
+0.000000
+ 10
+766602.829848
+ 20
+4297691.131883
+ 42
+0.000000
+ 10
+766627.099721
+ 20
+4297305.215176
+ 42
+0.000000
+ 10
+766588.522948
+ 20
+4297288.361399
+ 42
+0.000000
+ 10
+766579.983446
+ 20
+4297283.629435
+ 42
+0.000000
+ 10
+766175.463874
+ 20
+4297103.361511
+ 42
+0.000000
+ 10
+765352.230753
+ 20
+4296905.776197
+ 42
+0.000000
+ 10
+764927.130946
+ 20
+4296689.327120
+ 42
+0.000000
+ 10
+764523.695558
+ 20
+4296526.965500
+ 42
+0.000000
+ 10
+764078.049935
+ 20
+4296273.209313
+ 42
+0.000000
+ 10
+763944.061336
+ 20
+4295305.289342
+ 42
+0.000000
+ 10
+763607.471850
+ 20
+4294987.404904
+ 42
+0.000000
+ 10
+762785.540619
+ 20
+4295242.430441
+ 42
+0.000000
+ 10
+762119.169154
+ 20
+4295267.085456
+ 42
+0.000000
+ 10
+761206.217688
+ 20
+4295541.488833
+ 42
+0.000000
+ 10
+761003.394843
+ 20
+4296471.587392
+ 42
+0.000000
+ 10
+760990.938088
+ 20
+4296480.067774
+ 42
+0.000000
+ 10
+760569.125883
+ 20
+4296769.578689
+ 42
+0.000000
+ 10
+759968.009090
+ 20
+4296984.340212
+ 42
+0.000000
+ 10
+759827.669978
+ 20
+4297445.346206
+ 42
+0.000000
+ 10
+759836.354763
+ 20
+4297472.299741
+ 42
+0.000000
+ 10
+759836.354763
+ 20
+4297472.299741
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    72
+100
+AcDbEntity
+  8
+Novena
+ 62
+     8
+100
+AcDbPolyline
+ 90
+    56
+ 70
+     1
+ 38
+0.000
+ 10
+763520.598486
+ 20
+4291229.600306
+ 42
+0.000000
+ 10
+763655.069443
+ 20
+4291400.744280
+ 42
+0.000000
+ 10
+763717.086405
+ 20
+4291761.734704
+ 42
+0.000000
+ 10
+763374.071202
+ 20
+4291711.473271
+ 42
+0.000000
+ 10
+763489.070677
+ 20
+4292049.768859
+ 42
+0.000000
+ 10
+763757.640868
+ 20
+4292139.794419
+ 42
+0.000000
+ 10
+763939.067412
+ 20
+4292128.034579
+ 42
+0.000000
+ 10
+764094.727318
+ 20
+4292446.577732
+ 42
+0.000000
+ 10
+764296.157655
+ 20
+4292827.766065
+ 42
+0.000000
+ 10
+764206.487097
+ 20
+4293038.147318
+ 42
+0.000000
+ 10
+764252.745120
+ 20
+4293505.303532
+ 42
+0.000000
+ 10
+764805.706666
+ 20
+4293468.144350
+ 42
+0.000000
+ 10
+765386.860623
+ 20
+4293473.081532
+ 42
+0.000000
+ 10
+765399.067495
+ 20
+4293472.377858
+ 42
+0.000000
+ 10
+765397.831112
+ 20
+4293431.219381
+ 42
+0.000000
+ 10
+765392.767187
+ 20
+4293374.375251
+ 42
+0.000000
+ 10
+765384.077737
+ 20
+4293321.855185
+ 42
+0.000000
+ 10
+765371.301082
+ 20
+4293261.419764
+ 42
+0.000000
+ 10
+765356.101560
+ 20
+4293195.347129
+ 42
+0.000000
+ 10
+765341.956304
+ 20
+4293123.753375
+ 42
+0.000000
+ 10
+765334.967632
+ 20
+4293072.401487
+ 42
+0.000000
+ 10
+765331.641373
+ 20
+4293015.615494
+ 42
+0.000000
+ 10
+765331.920637
+ 20
+4292981.175330
+ 42
+0.000000
+ 10
+765333.901494
+ 20
+4292947.903237
+ 42
+0.000000
+ 10
+765340.545317
+ 20
+4292879.226032
+ 42
+0.000000
+ 10
+765350.592459
+ 20
+4292812.884976
+ 42
+0.000000
+ 10
+765363.877649
+ 20
+4292727.760362
+ 42
+0.000000
+ 10
+765373.240932
+ 20
+4292655.840127
+ 42
+0.000000
+ 10
+765379.052724
+ 20
+4292586.023897
+ 42
+0.000000
+ 10
+765382.404627
+ 20
+4292511.680468
+ 42
+0.000000
+ 10
+765383.037199
+ 20
+4292440.580097
+ 42
+0.000000
+ 10
+765379.396844
+ 20
+4292367.114567
+ 42
+0.000000
+ 10
+765371.520483
+ 20
+4292290.173855
+ 42
+0.000000
+ 10
+765360.924516
+ 20
+4292216.476230
+ 42
+0.000000
+ 10
+765348.515352
+ 20
+4292144.940680
+ 42
+0.000000
+ 10
+765396.532891
+ 20
+4291827.608070
+ 42
+0.000000
+ 10
+765467.729978
+ 20
+4291572.169276
+ 42
+0.000000
+ 10
+765494.464627
+ 20
+4291136.331765
+ 42
+0.000000
+ 10
+765527.558546
+ 20
+4290822.946559
+ 42
+0.000000
+ 10
+765535.110260
+ 20
+4290753.188535
+ 42
+0.000000
+ 10
+765640.231714
+ 20
+4290498.882977
+ 42
+0.000000
+ 10
+765458.639993
+ 20
+4290279.457874
+ 42
+0.000000
+ 10
+765259.755103
+ 20
+4290421.734358
+ 42
+0.000000
+ 10
+764729.159025
+ 20
+4290277.377369
+ 42
+0.000000
+ 10
+764712.878054
+ 20
+4290295.727092
+ 42
+0.000000
+ 10
+764687.384009
+ 20
+4290329.327976
+ 42
+0.000000
+ 10
+764680.131687
+ 20
+4290337.976786
+ 42
+0.000000
+ 10
+764633.824644
+ 20
+4290395.333152
+ 42
+0.000000
+ 10
+764619.172558
+ 20
+4290417.070992
+ 42
+0.000000
+ 10
+764608.794704
+ 20
+4290441.173533
+ 42
+0.000000
+ 10
+764444.376722
+ 20
+4290542.387426
+ 42
+0.000000
+ 10
+764036.518934
+ 20
+4290634.409526
+ 42
+0.000000
+ 10
+763760.288693
+ 20
+4290616.356145
+ 42
+0.000000
+ 10
+763461.290238
+ 20
+4291154.293176
+ 42
+0.000000
+ 10
+763520.598486
+ 20
+4291229.600306
+ 42
+0.000000
+ 10
+763520.598486
+ 20
+4291229.600306
+ 42
+0.000000
+  0
+LWPOLYLINE
+  5
+    73
+100
+AcDbEntity
+  8
+Decima
+ 62
+     9
+100
+AcDbPolyline
+ 90
+   164
+ 70
+     1
+ 38
+0.000
+ 10
+772052.446817
+ 20
+4291435.732230
+ 42
+0.000000
+ 10
+772443.495770
+ 20
+4291329.091512
+ 42
+0.000000
+ 10
+772646.453989
+ 20
+4291274.921454
+ 42
+0.000000
+ 10
+772687.471508
+ 20
+4291119.626057
+ 42
+0.000000
+ 10
+772976.069882
+ 20
+4290015.941796
+ 42
+0.000000
+ 10
+772991.349761
+ 20
+4290002.018328
+ 42
+0.000000
+ 10
+773120.472157
+ 20
+4289893.090458
+ 42
+0.000000
+ 10
+773148.385699
+ 20
+4289866.264548
+ 42
+0.000000
+ 10
+773239.130239
+ 20
+4289759.355111
+ 42
+0.000000
+ 10
+773342.358445
+ 20
+4289643.984388
+ 42
+0.000000
+ 10
+773380.145767
+ 20
+4289608.607398
+ 42
+0.000000
+ 10
+773436.388761
+ 20
+4289568.307833
+ 42
+0.000000
+ 10
+773444.674163
+ 20
+4289555.256145
+ 42
+0.000000
+ 10
+773547.221074
+ 20
+4289459.868784
+ 42
+0.000000
+ 10
+773551.722483
+ 20
+4289455.578045
+ 42
+0.000000
+ 10
+773568.064958
+ 20
+4289436.135210
+ 42
+0.000000
+ 10
+773613.499287
+ 20
+4289381.017438
+ 42
+0.000000
+ 10
+773657.949942
+ 20
+4289329.200151
+ 42
+0.000000
+ 10
+773681.518314
+ 20
+4289302.226399
+ 42
+0.000000
+ 10
+774003.777952
+ 20
+4288921.000766
+ 42
+0.000000
+ 10
+774212.268041
+ 20
+4288430.285873
+ 42
+0.000000
+ 10
+774389.717982
+ 20
+4288158.556637
+ 42
+0.000000
+ 10
+774503.632887
+ 20
+4287986.886218
+ 42
+0.000000
+ 10
+774468.957076
+ 20
+4287678.951932
+ 42
+0.000000
+ 10
+774510.375211
+ 20
+4287488.112116
+ 42
+0.000000
+ 10
+774428.390064
+ 20
+4287036.292535
+ 42
+0.000000
+ 10
+774464.999403
+ 20
+4286858.623284
+ 42
+0.000000
+ 10
+774259.234408
+ 20
+4286687.053271
+ 42
+0.000000
+ 10
+774317.592682
+ 20
+4286510.132461
+ 42
+0.000000
+ 10
+774219.784102
+ 20
+4286340.059961
+ 42
+0.000000
+ 10
+774076.694732
+ 20
+4286143.981206
+ 42
+0.000000
+ 10
+773889.632871
+ 20
+4285959.730341
+ 42
+0.000000
+ 10
+773783.092477
+ 20
+4286372.828985
+ 42
+0.000000
+ 10
+773617.934178
+ 20
+4286895.050655
+ 42
+0.000000
+ 10
+773507.643143
+ 20
+4286834.583392
+ 42
+0.000000
+ 10
+773315.718120
+ 20
+4286766.870873
+ 42
+0.000000
+ 10
+773116.438437
+ 20
+4286761.146903
+ 42
+0.000000
+ 10
+772879.062259
+ 20
+4286774.127050
+ 42
+0.000000
+ 10
+772791.791396
+ 20
+4286778.917253
+ 42
+0.000000
+ 10
+772569.667288
+ 20
+4286753.531686
+ 42
+0.000000
+ 10
+772344.322021
+ 20
+4286771.384718
+ 42
+0.000000
+ 10
+772080.975999
+ 20
+4286601.240549
+ 42
+0.000000
+ 10
+771843.906164
+ 20
+4286528.689104
+ 42
+0.000000
+ 10
+771734.621618
+ 20
+4286412.715465
+ 42
+0.000000
+ 10
+771486.723588
+ 20
+4286069.752125
+ 42
+0.000000
+ 10
+771079.513021
+ 20
+4285492.443675
+ 42
+0.000000
+ 10
+771005.190782
+ 20
+4285269.873263
+ 42
+0.000000
+ 10
+770730.488316
+ 20
+4285406.119501
+ 42
+0.000000
+ 10
+770427.656611
+ 20
+4285344.716320
+ 42
+0.000000
+ 10
+770413.402231
+ 20
+4285405.355116
+ 42
+0.000000
+ 10
+770390.446252
+ 20
+4285465.698662
+ 42
+0.000000
+ 10
+770364.959311
+ 20
+4285549.294056
+ 42
+0.000000
+ 10
+770355.165447
+ 20
+4285581.189984
+ 42
+0.000000
+ 10
+770342.459883
+ 20
+4285621.877677
+ 42
+0.000000
+ 10
+770315.195799
+ 20
+4285706.524191
+ 42
+0.000000
+ 10
+770288.229355
+ 20
+4285756.730011
+ 42
+0.000000
+ 10
+770270.567045
+ 20
+4285789.470411
+ 42
+0.000000
+ 10
+770239.367589
+ 20
+4285861.759114
+ 42
+0.000000
+ 10
+770213.389371
+ 20
+4285934.224974
+ 42
+0.000000
+ 10
+770192.515018
+ 20
+4285984.637633
+ 42
+0.000000
+ 10
+770168.696130
+ 20
+4286070.512615
+ 42
+0.000000
+ 10
+770162.685009
+ 20
+4286093.646430
+ 42
+0.000000
+ 10
+770154.067971
+ 20
+4286142.252169
+ 42
+0.000000
+ 10
+770147.454676
+ 20
+4286183.146639
+ 42
+0.000000
+ 10
+770145.563923
+ 20
+4286187.527793
+ 42
+0.000000
+ 10
+770145.831773
+ 20
+4286205.317944
+ 42
+0.000000
+ 10
+770152.081665
+ 20
+4286252.205188
+ 42
+0.000000
+ 10
+770185.571775
+ 20
+4286317.797335
+ 42
+0.000000
+ 10
+770221.939127
+ 20
+4286401.268366
+ 42
+0.000000
+ 10
+770269.582652
+ 20
+4286511.793863
+ 42
+0.000000
+ 10
+770328.840323
+ 20
+4286639.383717
+ 42
+0.000000
+ 10
+770327.299388
+ 20
+4286710.455905
+ 42
+0.000000
+ 10
+770327.491330
+ 20
+4286730.466181
+ 42
+0.000000
+ 10
+770327.265297
+ 20
+4286737.126431
+ 42
+0.000000
+ 10
+770328.300244
+ 20
+4286834.957739
+ 42
+0.000000
+ 10
+770295.962234
+ 20
+4286863.865932
+ 42
+0.000000
+ 10
+770246.073418
+ 20
+4286896.624011
+ 42
+0.000000
+ 10
+770234.348899
+ 20
+4286908.450729
+ 42
+0.000000
+ 10
+770214.078750
+ 20
+4286941.102608
+ 42
+0.000000
+ 10
+770138.926901
+ 20
+4286999.675898
+ 42
+0.000000
+ 10
+770074.098979
+ 20
+4287036.373521
+ 42
+0.000000
+ 10
+770013.772198
+ 20
+4287068.778949
+ 42
+0.000000
+ 10
+769972.167348
+ 20
+4287088.483588
+ 42
+0.000000
+ 10
+769909.645242
+ 20
+4287108.590844
+ 42
+0.000000
+ 10
+769894.592033
+ 20
+4287115.859926
+ 42
+0.000000
+ 10
+769876.853647
+ 20
+4287125.260676
+ 42
+0.000000
+ 10
+769860.817676
+ 20
+4287135.830460
+ 42
+0.000000
+ 10
+769841.908512
+ 20
+4287154.082133
+ 42
+0.000000
+ 10
+769830.072149
+ 20
+4287169.239521
+ 42
+0.000000
+ 10
+769822.016626
+ 20
+4287175.634494
+ 42
+0.000000
+ 10
+769802.919618
+ 20
+4287199.436454
+ 42
+0.000000
+ 10
+769786.432661
+ 20
+4287223.326866
+ 42
+0.000000
+ 10
+769783.597105
+ 20
+4287229.898700
+ 42
+0.000000
+ 10
+769664.136597
+ 20
+4287362.544436
+ 42
+0.000000
+ 10
+769635.358139
+ 20
+4287389.352842
+ 42
+0.000000
+ 10
+769562.524091
+ 20
+4287456.899844
+ 42
+0.000000
+ 10
+769351.633352
+ 20
+4287666.469561
+ 42
+0.000000
+ 10
+769158.707565
+ 20
+4287834.421504
+ 42
+0.000000
+ 10
+768946.607088
+ 20
+4287848.369507
+ 42
+0.000000
+ 10
+768723.390684
+ 20
+4287753.040207
+ 42
+0.000000
+ 10
+768360.766823
+ 20
+4287788.596658
+ 42
+0.000000
+ 10
+768253.269975
+ 20
+4287670.510851
+ 42
+0.000000
+ 10
+768071.559210
+ 20
+4287454.356794
+ 42
+0.000000
+ 10
+767982.307875
+ 20
+4287751.402204
+ 42
+0.000000
+ 10
+768005.293641
+ 20
+4287818.853484
+ 42
+0.000000
+ 10
+768008.858554
+ 20
+4287842.310660
+ 42
+0.000000
+ 10
+768008.778106
+ 20
+4287922.321175
+ 42
+0.000000
+ 10
+768004.871232
+ 20
+4287986.644773
+ 42
+0.000000
+ 10
+767993.706416
+ 20
+4288059.614435
+ 42
+0.000000
+ 10
+767983.475783
+ 20
+4288104.833175
+ 42
+0.000000
+ 10
+767976.500541
+ 20
+4288156.829262
+ 42
+0.000000
+ 10
+767976.623167
+ 20
+4288179.059289
+ 42
+0.000000
+ 10
+767983.779418
+ 20
+4288199.303472
+ 42
+0.000000
+ 10
+767996.154794
+ 20
+4288219.723348
+ 42
+0.000000
+ 10
+768005.808424
+ 20
+4288243.385513
+ 42
+0.000000
+ 10
+768015.050934
+ 20
+4288279.258107
+ 42
+0.000000
+ 10
+767997.738994
+ 20
+4288302.012536
+ 42
+0.000000
+ 10
+768057.779244
+ 20
+4288355.153494
+ 42
+0.000000
+ 10
+768027.382808
+ 20
+4288663.070460
+ 42
+0.000000
+ 10
+768070.700437
+ 20
+4289290.189759
+ 42
+0.000000
+ 10
+768274.778888
+ 20
+4289590.449748
+ 42
+0.000000
+ 10
+768265.191213
+ 20
+4290288.024318
+ 42
+0.000000
+ 10
+768484.128425
+ 20
+4290585.460198
+ 42
+0.000000
+ 10
+768534.852594
+ 20
+4290784.984862
+ 42
+0.000000
+ 10
+768490.866302
+ 20
+4290979.090161
+ 42
+0.000000
+ 10
+768432.767870
+ 20
+4291256.067338
+ 42
+0.000000
+ 10
+768429.027506
+ 20
+4291263.720254
+ 42
+0.000000
+ 10
+768262.111468
+ 20
+4291592.591707
+ 42
+0.000000
+ 10
+768076.401200
+ 20
+4291756.359080
+ 42
+0.000000
+ 10
+767904.272112
+ 20
+4292240.642804
+ 42
+0.000000
+ 10
+767667.495492
+ 20
+4293042.806791
+ 42
+0.000000
+ 10
+768264.541402
+ 20
+4293326.313442
+ 42
+0.000000
+ 10
+768416.587574
+ 20
+4293308.108988
+ 42
+0.000000
+ 10
+768953.884241
+ 20
+4293452.961565
+ 42
+0.000000
+ 10
+769505.295013
+ 20
+4293566.102206
+ 42
+0.000000
+ 10
+769966.462617
+ 20
+4293491.735570
+ 42
+0.000000
+ 10
+770084.572002
+ 20
+4293473.521533
+ 42
+0.000000
+ 10
+770112.578181
+ 20
+4293468.916594
+ 42
+0.000000
+ 10
+770880.770394
+ 20
+4293630.643849
+ 42
+0.000000
+ 10
+770869.633910
+ 20
+4293191.284620
+ 42
+0.000000
+ 10
+770965.199442
+ 20
+4292787.790831
+ 42
+0.000000
+ 10
+770930.391836
+ 20
+4292583.229282
+ 42
+0.000000
+ 10
+770675.997147
+ 20
+4292513.440758
+ 42
+0.000000
+ 10
+770678.453997
+ 20
+4292492.409003
+ 42
+0.000000
+ 10
+770675.316475
+ 20
+4292482.300158
+ 42
+0.000000
+ 10
+770671.725223
+ 20
+4292459.951167
+ 42
+0.000000
+ 10
+770667.718261
+ 20
+4292449.812729
+ 42
+0.000000
+ 10
+770653.429455
+ 20
+4292434.878939
+ 42
+0.000000
+ 10
+770650.972355
+ 20
+4292430.349953
+ 42
+0.000000
+ 10
+770646.662718
+ 20
+4292403.531184
+ 42
+0.000000
+ 10
+770639.480285
+ 20
+4292384.393988
+ 42
+0.000000
+ 10
+770634.981648
+ 20
+4292363.125480
+ 42
+0.000000
+ 10
+770632.523236
+ 20
+4292281.914291
+ 42
+0.000000
+ 10
+771040.943711
+ 20
+4291842.399241
+ 42
+0.000000
+ 10
+771112.506205
+ 20
+4291837.059248
+ 42
+0.000000
+ 10
+771127.664913
+ 20
+4291852.023483
+ 42
+0.000000
+ 10
+771143.957983
+ 20
+4291859.247042
+ 42
+0.000000
+ 10
+771160.894489
+ 20
+4291847.599777
+ 42
+0.000000
+ 10
+771167.397235
+ 20
+4291835.596758
+ 42
+0.000000
+ 10
+771150.499589
+ 20
+4291820.573153
+ 42
+0.000000
+ 10
+771132.316082
+ 20
+4291817.730497
+ 42
+0.000000
+ 10
+771115.230031
+ 20
+4291782.696424
+ 42
+0.000000
+ 10
+772052.446817
+ 20
+4291435.732230
+ 42
+0.000000
+ 10
+772052.446817
+ 20
+4291435.732230
+ 42
+0.000000
+  0
+ENDSEC
+  0
+SECTION
+  2
+OBJECTS
+  0
+DICTIONARY
+  5
+C
+100
+AcDbDictionary
+280
+     0
+281
+     1
+  3
+ACAD_GROUP
+350
+D
+  3
+ACAD_LAYOUT
+350
+1A
+  3
+ACAD_MLINESTYLE
+350
+17
+  3
+ACAD_PLOTSETTINGS
+350
+19
+  3
+ACAD_PLOTSTYLENAME
+350
+E
+  3
+AcDbVariableDictionary
+350
+2C
+  0
+DICTIONARY
+  5
+D
+100
+AcDbDictionary
+280
+     0
+281
+     1
+  0
+ACDBDICTIONARYWDFLT
+  5
+E
+100
+AcDbDictionary
+281
+     1
+  3
+Normal
+350
+F
+100
+AcDbDictionaryWithDefault
+340
+F
+  0
+ACDBPLACEHOLDER
+  5
+F
+  0
+DICTIONARY
+  5
+17
+100
+AcDbDictionary
+280
+     0
+281
+     1
+  3
+Standard
+350
+18
+  0
+MLINESTYLE
+  5
+18
+100
+AcDbMlineStyle
+  2
+STANDARD
+ 70
+     0
+  3
+
+ 62
+   256
+ 51
+90.0000
+ 52
+90.0000
+ 71
+     2
+ 49
+0.5000
+ 62
+   256
+  6
+BYLAYER
+ 49
+-0.5000
+ 62
+   256
+  6
+BYLAYER
+  0
+DICTIONARY
+  5
+19
+100
+AcDbDictionary
+280
+     0
+281
+     1
+  0
+DICTIONARY
+  5
+1A
+100
+AcDbDictionary
+281
+     1
+  3
+Layout1
+350
+1E
+  3
+Layout2
+350
+26
+  3
+Model
+350
+22
+  0
+LAYOUT
+  5
+1E
+100
+AcDbPlotSettings
+  1
+
+  2
+C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3
+  4
+
+  6
+
+ 40
+0.0000
+ 41
+0.0000
+ 42
+0.0000
+ 43
+0.0000
+ 44
+0.0000
+ 45
+0.0000
+ 46
+0.0000
+ 47
+0.0000
+ 48
+0.0000
+ 49
+0.0000
+140
+0.0000
+141
+0.0000
+142
+1.0000
+143
+1.0000
+ 70
+   688
+ 72
+     0
+ 73
+     0
+ 74
+     5
+  7
+
+ 75
+    16
+147
+1.0000
+148
+0.0000
+149
+0.0000
+100
+AcDbLayout
+  1
+Layout1
+ 70
+     1
+ 71
+     1
+ 10
+0.0000
+ 20
+0.0000
+ 11
+420.0000
+ 21
+297.0000
+ 12
+0.0000
+ 22
+0.0000
+ 32
+0.0000
+ 14
+100000000000000000000.0000
+ 24
+100000000000000000000.0000
+ 34
+100000000000000000000.0000
+ 15
+-100000000000000000000.0000
+ 25
+-100000000000000000000.0000
+ 35
+-100000000000000000000.0000
+146
+0.0000
+ 13
+0.0000
+ 23
+0.0000
+ 33
+0.0000
+ 16
+1.0000
+ 26
+0.0000
+ 36
+0.0000
+ 17
+0.0000
+ 27
+1.0000
+ 37
+0.0000
+ 76
+     0
+330
+1B
+  0
+LAYOUT
+  5
+22
+100
+AcDbPlotSettings
+  1
+
+  2
+C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3
+  4
+
+  6
+
+ 40
+0.0000
+ 41
+0.0000
+ 42
+0.0000
+ 43
+0.0000
+ 44
+0.0000
+ 45
+0.0000
+ 46
+0.0000
+ 47
+0.0000
+ 48
+0.0000
+ 49
+0.0000
+140
+0.0000
+141
+0.0000
+142
+1.0000
+143
+1.0000
+ 70
+  1712
+ 72
+     0
+ 73
+     0
+ 74
+     0
+  7
+
+ 75
+     0
+147
+1.0000
+148
+0.0000
+149
+0.0000
+100
+AcDbLayout
+  1
+Model
+ 70
+     1
+ 71
+     0
+ 10
+0.0000
+ 20
+0.0000
+ 11
+12.0000
+ 21
+9.0000
+ 12
+0.0000
+ 22
+0.0000
+ 32
+0.0000
+ 14
+0.0000
+ 24
+0.0000
+ 34
+0.0000
+ 15
+0.0000
+ 25
+0.0000
+ 35
+0.0000
+146
+0.0000
+ 13
+0.0000
+ 23
+0.0000
+ 33
+0.0000
+ 16
+1.0000
+ 26
+0.0000
+ 36
+0.0000
+ 17
+0.0000
+ 27
+1.0000
+ 37
+0.0000
+ 76
+     0
+330
+1F
+  0
+LAYOUT
+  5
+26
+100
+AcDbPlotSettings
+  1
+
+  2
+C:\Program Files\AutoCAD 2002\plotters\DWF ePlot (optimized for plotting).pc3
+  4
+
+  6
+
+ 40
+0.0000
+ 41
+0.0000
+ 42
+0.0000
+ 43
+0.0000
+ 44
+0.0000
+ 45
+0.0000
+ 46
+0.0000
+ 47
+0.0000
+ 48
+0.0000
+ 49
+0.0000
+140
+0.0000
+141
+0.0000
+142
+1.0000
+143
+1.0000
+ 70
+   688
+ 72
+     0
+ 73
+     0
+ 74
+     5
+  7
+
+ 75
+    16
+147
+1.0000
+148
+0.0000
+149
+0.0000
+100
+AcDbLayout
+  1
+Layout2
+ 70
+     1
+ 71
+     2
+ 10
+0.0000
+ 20
+0.0000
+ 11
+12.0000
+ 21
+9.0000
+ 12
+0.0000
+ 22
+0.0000
+ 32
+0.0000
+ 14
+0.0000
+ 24
+0.0000
+ 34
+0.0000
+ 15
+0.0000
+ 25
+0.0000
+ 35
+0.0000
+146
+0.0000
+ 13
+0.0000
+ 23
+0.0000
+ 33
+0.0000
+ 16
+1.0000
+ 26
+0.0000
+ 36
+0.0000
+ 17
+0.0000
+ 27
+1.0000
+ 37
+0.0000
+ 76
+     0
+330
+23
+  0
+DICTIONARY
+  5
+    46
+100
+AcDbDictionary
+281
+     1
+  3
+DIMASSOC
+350
+    48
+  3
+HIDETEXT
+350
+    47
+  0
+DICTIONARYVAR
+  5
+    47
+100
+DictionaryVariables
+280
+     0
+  1
+     2
+  0
+DICTIONARYVAR
+  5
+    48
+100
+DictionaryVariables
+280
+     0
+  1
+     1
+  0
+ENDSEC
+  0
+EOF
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/pom.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/pom.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider/pom.xml	(revision 1291)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.dxf.provider</artifactId>
+  <packaging>jar</packaging>
+  <name>${project.artifactId}</name>
+  <description>DAL provider for DXF files</description>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.dxf</artifactId>
+      <version>2.0.266</version>
+  </parent>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.tools.lib</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.projection.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.fmap.dal.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.fmap.dal.spi</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.dxf.lib</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.fmap.geometry.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.fmap.geometry.operation.jts</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.timesupport.lib.api</artifactId>
+        <scope>compile</scope>
+    </dependency>  
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.utils</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
+      <scope>compile</scope>
+    </dependency>
+
+    <!-- TESTS -->
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.tools.lib</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.compat.se</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.dal.impl</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.geometry.operation.jts</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    
+
+    <!--
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.dal.index.spatial.jts</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.geometry.generalpath</artifactId>
+      <scope>test</scope>
+    </dependency>
+    -->
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.projection.cresques.impl</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.timesupport.lib.impl</artifactId>
+      <scope>test</scope>
+    </dependency>   
+    <!--
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.dal</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    -->
+
+
+  </dependencies>
+  
+    <build>
+      <plugins>
+        <plugin>
+          <!-- Skip compilation tests -->
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>default-testCompile</id>
+              <phase>process-test-sources</phase>
+              <goals>
+                <goal>testCompile</goal>
+              </goals>
+              <configuration>
+                <skip>true</skip>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+      </plugins>
+    </build>
+</project>

Property changes on: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.provider
___________________________________________________________________
Added: svn:ignore
   + target


Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/pom.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/pom.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/pom.xml	(revision 1291)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.dxf.app</artifactId>
+  <packaging>pom</packaging>
+  <name>${project.artifactId}</name>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.dxf</artifactId>
+      <version>2.0.266</version>
+  </parent>
+  
+  <modules>
+    <module>org.gvsig.dxf.app.mainplugin</module>
+  </modules>
+
+
+</project>
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/buildNumber.properties
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/buildNumber.properties	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/buildNumber.properties	(revision 1291)
@@ -0,0 +1,2 @@
+#Fri Apr 12 10:52:47 CEST 2024
+buildNumber=2323
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml	(revision 1291)
@@ -0,0 +1,39 @@
+<assembly>
+  <id>gvsig-plugin-package</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <baseDirectory>${project.artifactId}</baseDirectory>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <files>
+    <file>
+      <source>target/${project.artifactId}-${project.version}.jar</source>
+      <outputDirectory>lib</outputDirectory>
+    </file>
+    <file>
+      <source>target/package.info</source>
+    </file>
+  </files>
+
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources-plugin</directory>
+      <outputDirectory>.</outputDirectory>
+    </fileSet>
+  </fileSets>
+
+  <dependencySets>
+    <dependencySet>
+      <useProjectArtifact>false</useProjectArtifact>
+      <useTransitiveDependencies>false</useTransitiveDependencies>
+      <outputDirectory>lib</outputDirectory>
+      <includes>
+        <include>org.gvsig:org.gvsig.dxf.provider.legend</include>
+        <include>org.gvsig:org.gvsig.dxf.provider</include>
+        <include>org.gvsig:org.gvsig.dxf.lib</include>
+        <include>org.gvsig:org.gvsig.dxf.exportto</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
+
+</assembly>
\ No newline at end of file
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/src/main/resources-plugin/config.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/src/main/resources-plugin/config.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/src/main/resources-plugin/config.xml	(revision 1291)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<plugin-config>
+  <libraries library-dir="lib/"/>
+  <depends plugin-name="org.gvsig.app.mainplugin"/>
+  <depends plugin-name="org.gvsig.exportto.app.mainplugin" optional="true"/>
+  <resourceBundle name="text"/>
+  <extensions>
+     <extension class-name="org.gvsig.andami.LibraryExtension" active="false"/>
+  </extensions>
+</plugin-config>
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/pom.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/pom.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/pom.xml	(revision 1291)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>org.gvsig.dxf.app.mainplugin</artifactId>
+  <packaging>jar</packaging> 
+  <name>${project.artifactId}</name>
+  <description>DXF file format support</description>
+  <parent>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.dxf.app</artifactId>
+      <version>2.0.266</version>
+  </parent>
+
+  <dependencies>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.tools.lib</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.andami</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.dxf.provider</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.dxf.lib</artifactId>
+        <scope>runtime</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.dxf.exportto</artifactId>
+        <scope>runtime</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.dxf.provider.legend</artifactId>
+        <scope>compile</scope>
+    </dependency>
+
+  </dependencies>
+  
+    <properties>
+        <!-- Package info property values -->
+        <!-- Default values in org.gvsig.desktop -->
+        <gvsig.package.info.name>Formats: DXF file format support</gvsig.package.info.name>
+        <gvsig.package.info.state>testing</gvsig.package.info.state>
+        <gvsig.package.info.official>true</gvsig.package.info.official>
+        <gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.1.0-A</gvsig.package.info.dependencies>
+        <gvsig.package.info.categories>Formats,Vector</gvsig.package.info.categories>
+        <gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-dxf/pool</gvsig.package.info.poolURL>
+    </properties>
+
+
+</project>

Property changes on: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin
___________________________________________________________________
Added: svn:ignore
   + target


Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/resources/META-INF/services/org.gvsig.tools.library.Library	(revision 1291)
@@ -0,0 +1 @@
+org.gvsig.export.dxf.ExportDXFLibrary
\ No newline at end of file
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/swing/ExportDXFPanels.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/swing/ExportDXFPanels.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/swing/ExportDXFPanels.java	(revision 1291)
@@ -0,0 +1,41 @@
+package org.gvsig.export.dxf.swing;
+
+import org.gvsig.export.ExportParameters;
+import org.gvsig.export.swing.ExportSwingLocator;
+import org.gvsig.export.swing.JExportProcessPanel;
+import org.gvsig.export.swing.spi.AbstractExportPanels;
+import org.gvsig.export.swing.spi.ExportPanels;
+import org.gvsig.export.swing.spi.ExportPanelsFactory;
+import org.gvsig.export.swing.spi.ExportPanelsManager;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class ExportDXFPanels 
+        extends AbstractExportPanels
+        implements ExportPanels
+    {
+
+    ExportDXFPanels(
+            ExportPanelsFactory factory, 
+            JExportProcessPanel processPanel, 
+            ExportParameters parameters
+        ) {
+        super(factory, processPanel, parameters);
+        this.initPanels();
+    }
+    
+    private void initPanels() {
+        ExportPanelsManager manager = ExportSwingLocator.getExportPanelsManager();
+        
+
+        this.add( manager.createStandardPanel(
+                ExportPanelsManager.PANEL_SELECT_OUTPUT_FILE, 
+                this.getProcessPanel(), 
+                this.getParameters()
+            )
+        );
+    }
+    
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/swing/ExportDXFPanelsFactory.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/swing/ExportDXFPanelsFactory.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/swing/ExportDXFPanelsFactory.java	(revision 1291)
@@ -0,0 +1,27 @@
+package org.gvsig.export.dxf.swing;
+
+import org.gvsig.export.ExportParameters;
+import org.gvsig.export.dxf.service.ExportDXFServiceFactory;
+import org.gvsig.export.swing.JExportProcessPanel;
+import org.gvsig.export.swing.spi.AbstractExportPanelsFactory;
+import org.gvsig.export.swing.spi.ExportPanels;
+import org.gvsig.export.swing.spi.ExportPanelsFactory;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class ExportDXFPanelsFactory  
+        extends AbstractExportPanelsFactory
+        implements ExportPanelsFactory {
+
+    public ExportDXFPanelsFactory() {
+        super(ExportDXFServiceFactory.SERVICE_NAME);
+    }
+
+    @Override
+    public ExportPanels createPanels(JExportProcessPanel processPanel, ExportParameters parameters) {
+        return new ExportDXFPanels(this, processPanel, parameters);
+    }
+    
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/ExportDXFLibrary.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/ExportDXFLibrary.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/ExportDXFLibrary.java	(revision 1291)
@@ -0,0 +1,40 @@
+package org.gvsig.export.dxf;
+
+import org.gvsig.export.ExportLibrary;
+import org.gvsig.export.ExportLocator;
+import org.gvsig.export.dxf.service.ExportDXFServiceFactory;
+import org.gvsig.export.dxf.swing.ExportDXFPanelsFactory;
+import org.gvsig.export.spi.ExportServiceManager;
+import org.gvsig.export.swing.ExportSwingLibrary;
+import org.gvsig.export.swing.ExportSwingLocator;
+import org.gvsig.export.swing.spi.ExportPanelsManager;
+import org.gvsig.tools.library.AbstractLibrary;
+import org.gvsig.tools.library.LibraryException;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class ExportDXFLibrary extends AbstractLibrary {
+
+    @Override
+    public void doRegistration() {
+        registerAsServiceOf(ExportSwingLibrary.class);
+        registerAsServiceOf(ExportLibrary.class);
+    }
+
+    @Override
+    protected void doInitialize() throws LibraryException {
+        // Nothing to do
+    }
+
+    @Override
+    protected void doPostInitialize() throws LibraryException {
+        ExportServiceManager manager = ExportLocator.getServiceManager();
+        ExportPanelsManager swingManager = ExportSwingLocator.getExportPanelsManager();
+        
+        manager.register(new ExportDXFServiceFactory());
+        swingManager.register(new ExportDXFPanelsFactory());
+    }
+
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFParameters.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFParameters.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFParameters.java	(revision 1291)
@@ -0,0 +1,14 @@
+package org.gvsig.export.dxf.service;
+
+//import org.gvsig.export.dbf.service.ExportDBFParameters;
+import org.gvsig.export.ExportParametersFile;
+import org.gvsig.export.ExportParametersGeometry;
+import org.gvsig.tools.util.HasAFile;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public interface ExportDXFParameters extends ExportParametersGeometry, ExportParametersFile {
+    
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFParametersImpl.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFParametersImpl.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFParametersImpl.java	(revision 1291)
@@ -0,0 +1,26 @@
+package org.gvsig.export.dxf.service;
+
+import java.io.File;
+import org.apache.commons.io.FilenameUtils;
+import org.gvsig.export.spi.AbstractExportParametersGeometryFile;
+import org.gvsig.export.spi.ExportServiceFactory;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class ExportDXFParametersImpl
+        extends AbstractExportParametersGeometryFile
+        implements ExportDXFParameters
+    {
+    public ExportDXFParametersImpl(ExportServiceFactory factory) {
+        super(factory);
+        this.fileHelper.setFileExtension("dxf");
+    }
+
+    @Override
+    public String getServiceName() {
+        return ExportDXFServiceFactory.SERVICE_NAME;
+    }
+
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFServiceFactory.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFServiceFactory.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFServiceFactory.java	(revision 1291)
@@ -0,0 +1,46 @@
+package org.gvsig.export.dxf.service;
+
+import org.gvsig.export.ExportParameters;
+import org.gvsig.export.spi.AbstractExportServiceFactory;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class ExportDXFServiceFactory 
+        extends AbstractExportServiceFactory 
+    {
+
+    public static final String SERVICE_NAME = "DXF";
+    
+    public ExportDXFServiceFactory() {
+        super(
+                SERVICE_NAME,
+                "DXF file",
+                "DXF file"
+        );
+    }
+
+    @Override
+    public ExportDXFService createService(ExportParameters parameters) {
+        ExportDXFService service = new ExportDXFService(this, (ExportDXFParameters) parameters);
+        return service;
+    }
+
+    @Override
+    public ExportDXFParameters createParameters() {
+        ExportDXFParameters parameters = new ExportDXFParametersImpl(this);
+        return parameters;
+    }
+
+    @Override
+    public boolean hasTabularSupport() {
+        return true;
+    }
+
+    @Override
+    public boolean hasVectorialSupport() {
+        return true;
+    }
+    
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFService.java
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFService.java	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/src/main/java/org/gvsig/export/dxf/service/ExportDXFService.java	(revision 1291)
@@ -0,0 +1,151 @@
+package org.gvsig.export.dxf.service;
+
+import java.util.Objects;
+import org.apache.commons.lang3.StringUtils;
+import org.gvsig.export.ExportAttributes;
+import org.gvsig.export.ExportException;
+import org.gvsig.export.spi.AbstractExportService;
+import org.gvsig.export.spi.ExportService;
+import org.gvsig.export.spi.ExportServiceFactory;
+import org.gvsig.fmap.dal.DALLocator;
+import org.gvsig.fmap.dal.DataManager;
+import org.gvsig.fmap.dal.DataServerExplorer;
+import org.gvsig.fmap.dal.NewDataStoreParameters;
+import org.gvsig.fmap.dal.OpenDataStoreParameters;
+import org.gvsig.fmap.dal.exception.DataException;
+import org.gvsig.fmap.dal.feature.EditableFeature;
+import org.gvsig.fmap.dal.feature.Feature;
+import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
+import org.gvsig.fmap.dal.feature.FeatureType;
+import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
+import org.gvsig.fmap.dal.feature.OpenFeatureStoreParameters;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorer;
+import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters;
+import org.gvsig.tools.util.HasAFile;
+
+/**
+ *
+ * @author jjdelcerro
+ */
+public class ExportDXFService 
+        extends AbstractExportService 
+        implements ExportService 
+    {
+
+    public static final int MAX_FIELD_NAME_LENGTH = 10;
+    
+    protected ExportDXFService(ExportServiceFactory factory, ExportDXFParameters parameters) {
+        super(factory, parameters);
+    }
+
+    @Override
+    public ExportDXFParameters getParameters() {
+        return (ExportDXFParameters) super.getParameters(); 
+    }
+
+    @Override
+    protected DataServerExplorer createServerExplorer() throws ExportException{
+        
+        DataManager dataManager = DALLocator.getDataManager();
+
+        FilesystemServerExplorerParameters explorerParams;
+        try {
+            explorerParams =
+                (FilesystemServerExplorerParameters) dataManager
+                    .createServerExplorerParameters(FilesystemServerExplorer.NAME);
+        } catch (Exception e) {
+            throw new ExportException(e);
+        }
+        explorerParams.setRoot(this.getParameters().getFile().getParent());
+
+        FilesystemServerExplorer explorer;
+        try {
+            explorer = (FilesystemServerExplorer) dataManager.openServerExplorer(
+                    "FilesystemExplorer", explorerParams
+            );
+            return explorer;
+        } catch (Exception e) {
+            throw new ExportException(e);
+        }
+    }
+
+    @Override
+    protected NewDataStoreParameters createTargetNewStoreParameters() throws ExportException {
+        try {
+            FilesystemServerExplorer explorer = (FilesystemServerExplorer) this.createServerExplorer();
+            NewFeatureStoreParameters newStoreParameters = (NewFeatureStoreParameters) explorer.getAddParameters(
+                    this.getParameters().getEvaluatedFile()
+            );
+            newStoreParameters.setDynValue("CRS", this.getParameters().getTargetProjection());
+            // Usamos el featureType por defecto del DXF.
+            return newStoreParameters;
+        } catch (DataException ex) {
+            throw new ExportException(ex);
+        }
+    }
+    
+    @Override
+    public OpenDataStoreParameters createTargetOpenStoreParameters() throws ExportException {
+        try {
+            DataManager dataManager = DALLocator.getDataManager();
+            OpenFeatureStoreParameters openStoreParameters = (OpenFeatureStoreParameters) dataManager.createStoreParameters("DXF");
+            ((HasAFile)openStoreParameters).setFile(getParameters().getEvaluatedFile());
+            openStoreParameters.setDynValue("CRS", this.getParameters().getTargetProjection());
+            return openStoreParameters;
+        } catch (DataException ex) {
+            throw new ExportException(ex);
+        }
+    }
+    
+    protected void copyValues(Feature source, EditableFeature target) {
+        FeatureType sourceType = source.getType();
+        FeatureType targetType = target.getType();
+        ExportAttributes exp = this.getParameters().getExportAttributes();
+        boolean isActive = exp.isActive();
+        for (FeatureAttributeDescriptor targetAttr : targetType) {
+            if( !target.canSetValue(targetAttr, null) ) {
+                continue;
+            }
+            String targetAttrName = targetAttr.getName();
+            //translate field
+            FeatureAttributeDescriptor sourceAttr;
+            String sourceAttrName;            
+            if (isActive) {
+                sourceAttrName = exp.getSourceName(targetAttrName);
+                for (ExportAttributes.ExportAttribute exportAttribute : exp) {
+                    if (StringUtils.equals(exportAttribute.getNewName(), targetAttrName)) {
+                        sourceAttrName = exportAttribute.getName();
+                        break;
+                    }
+                }
+
+                sourceAttr = sourceType.getAttributeDescriptorFromAll(sourceAttrName);
+            } else {
+                sourceAttrName = targetAttrName;
+                sourceAttr = sourceType.getAttributeDescriptorFromAll(targetAttrName);
+            }            
+            Object value = null ;
+            try {
+                if (sourceAttr != null) {
+                    value = source.get(sourceAttrName);                
+                    if (value == null) {
+                        if (targetAttr.allowNull()) {
+                            target.set(targetAttrName, null);
+                        }
+                    } else {
+                        target.set(targetAttrName, value);
+                    }
+                } else if (source.hasValue(sourceAttrName)) {
+                        value = source.get(sourceAttrName);
+                        target.set(targetAttrName, value);
+                }
+            } catch (Throwable ex) {
+                LOG.debug("Can't set value '"+Objects.toString(value)+" into '"+targetAttrName+"'", ex);
+            }
+        }
+    }
+    
+
+    
+        
+}
Index: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/pom.xml
===================================================================
--- org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/pom.xml	(revision 0)
+++ org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto/pom.xml	(revision 1291)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.dxf</artifactId>
+        <version>2.0.266</version>
+    </parent>
+    <artifactId>org.gvsig.dxf.exportto</artifactId>
+    <packaging>jar</packaging>
+    
+  <dependencies>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.exportto.swing.api</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.exportto.swing.prov.dbf</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.dal.api</artifactId>
+      <scope>compile</scope>
+    </dependency>
+     <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.tools.swing.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.tools.lib</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.fmap.geometry.api</artifactId>    
+      <scope>compile</scope>        
+    </dependency>
+    <dependency>
+        <groupId>org.gvsig</groupId>
+        <artifactId>org.gvsig.projection.api</artifactId>
+        <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
+      <scope>compile</scope>
+    </dependency>
+
+
+    <dependency>
+      <groupId>org.gvsig</groupId>
+      <artifactId>org.gvsig.tools.swing.impl</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.file.shp</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.gvsig</groupId>
+            <artifactId>org.gvsig.fmap.dal.file.dbf</artifactId>
+            <scope>compile</scope>
+        </dependency>
+
+  </dependencies>
+    <name>org.gvsig.dxf.exportto</name>
+</project>
\ No newline at end of file

Property changes on: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266/org.gvsig.dxf.exportto
___________________________________________________________________
Added: svn:ignore
   + target



Property changes on: org.gvsig.dxf/tags/org.gvsig.dxf-2.0.266
___________________________________________________________________
Added: svn:ignore
   + .directory


