Revision 405

View differences:

org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.app/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<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">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>org.gvsig.dgn.app</artifactId>
5
  <packaging>pom</packaging>
6
  <name>${project.artifactId}</name>
7
  <parent>
8
      <groupId>org.gvsig</groupId>
9
      <artifactId>org.gvsig.dgn</artifactId>
10
      <version>2.0.86</version>
11
  </parent>
12

  
13
  <modules>
14
    <module>org.gvsig.dgn.app.mainplugin</module>
15
  </modules>
16

  
17

  
18
</project>
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.app/org.gvsig.dgn.app.mainplugin/buildNumber.properties
1
#Mon Aug 28 10:50:59 CEST 2017
2
buildNumber=2144
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.app/org.gvsig.dgn.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml
1
<assembly>
2
  <id>gvsig-plugin-package</id>
3
  <formats>
4
    <format>zip</format>
5
  </formats>
6
  <baseDirectory>${project.artifactId}</baseDirectory>
7
  <includeBaseDirectory>true</includeBaseDirectory>
8
  <files>
9
    <file>
10
      <source>target/${project.artifactId}-${project.version}.jar</source>
11
      <outputDirectory>lib</outputDirectory>
12
    </file>
13
    <file>
14
      <source>target/package.info</source>
15
    </file>
16
  </files>
17

  
18
  <fileSets>
19
    <fileSet>
20
      <directory>src/main/resources-plugin</directory>
21
      <outputDirectory>.</outputDirectory>
22
    </fileSet>
23
  </fileSets>
24

  
25
  <dependencySets>
26
    <dependencySet>
27
      <useProjectArtifact>false</useProjectArtifact>
28
      <useTransitiveDependencies>false</useTransitiveDependencies>
29
      <outputDirectory>lib</outputDirectory>
30
      <includes>
31
        <include>org.gvsig:org.gvsig.dgn.provider.legend</include>
32
        <include>org.gvsig:org.gvsig.dgn.provider</include>
33
      </includes>
34
    </dependencySet>
35
  </dependencySets>
36

  
37
</assembly>
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.app/org.gvsig.dgn.app.mainplugin/src/main/resources-plugin/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<plugin-config>
3
  <libraries library-dir="lib/"/>
4
  <depends plugin-name="org.gvsig.app.mainplugin"/>
5
  <resourceBundle name="text"/>
6
  <extensions>
7
     <extension class-name="org.gvsig.andami.LibraryExtension" active="false"/>
8
  </extensions>
9
</plugin-config>
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.app/org.gvsig.dgn.app.mainplugin/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<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">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>org.gvsig.dgn.app.mainplugin</artifactId>
5
  <packaging>jar</packaging>
6
  <name>${project.artifactId}</name>
7
  <description>DGN file format support</description>
8
  <parent>
9
      <groupId>org.gvsig</groupId>
10
      <artifactId>org.gvsig.dgn.app</artifactId>
11
      <version>2.0.86</version>
12
  </parent>
13

  
14
  <dependencies>
15
    <dependency>
16
        <groupId>org.gvsig</groupId>
17
        <artifactId>org.gvsig.tools.lib</artifactId>
18
        <scope>compile</scope>
19
    </dependency>
20
    <dependency>
21
        <groupId>org.gvsig</groupId>
22
        <artifactId>org.gvsig.andami</artifactId>
23
        <scope>compile</scope>
24
    </dependency>
25
    <dependency>
26
        <groupId>org.gvsig</groupId>
27
        <artifactId>org.gvsig.dgn.provider</artifactId>
28
        <scope>compile</scope>
29
    </dependency>
30
    <dependency>
31
        <groupId>org.gvsig</groupId>
32
        <artifactId>org.gvsig.dgn.provider.legend</artifactId>
33
        <scope>compile</scope>
34
    </dependency>
35

  
36
  </dependencies>
37
  
38
    <properties>
39
        <!-- Package info property values -->
40
        <!-- Default values in org.gvsig.desktop -->
41
        <gvsig.package.info.name>Formats: DGN file format support</gvsig.package.info.name>
42
        <gvsig.package.info.state>testing</gvsig.package.info.state>
43
        <gvsig.package.info.official>true</gvsig.package.info.official>
44
        <gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.1.0-A</gvsig.package.info.dependencies>
45
        <gvsig.package.info.categories>Formats,Vector</gvsig.package.info.categories>
46
        <gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-dgn/pool/</gvsig.package.info.poolURL>
47
    </properties>
48
  
49
</project>
0 50

  
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNLegendLibrary.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22

  
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
/**
29
 *
30
 */
