Class DxfFile

java.lang.Object
org.gvsig.dxf.io.GeoFile
org.gvsig.dxf.io.DxfFile
All Implemented Interfaces:
Projected, Extent.Has

public class DxfFile extends GeoFile
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
  • Field Details

    • logger

      public static org.slf4j.Logger logger
  • Constructor Details

    • DxfFile

      public DxfFile(org.gvsig.crs.projection.lib.Projection proj, String name, DxfFile.EntityFactory maker)
      Constructor de la clase
      Parameters:
      proj - , la proyecci�n cartogr�fica
      name - , el path absoluto hasta el fichero DXF
      maker - , el interface que permite la construcci�n de las entidades procedentes del DXF
    • DxfFile

      public DxfFile(org.gvsig.crs.projection.lib.Projection proj, String name, DxfFile.EntityFactory maker, DxfFile.VarSettings dxfVars)
      Constructor de la clase que adem�s incorpora la capacidad de leer una porci�n del HEADER
      Parameters:
      proj - , la proyecci�n cartogr�fica
      name - , el path absoluto hasta el fichero DXF
      maker - , el interface que permite la construcci�n de las entidades procedentes del DXF
      dxfVars - , el interface que permite la lectura del HEADER de un DXF
  • Method Details

    • load

      public GeoFile load() throws Exception
      Carga un fichero en formato DXF
      Specified by:
      load in class GeoFile
      Throws:
      Exception
    • load

      public GeoFile load(Reader fr) throws Exception
      Carga un fichero en formato DXF tomando un Reader como par�metro
      Parameters:
      fr - , Reader que se le pasa como par�metro
      Returns:
      devuelve un objeto GeoFile, padre de DxfFile
      Throws:
      Exception
      Exception
    • getObjects

      public IObjList getObjects()
      Devuelve los objetos geom�tricos obtenidos de un DXF
      Specified by:
      getObjects in class GeoFile
    • save

      public void save(String fName) throws IOException
      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.
      Parameters:
      fName -
      Throws:
      IOException
    • writeHeader

      public void writeHeader(FileWriter fw) throws IOException
      Escritor de la cabecera de un DXF. jmorell: Actualizaci�n del escritor de DXF de R12 a 2000.
      Parameters:
      fw - , un FileWriter para escribir ficheros
      Throws:
      IOException
    • writeTables

      public void writeTables(FileWriter fw) throws IOException
      Escritor de la secci�n TABLES de un DXF.
      Parameters:
      fw - , FileWriter
      Throws:
      IOException
    • writeVPortTable

      public void writeVPortTable(FileWriter fw) throws IOException
      Escritor de la tabla VPORT.
      Parameters:
      fw -
      Throws:
      IOException
    • writeLTypeTable

      public void writeLTypeTable(FileWriter fw) throws IOException
      Escritor de la tabla LTYPE.
      Parameters:
      fw -
      Throws:
      IOException
    • writeLayerTable

      public void writeLayerTable(FileWriter fw) throws IOException
      Escritor de la tabla LAYER.
      Parameters:
      fw -
      Throws:
      IOException
    • writeStyleTable

      public void writeStyleTable(FileWriter fw) throws IOException
      Escritor de la tabla STYLE.
      Parameters:
      fw -
      Throws:
      IOException
    • writeViewTable

      public void writeViewTable(FileWriter fw) throws IOException
      Escritor de la tabla VIEW.
      Parameters:
      fw -
      Throws:
      IOException
    • writeUCSTable

      public void writeUCSTable(FileWriter fw) throws IOException
      Escritor de la tabla UCS.
      Parameters:
      fw -
      Throws:
      IOException
    • writeAppidTable

      public void writeAppidTable(FileWriter fw) throws IOException
      Escritor de la tabla APPID.
      Parameters:
      fw -
      Throws:
      IOException
    • writeDimStyleTable

      public void writeDimStyleTable(FileWriter fw) throws IOException
      Escritor de la tabla DIMSTYLE.
      Parameters:
      fw -
      Throws:
      IOException
    • writeBlockRecordTable

      public void writeBlockRecordTable(FileWriter fw) throws IOException
      Escritor de la tabla BLOCK_RECORD.
      Parameters:
      fw -
      Throws:
      IOException
    • writeBlocks

      public void writeBlocks(FileWriter fw) throws IOException
      Escritor de la secci�n de bloques por defecto de un DXF2000.
      Parameters:
      fw -
      Throws:
      IOException
    • writeEntities

      public void writeEntities(FileWriter fw) throws IOException
      Escritor de la secci�n ENTITIES de entidades.
      Parameters:
      fw -
      Throws:
      IOException
    • writeObjects

      public void writeObjects(FileWriter fw) throws IOException
      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.
      Throws:
      IOException
    • reProject

      public void reProject(org.gvsig.crs.projection.lib.CoordinateTransformation rp)
      Habilita la reproyecci�n cartogr�fica
      Specified by:
      reProject in interface Projected
      Specified by:
      reProject in class GeoFile
      Parameters:
      rp - transformation coordinates for obtaining the new projection
      See Also:
    • close

      public void close()
      Specified by:
      close in class GeoFile
    • isCadFlag

      public boolean isCadFlag()
      Informa sobre si estamos trabajando con el modelo de datos GIS o con el de CAD
      Returns:
      Returns the cadFlag.
    • setCadFlag

      public void setCadFlag(boolean cadFlag)
      Establece si trabajamos con el modelo de datos GIS o con el de CAD
      Parameters:
      cadFlag - The cadFlag to set.
    • isDxf3DFlag

      public boolean isDxf3DFlag()
      Returns:
      Returns the dxf3DFlag.
    • setDxf3DFlag

      public void setDxf3DFlag(boolean dxf3DFlag)
      Parameters:
      dxf3DFlag - The dxf3DFlag to set.