31
package org.gvsig.fmap.dal.store.dgn.legend;
32

  
33
import org.gvsig.fmap.dal.DALLibrary;
34
import org.gvsig.fmap.dal.store.dgn.DGNLibrary;
35
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider;
36
import org.gvsig.metadata.MetadataLibrary;
37
import org.gvsig.metadata.MetadataLocator;
38
import org.gvsig.tools.dynobject.DynClass;
39
import org.gvsig.tools.library.AbstractLibrary;
40
import org.gvsig.tools.library.LibraryException;
41

  
42
/**
43
 * @author jmvivo
44
 *
45
 */
46
public class DGNLegendLibrary extends AbstractLibrary {
47

  
48
    @Override
49
    public void doRegistration() {
50
        registerAsServiceOf(DALLibrary.class);
51
        require(DGNLibrary.class);
52
        require(MetadataLibrary.class);
53
    }
54

  
55
	@Override
56
	protected void doInitialize() throws LibraryException {
57
	}
58

  
59
	@Override
60
	protected void doPostInitialize() throws LibraryException {
61
		DynClass metadataDefinition = (DynClass) MetadataLocator.getMetadataManager()
62
			.getDefinition(DGNStoreProvider.METADATA_DEFINITION_NAME);
63
		DGNGetLegendBuilder.register(metadataDefinition);
64
		DGNGetLegend.register(metadataDefinition);
65
		DGNGetLabeling.register(metadataDefinition);
66
	}
67
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNGetLegendBuilder.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22

  
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn.legend;
29

  
30
import org.gvsig.fmap.dal.store.dgn.LegendBuilder;
31
import org.gvsig.tools.ToolsLocator;
32
import org.gvsig.tools.dynobject.AbstractDynMethod;
33
import org.gvsig.tools.dynobject.DynClass;
34
import org.gvsig.tools.dynobject.DynObject;
35
import org.gvsig.tools.dynobject.DynObjectManager;
36
import org.gvsig.tools.dynobject.exception.DynMethodException;
37
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
38

  
39
public class DGNGetLegendBuilder extends AbstractDynMethod {
40
	private static int code = DynObjectManager.NULLCODE;
41

  
42
	static void register(DynClass DGNDynClass) {
43
		if (code != DynObjectManager.NULLCODE) {
44
			return;
45
		}
46
		code = ToolsLocator.getDynObjectManager().registerDynMethod(
47
			DGNDynClass, 
48
			new DGNGetLegendBuilder()
49
		);
50

  
51
	}
52
	
53
        public DGNGetLegendBuilder() {
54
            super(LegendBuilder.DYNMETHOD_BUILDER_NAME,"DGN LegendBuilder creator");
55
        }
56
        
57
        @Override
58
	public int getCode() throws DynMethodNotSupportedException {
59
		return code;
60
	}
61

  
62
        @Override
63
	public Object invoke(DynObject self, Object[] args)
64
			throws DynMethodException {
65
		return new DGNLegendBuilder();
66
	}
67

  
68
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNLegendBuilder.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22

  
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn.legend;
29

  
30
import java.awt.Color;
31

  
32
import org.gvsig.fmap.dal.DataTypes;
33
import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
34
import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider;
35
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider;
36
import org.gvsig.fmap.dal.store.dgn.LegendBuilder;
37
import org.gvsig.fmap.dal.store.dgn.lib.DGNReader;
38
import org.gvsig.fmap.geom.Geometry;
39
import org.gvsig.fmap.mapcontext.MapContextLocator;
40
import org.gvsig.fmap.mapcontext.MapContextManager;
41
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend;
42
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
43
import org.gvsig.symbology.SymbologyLocator;
44
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy;
45
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol;
46
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol;
47
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol;
48

  
49
public class DGNLegendBuilder implements LegendBuilder {
50

  
51
	private MapContextManager mapContextManager = MapContextLocator
52
			.getMapContextManager();
53

  
54
	private IVectorialUniqueValueLegend defaultLegend = null;
55
	private IAttrInTableLabelingStrategy labelingStragegy = null;
56

  
57
	public void begin() {
58
		// Nothing to do
59
	}
60

  
61
	public void end() {
62
		// Nothing to do
63
	}
64

  
65
	public Object getLegend() {
66
		return defaultLegend;
67
	}
68

  
69
	public LegendBuilder initialize(FeatureStoreProvider store) {
70
		defaultLegend = (IVectorialUniqueValueLegend) mapContextManager.createLegend(
71
						IVectorialUniqueValueLegend.LEGEND_NAME);
72
		defaultLegend.setShapeType(Geometry.TYPES.GEOMETRY);
73
		defaultLegend
74
				.setClassifyingFieldNames(new String[] { DGNStoreProvider.NAME_FIELD_COLOR });
75
		defaultLegend.setClassifyingFieldTypes(new int[] { DataTypes.INT });
76

  
77
		ISymbol myDefaultSymbol =
78
				mapContextManager.getSymbolManager()
79
				.createSymbol(Geometry.TYPES.GEOMETRY);
80

  
81
		defaultLegend.setDefaultSymbol(myDefaultSymbol);
82

  
83
		labelingStragegy = SymbologyLocator.getSymbologyManager().createAttrInTableLabelingStrategy();
84
		labelingStragegy.setTextField(DGNStoreProvider.NAME_FIELD_TEXT);
85
		labelingStragegy
86
				.setRotationField(DGNStoreProvider.NAME_FIELD_ROTATIONTEXT);
87
		labelingStragegy.setHeightField(DGNStoreProvider.NAME_FIELD_HEIGHTTEXT);
88
		labelingStragegy.setUnit(1); // MapContext.NAMES[1] (meters)
89
		return this;
90
	}
91

  
92
	public void process(FeatureProvider feature, DGNReader dgnReader) {
93
		Integer clave = (Integer) feature.get("Color");
94
		if (clave == null) {
95
			return;
96
		}
97

  
98
		defaultLegend.useDefaultSymbol(false);
99
		if (defaultLegend.getSymbolByValue(clave) == null) {
100
			ISymbol theSymbol;
101
			Color color = dgnReader.DGNLookupColor(clave.intValue());
102
			theSymbol =
103
					mapContextManager.getSymbolManager().createSymbol(
104
					Geometry.TYPES.GEOMETRY, color);
105

  
106
			theSymbol.setDescription(clave.toString());
107

  
108
			if (theSymbol instanceof IMarkerSymbol) {
109
				((IMarkerSymbol) theSymbol).setSize(1);
110
			}
111

  
112
			if (theSymbol instanceof ILineSymbol) {
113
				ILineSymbol lineSymbol = (ILineSymbol) theSymbol;
114
				lineSymbol.setLineWidth(1);
115
				lineSymbol.setLineColor(color);
116
			}
117

  
118
			if (theSymbol instanceof IFillSymbol) {
119
				IFillSymbol fillSymbol = (IFillSymbol) theSymbol;
120
				fillSymbol.getOutline().setLineColor(color);
121
				fillSymbol.getOutline().setLineWidth(1);
122
				fillSymbol.setFillColor(null);
123
			}
124
			if (theSymbol != null) {
125
				defaultLegend.addSymbol(clave, theSymbol);
126
			}
127
		}
128
        defaultLegend.useDefaultSymbol(true);
129
	}
130

  
131
	public Object getLabeling() {
132
		return labelingStragegy;
133
	}
134

  
135

  
136
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNGetLabeling.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22

  
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn.legend;
29

  
30
import org.gvsig.fmap.dal.exception.OpenException;
31
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider;
32
import org.gvsig.fmap.dal.store.dgn.LegendBuilder;
33
import org.gvsig.tools.ToolsLocator;
34
import org.gvsig.tools.dynobject.AbstractDynMethod;
35
import org.gvsig.tools.dynobject.DynClass;
36
import org.gvsig.tools.dynobject.DynObject;
37
import org.gvsig.tools.dynobject.DynObjectManager;
38
import org.gvsig.tools.dynobject.exception.DynMethodException;
39
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
40

  
41
public class DGNGetLabeling extends AbstractDynMethod {
42
	private static int code = DynObjectManager.NULLCODE;
43

  
44
	static void register(DynClass DGNDynClass) {
45
		if (code != DynObjectManager.NULLCODE) {
46
			return;
47
		}
48
		code = ToolsLocator.getDynObjectManager().registerDynMethod(
49
			DGNDynClass, 
50
			new DGNGetLabeling()
51
		);
52

  
53
	}
54
        
55
        public DGNGetLabeling() {
56
            super(LegendBuilder.DYNMETHOD_GETLABELING_NAME,"DGN Labeling");
57
        }
58
        
59
        @Override
60
	public int getCode() throws DynMethodNotSupportedException {
61
		return code;
62
	}
63

  
64
        @Override
65
	public Object invoke(DynObject self, Object[] args)
66
			throws DynMethodException {
67
		try {
68
			return ((DGNStoreProvider) self).getLabeling();
69
		} catch (OpenException e) {
70
			//FIXME
71
			throw new RuntimeException(e);
72
		}
73
	}
74

  
75
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNGetLegend.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22

  
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn.legend;
29

  
30
import org.gvsig.fmap.dal.exception.OpenException;
31
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider;
32
import org.gvsig.fmap.dal.store.dgn.LegendBuilder;
33
import org.gvsig.tools.ToolsLocator;
34
import org.gvsig.tools.dynobject.AbstractDynMethod;
35
import org.gvsig.tools.dynobject.DynClass;
36
import org.gvsig.tools.dynobject.DynObject;
37
import org.gvsig.tools.dynobject.DynObjectManager;
38
import org.gvsig.tools.dynobject.exception.DynMethodException;
39
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
40

  
41
public class DGNGetLegend extends AbstractDynMethod {
42
	private static int code = DynObjectManager.NULLCODE;
43

  
44
	static void register(DynClass DGNDynClass) {
45
		if (code != DynObjectManager.NULLCODE) {
46
			return;
47
		}
48
		code = ToolsLocator.getDynObjectManager().registerDynMethod(
49
			DGNDynClass, 
50
			new DGNGetLegend()
51
		);
52

  
53
	}
54
        
55
        public DGNGetLegend() {
56
            super(LegendBuilder.DYNMETHOD_GETLEGEND_NAME,"DGN Legend");
57
        }
58
        
59
        @Override
60
	public int getCode() throws DynMethodNotSupportedException {
61
		return code;
62
	}
63

  
64
        @Override
65
	public Object invoke(DynObject self, Object[] args)
66
			throws DynMethodException {
67
		try {
68
			return ((DGNStoreProvider) self).getLegend();
69
		} catch (OpenException e) {
70
			throw new RuntimeException(e);
71
		}
72
	}
73

  
74
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider.legend/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<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">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>org.gvsig.dgn.provider.legend</artifactId>
5
  <packaging>jar</packaging>
6
  <name>${project.artifactId}</name>
7
  <description>DAL provider for DGN files</description>
8
  <parent>
9
      <groupId>org.gvsig</groupId>
10
      <artifactId>org.gvsig.dgn</artifactId>
11
      <version>2.0.86</version>
12
  </parent>
13

  
14
  <dependencies>
15

  
16
    <dependency>
17
      <groupId>org.gvsig</groupId>
18
      <artifactId>org.gvsig.dgn.provider</artifactId>
19
      <scope>compile</scope>
20
    </dependency>
21

  
22
    <dependency>
23
      <groupId>commons-io</groupId>
24
      <artifactId>commons-io</artifactId>
25
      <scope>compile</scope>
26
    </dependency>
27

  
28
    <dependency>
29
        <groupId>org.gvsig</groupId>
30
        <artifactId>org.gvsig.tools.lib</artifactId>
31
        <scope>compile</scope>
32
    </dependency>
33
    <dependency>
34
        <groupId>org.gvsig</groupId>
35
        <artifactId>org.gvsig.projection.api</artifactId>
36
        <scope>compile</scope>
37
    </dependency>
38
    <dependency>
39
        <groupId>org.gvsig</groupId>
40
        <artifactId>org.gvsig.fmap.dal.api</artifactId>
41
        <scope>compile</scope>
42
    </dependency>
43
    <dependency>
44
        <groupId>org.gvsig</groupId>
45
        <artifactId>org.gvsig.fmap.dal.spi</artifactId>
46
        <scope>compile</scope>
47
    </dependency>
48
    <dependency>
49
        <groupId>org.gvsig</groupId>
50
        <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
51
        <scope>compile</scope>
52
    </dependency>
53
    <dependency>
54
        <groupId>org.gvsig</groupId>
55
        <artifactId>org.gvsig.fmap.geometry.api</artifactId>
56
        <scope>compile</scope>
57
    </dependency>
58
    <dependency>
59
        <groupId>org.gvsig</groupId>
60
        <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
61
        <scope>compile</scope>
62
    </dependency>
63

  
64
    <dependency>
65
        <groupId>org.gvsig</groupId>
66
        <artifactId>org.gvsig.symbology.lib.api</artifactId>
67
        <scope>compile</scope>
68
    </dependency>
69
    <dependency>
70
        <groupId>org.gvsig</groupId>
71
        <artifactId>org.gvsig.timesupport.lib.api</artifactId>
72
        <scope>compile</scope>
73
    </dependency>  
74
    <dependency>
75
      <groupId>org.gvsig</groupId>
76
      <artifactId>org.gvsig.utils</artifactId>
77
      <scope>compile</scope>
78
    </dependency>
79

  
80

  
81
    <!-- TESTS -->
82
    <dependency>
83
      <groupId>org.gvsig</groupId>
84
      <artifactId>org.gvsig.tools.lib</artifactId>
85
      <type>test-jar</type>
86
      <scope>test</scope>
87
    </dependency>
88
    <dependency>
89
      <groupId>org.gvsig</groupId>
90
      <artifactId>org.gvsig.compat.se</artifactId>
91
      <scope>test</scope>
92
    </dependency>
93
    <dependency>
94
      <groupId>org.gvsig</groupId>
95
      <artifactId>org.gvsig.fmap.dal.impl</artifactId>
96
      <scope>test</scope>
97
    </dependency>
98
    <!--
99
    <dependency>
100
      <groupId>org.gvsig</groupId>
101
      <artifactId>org.gvsig.fmap.geometry.generalpath</artifactId>
102
      <scope>test</scope>
103
    </dependency>
104
    -->
105
    <dependency>
106
      <groupId>org.gvsig</groupId>
107
      <artifactId>org.gvsig.projection.cresques.impl</artifactId>
108
      <scope>test</scope>
109
    </dependency>
110
    <dependency>
111
      <groupId>org.gvsig</groupId>
112
      <artifactId>org.gvsig.timesupport.lib.impl</artifactId>
113
      <scope>test</scope>
114
    </dependency>   
115

  
116

  
117
  </dependencies>
118

  
119
</project>
0 120

  
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/test/java/org/gvsig/fmap/dal/store/dgn/TestDGN.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22

  
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2008 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn;
29

  
30
import java.io.File;
31
import java.net.URL;
32
import org.gvsig.fmap.dal.DALLocator;
33
import org.gvsig.fmap.dal.DataManager;
34

  
35
import org.gvsig.fmap.dal.DataStoreParameters;
36
import org.gvsig.fmap.dal.exception.DataException;
37
import org.gvsig.fmap.dal.feature.FeatureStore;
38
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
39

  
40
import static junit.framework.Assert.assertNotNull;
41

  
42
public class TestDGN extends AbstractLibraryAutoInitTestCase {
43

  
44
	private File file_prueba = null;
45
        private DataManager dataManager = null;
46

  
47
        @Override
48
        protected void doSetUp() throws Exception {
49
            URL res = TestDGN.class.getResource("data/prueba.dgn");
50
            this.file_prueba = new File(res.getFile());
51
            this.dataManager = DALLocator.getDataManager();
52
        }
53

  
54
        
55
	/*
56
	 * (non-Javadoc)
57
	 *
58
	 * @see
59
	 * org.gvsig.fmap.dal.feature.BaseTestFeatureStore#getDefaultDataStoreParameters
60
	 * ()
61
	 */
62
	public DataStoreParameters getDefaultDataStoreParameters()
63
			throws DataException {
64
            
65
		DGNOpenStoreParameters dgnParameters = null;
66

  
67
		dgnParameters = (DGNOpenStoreParameters) dataManager
68
				.createStoreParameters(DGNStoreProvider.NAME);
69

  
70
		dgnParameters.setFile(file_prueba.getAbsolutePath());
71
		dgnParameters.setCRS("EPSG:23030");
72
		return dgnParameters;
73
	}
74

  
75
	/*
76
	 * (non-Javadoc)
77
	 *
78
	 * @see org.gvsig.fmap.dal.feature.BaseTestFeatureStore#hasExplorer()
79
	 */
80
	public boolean hasExplorer() {
81
		// TODO Auto-generated method stub
82
		return false;
83
	}
84

  
85
	public boolean usesResources() {
86
		return true;
87
	}
88

  
89

  
90
	public void testLegendAndLabeling() throws Exception {
91
		FeatureStore store = (FeatureStore) dataManager.openStore(
92
                        DGNStoreProvider.NAME,
93
                        getDefaultDataStoreParameters()
94
                );
95

  
96
		assertNotNull(store.invokeDynMethod("getLegend", null));
97
		assertNotNull(store.invokeDynMethod("getLabeling", null));
98
		store.dispose();
99
	}
100
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/PostProcessFeatures.java
1
package org.gvsig.fmap.dal.store.dgn;
2

  
3
import java.util.ArrayList;
4
import java.util.Collections;
5
import java.util.Comparator;
6
import java.util.Iterator;
7
import java.util.List;
8
import org.gvsig.fmap.dal.feature.FeatureType;
9
import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
10
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider.TimeCounter;
11
import org.gvsig.fmap.geom.Geometry;
12
import org.gvsig.fmap.geom.GeometryLocator;
13
import org.gvsig.fmap.geom.GeometryManager;
14
import org.gvsig.fmap.geom.exception.CreateEnvelopeException;
15
import org.gvsig.fmap.geom.primitive.Envelope;
16
import org.slf4j.Logger;
17
import org.slf4j.LoggerFactory;
18

  
19
public class PostProcessFeatures {
20

  
21
    private static final Logger logger = LoggerFactory.getLogger(PostProcessFeatures.class);
22

  
23
    private final FeatureType featureType;
24
    private final DGNOpenStoreParameters parameters;
25
    private Envelope envelope;
26
    private final int geomSubtype;
27
    private PostProcessFilterOperation filter = null;
28

  
29
    public PostProcessFeatures(DGNOpenStoreParameters parameters, FeatureType featureType) {
30
        this.featureType = featureType;
31
        this.parameters = parameters;
32
        if (parameters.ignoreZs()) {
33
            this.geomSubtype = Geometry.SUBTYPES.GEOM2D;
34
        } else {
35
            this.geomSubtype = featureType.getDefaultGeometryAttribute().getGeomType().getSubType();
36
        }
37
    }
38

  
39
    private DGNOpenStoreParameters getDGNParameters() {
40
        return this.parameters;
41
    }
42

  
43
    private PostProcessFilterOperation getFilter() {
44
        if (this.filter == null) {
45
            this.filter = new PostProcessFilterOperation(
46
                    getDGNParameters(),
47
                    featureType
48
            );
49
        }
50
        return this.filter;
51
    }
52

  
53
    public List<FeatureProvider> apply(List<FeatureProvider> rows) throws CreateEnvelopeException {
54

  
55
        TimeCounter tc_total = new TimeCounter();
56
        TimeCounter tc_accept = new TimeCounter();
57

  
58
        PostProcessFilterOperation filter = this.getFilter();
59

  
60
        List<FeatureProvider> result = null;
61

  
62
        Iterator<FeatureProvider> rowsIterator = rows.iterator();
63

  
64
        int rowCount = 0;
65
        int rowFitereds = 0;
66
        if (parameters.getGroupBy() == null) {
67
            GeometryManager geomManager = GeometryLocator.getGeometryManager();
68
            this.envelope = geomManager.createEnvelope(this.geomSubtype);
69

  
70
            tc_total.start();
71
            result = new ArrayList<FeatureProvider>();
72
            while (rowsIterator.hasNext()) {
73
                FeatureProvider feature = rowsIterator.next();
74
                rowCount++;
75

  
76
                tc_accept.start();
77
                boolean accept = filter.accept(feature);
78
                tc_accept.stop();
79

  
80
                if (!accept) {
81
                    continue;
82
                }
83
                rowFitereds++;
84
                Geometry geom = feature.getDefaultGeometry();
85
                if (geom != null) {
86
                    this.envelope.add(geom.getEnvelope());
87
                }
88
                result.add(feature);
89
            }
90
            tc_total.stop();
91
            tc_accept.log("Accepts time filter");
92
            tc_total.log("Total time filer, rows input "+rowCount+", output "+rowFitereds );
93

  
94
        } else {
95
            tc_total.start();
96

  
97
            PostProcessGroupOperation groupOperation = new PostProcessGroupOperation(
98
                    this.featureType,
99
                    parameters.getGroupBy(),
100
                    parameters.getGroupGeometriesOperation()
101
            );
102
            while (rowsIterator.hasNext()) {
103
                FeatureProvider feature = rowsIterator.next();
104
                rowCount++;
105

  
106
                tc_accept.start();
107
                boolean accept = filter.accept(feature);
108
                tc_accept.stop();
109

  
110
                if (!accept) {
111
                    continue;
112
                }
113
                rowFitereds++;
114
                groupOperation.add(feature);
115
            }
116
            result = groupOperation.getRows();
117
            this.envelope = groupOperation.getEnvelope();
118

  
119
            tc_total.stop();
120
            tc_accept.log("Accepts time filter+group");
121
            tc_total.log("Total time filer+group, rows input "+rowCount+", output "+rowFitereds );
122
        }
123

  
124
        if (parameters.sortByGeometryType()) {
125
            this.sortRows(result);
126
        }
127
        return result;
128
    }
129

  
130
    public Envelope getEnvelope() {
131
        return this.envelope;
132
    }
133

  
134
    private void sortRows(List<FeatureProvider> rows) {
135
        TimeCounter tc = new TimeCounter();
136
        tc.start();
137
        Collections.sort(rows, new Comparator<FeatureProvider>() {
138
            public int compare(FeatureProvider o1, FeatureProvider o2) {
139
                Geometry g1 = o1.getDefaultGeometry();
140
                Geometry g2 = o2.getDefaultGeometry();
141
                if (g1 == null) {
142
                    if (g2 == null) {
143
                        return 0;
144
                    } else {
145
                        return -1;
146
                    }
147
                } else if (g2 == null) {
148
                    return 1;
149
                }
150
                return g2.getType() - g1.getType();
151
            }
152
        });
153
        tc.stop();
154
        tc.log("sort data, rows "+rows.size());
155
    }
156

  
157
    public boolean hasOperations() {
158
        PostProcessFilterOperation filter = this.getFilter();
159
        if (filter.hasFilter()) {
160
            return true;
161
        }
162
        if (parameters.getGroupBy() != null) {
163
            return true;
164
        }
165
        return false;
166
    }
167

  
168
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/LegendBuilder.java
1
package org.gvsig.fmap.dal.store.dgn;
2

  
3
import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
4
import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider;
5
import org.gvsig.fmap.dal.store.dgn.lib.DGNReader;
6

  
7

  
8
public interface LegendBuilder {
9

  
10
	final public static String DYNMETHOD_BUILDER_NAME = "getLegendBuilder";
11
	final public static String DYNMETHOD_GETLEGEND_NAME = "getLegend";
12
	final public static String DYNMETHOD_GETLABELING_NAME = "getLabeling";
13

  
14
	public LegendBuilder initialize(FeatureStoreProvider store);
15

  
16
	public void begin();
17

  
18
	public void process(FeatureProvider feature, DGNReader dgnReader);
19

  
20
	public void end();
21

  
22
	public Object getLegend();
23
	public Object getLabeling();
24

  
25
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemCellLibrary.java
1

  
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 */
21
package org.gvsig.fmap.dal.store.dgn.lib;
22

  
23
/**
24
 * Clase utilizada para guardar un elemento de tipo CellLibrary.
25
 *
26
 * @author Vicente Caballero Navarro
27
 */
28
public class DGNElemCellLibrary extends DGNElemCore {
29

  
30
	public int celltype; /*!< Cell type. */
31
	public int attindx; /*!< Attribute linkage. */
32
	public byte[] name = new byte[7]; //7           /*!< Cell name */
33
	public int numwords; /*!< Number of words in cell definition */
34
	public int dispsymb; /*!< Display symbol */
35
	public int cclass; /*!< Class bitmap */
36
	public int[] levels = new int[4]; //4         /*!< Levels used in cell */
37
	public byte[] description = new byte[28]; //28   /*!< Description */
38
        
39
        public DGNElemCellLibrary(DGNReader dgnreader) {
40
            super(dgnreader);
41
        }        
42
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemMultiPoint.java
1
/*
2
 * Created on 17-jul-2003
3
 *
4
 * Copyright (c) 2003
5
 * Francisco José Peñarrubia Martínez
6
 * IVER Tecnologías de la Información S.A.
7
 * Salamanca 50
8
 * 46005 Valencia (        SPAIN )
9
 * +34 963163400
10
 * mailto:fran@iver.es
11
 * http://www.iver.es
12
 */
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
package org.gvsig.fmap.dal.store.dgn.lib;
54

  
55
/**
56
 * Clase utilizada para guardar un elemento de tipo MultiPoint.
57
 *
58
 * @author Vicente Caballero Navarro
59
 */
60
public class DGNElemMultiPoint extends DGNElemCore {
61
	public int num_vertices; /*!< Number of vertices in "vertices" */
62
	public DGNPoint[] vertices;
63
        
64
        public DGNElemMultiPoint(DGNReader dgnreader) {
65
            super(dgnreader);
66
        }
67
        
68
        public boolean isPoint() {
69
            if( this.num_vertices == 2 && (
70
                this.vertices[0].x == this.vertices[1].x  &&
71
                this.vertices[0].y == this.vertices[1].y) ) {
72
                return true;
73
            }
74
            return false;
75
        }
76
        
77
        public boolean isPolygon() {
78

  
79
            if( this.num_vertices > 2 &&
80
                (this.vertices[0].x == this.vertices[this.num_vertices - 1].x) &&
81
                (this.vertices[0].y == this.vertices[this.num_vertices - 1].y)) {
82
                return true;
83
            }
84
            return false;
85
        }
86
        
87
        public DGNPoint getPoint(int pos) {
88
            return this.vertices[pos];
89
        }
90
        
91
        public int getNumVertices() {
92
            return this.num_vertices;
93
        }
94
        
95
        public DGNPoint getVertex(int n) {
96
            return this.vertices[n];
97
        }
98

  
99

  
100
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemArc.java
1

  
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 */
21
package org.gvsig.fmap.dal.store.dgn.lib;
22

  
23
/**
24
 * Clase utilizada para guardar un elemento de tipo Arc.
25
 *
26
 * @author Vicente Caballero Navarro
27
 */
28
public class DGNElemArc extends DGNElemCore {
29

  
30
	public DGNPoint origin = new DGNPoint(); /*!< Origin of ellipse */
31
	public double primary_axis;
32

  
33
	//=new double[4];	/*!< Primary axis length */
34
	public double secondary_axis;
35

  
36
	//=new double[4]; /*!< Secondary axis length */
37
	public double rotation; /*!< Counterclockwise rotation in degrees */
38
	public double[] quat = new double[4]; //4
39
	public double startang;
40

  
41
	/*!< Start angle (degrees counterclockwise of primary axis) */
42
	public double sweepang; /*!< Sweep angle (degrees) */
43
        
44
        public DGNElemArc(DGNReader dgnreader) {
45
            super(dgnreader);
46
        }        
47
        
48
        public boolean isSurface() {
49
            return this.isEllipse();
50
        }
51
        
52
        public boolean isEllipticArc() {
53
            return this.primary_axis != this.secondary_axis;
54
        }
55
        
56
        public boolean isArc() {
57
            return this.primary_axis == this.secondary_axis;
58
        }
59
        
60
        public DGNPoint getCenter() {
61
            return this.origin;
62
        }
63
        
64
        public double getRotation() {
65
            return this.rotation;
66
        }
67
        
68
        public double getStartAngle() {
69
            return this.startang;
70
        }
71
        
72
        public double getSweepAngle() {
73
            return this.sweepang;
74
        }
75
        
76
        public double getRadious() {
77
            return this.primary_axis;
78
        }
79
        
80
        public double getPrimaryAxis() {
81
            return this.primary_axis;
82
        }
83
        
84
        public double getSecodaryAxis() {
85
            return this.secondary_axis;
86
        }
87
        
88
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemTCB.java
1
/*
2
 * Created on 17-jul-2003
3
 *
4
 * Copyright (c) 2003
5
 * Francisco José Peñarrubia Martínez
6
 * IVER Tecnologías de la Información S.A.
7
 * Salamanca 50
8
 * 46005 Valencia (        SPAIN )
9
 * +34 963163400
10
 * mailto:fran@iver.es
11
 * http://www.iver.es
12
 */
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
package org.gvsig.fmap.dal.store.dgn.lib;
54

  
55
/**
56
 * Clase utilizada para guardar un elemento de tipo TCB.
57
 *
58
 * @author Vicente Caballero Navarro
59
 */
60
public class DGNElemTCB extends DGNElemCore {
61

  
62
	public int dimension; /*!< Dimension (2 or 3) */
63
	public double origin_x; /*!< X origin of UOR space in master units(?)*/
64
	public double origin_y; /*!< Y origin of UOR space in master units(?)*/
65
	public double origin_z; /*!< Z origin of UOR space in master units(?)*/
66
	public double uor_per_subunit; /*!< UOR per subunit. */
67
	public char[] sub_units = new char[3];
68

  
69
	//3      /*!< User name for subunits (2 chars)*/
70
	public double subunits_per_master; /*!< Subunits per master unit. */
71
	public char[] master_units = new char[3];
72

  
73
	//3   /*!< User name for master units (2 chars)*/
74
	public DGNViewInfo[] views = new DGNViewInfo[8]; //8
75
        
76
        public DGNElemTCB(DGNReader dgnreader) {
77
            super(dgnreader);
78
        }
79
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemTagValue.java
1
/*
2
 * Created on 21-jul-2003
3
 *
4
 * Copyright (c) 2003
5
 * Francisco José Peñarrubia Martínez
6
 * IVER Tecnologías de la Información S.A.
7
 * Salamanca 50
8
 * 46005 Valencia (        SPAIN )
9
 * +34 963163400
10
 * mailto:fran@iver.es
11
 * http://www.iver.es
12
 */
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
package org.gvsig.fmap.dal.store.dgn.lib;
54

  
55
/**
56
 * Clase utilizada para guardar un elemento de tipo TagValue.
57
 *
58
 * @author Vicente Caballero Navarro
59
 */
60
public class DGNElemTagValue extends DGNElemCore {
61
	public int tagType; /*!< Tag type indicator, DGNTT_* */
62
	public int tagSet; /*!< Which tag set does this relate to? */
63
	public int tagIndex; /*!< Tag index within tag set. */
64
	public int tagLength; /*!< Length of tag information (text) */
65
	public tagValueUnion tagValue = new tagValueUnion();
66
        
67
        
68
        public DGNElemTagValue(DGNReader dgnreader) {
69
            super(dgnreader);
70
        }
71

  
72
}
org.gvsig.dgn/tags/org.gvsig.dgn-2.0.86/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemComplexHeader.java
1

  
2
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
3
 *
4
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
19
 *
20
 */
21
package org.gvsig.fmap.dal.store.dgn.lib;
22

  
23
/**
24
 * Clase utilizada para guardar un elemento de tipo ComplexHeader.
25
 *
26
 * @author Vicente Caballero Navarro
27
 */
28
public class DGNElemComplexHeader extends DGNElemCore {
29
	public int totlength; /*!< Total length of surface */
30
	public int numelems; /*!< # of elements in surface */
31
        
32
        public DGNElemComplexHeader(DGNReader dgnreader) {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff