Revision 865

View differences:

org.gvsig.geotools.proj/trunk/org.gvsig.geotools.proj/org.gvsig.geotools.proj.app/pom.xml
52 52
            <artifactId>org.gvsig.tools.swing.api</artifactId>
53 53
            <scope>test</scope>
54 54
        </dependency>
55
        <!-- 
55 56
        <dependency>
56 57
            <groupId>org.gvsig</groupId>
57 58
            <artifactId>org.gvsig.tools.swing.impl</artifactId>
......
77 78
            <artifactId>org.gvsig.tools.dynform.impl</artifactId>
78 79
            <scope>test</scope>
79 80
        </dependency>
81
         -->
80 82
    </dependencies>
81 83

  
82 84
    <properties>
org.gvsig.geotools.proj/trunk/org.gvsig.geotools.proj/pom.xml
6 6
    <version>1.0.0-SNAPSHOT</version>
7 7
    <name>${project.artifactId}</name>
8 8
    <description>Implementation of the coordinate reference system management library based on Apache SIS library. Warning: this is only a proof-of-concept at the moment</description>
9
    <properties>
10
        <!-- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> -->
11
        <!--  FIXME: update to geotools 20 when it gets released  -->
12
        <geotools.version>20-SNAPSHOT</geotools.version>
13
        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
14
        <localRepository>${user.home}/.m2/repository</localRepository>
15
        <site-repository>dav:https://devel.gvsig.org/sites/${project.artifactId}/${project.version}</site-repository>
16
        <gvsig.metadata.version>${project.parent.version}</gvsig.metadata.version>
17
        <gvsig.proj.version>3.0.0-SNAPSHOT</gvsig.proj.version>
18
        <!-- 
19
        <gvsig.projection.version>2.0.21</gvsig.projection.version>
20
        -->
21
    </properties>
9 22
    <parent>
10 23
        <groupId>org.gvsig</groupId>
11 24
        <artifactId>org.gvsig.desktop</artifactId>
......
151 164
            </roles>
152 165
        </developer>
153 166
    </developers>
154

  
155
    <properties>
156
        <!-- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> -->
157
        <!--  FIXME: update to geotools 20 when it gets released  -->
158
        <geotools.version>20-SNAPSHOT</geotools.version>
159
        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
160
        <localRepository>${user.home}/.m2/repository</localRepository>
161
        <site-repository>dav:https://devel.gvsig.org/sites/${project.artifactId}/${project.version}</site-repository>
162
        <gvsig.proj.version>1.0.5-SNAPSHOT</gvsig.proj.version>
163
        <!-- <gvsig.tools.version>3.0.145</gvsig.tools.version>
164
        <gvsig.metadata.version>1.0.0</gvsig.metadata.version>  -->
165
        <!-- <gvsig.projection.version>2.0.21</gvsig.projection.version> -->
166
    </properties>
167 167
    <dependencyManagement>
168 168
        <dependencies>
169 169
            <!-- gvsig -->
......
270 270
                <version>1.0.0-SNAPSHOT</version>
271 271
            </dependency>
272 272
            <dependency>
273
                <groupId>org.gvsig</groupId>
274
                <artifactId>org.gvsig.geotools.proj.main</artifactId>
275
                <version>1.0.0-SNAPSHOT</version>
276
            </dependency>
277
            <dependency>
273 278
                <groupId>javax.measure</groupId>
274 279
                <artifactId>unit-api</artifactId>
275 280
                <version>1.0</version>
......
406 411
        <module>org.gvsig.geotools.proj.catalog.impl</module>
407 412
        <module>org.gvsig.geotools.proj.app</module>
408 413
        <module>org.gvsig.geotools.proj.catalog.app</module>
414
        <module>org.gvsig.geotools.proj.main</module>
409 415
    </modules>
410 416
</project>
org.gvsig.geotools.proj/trunk/org.gvsig.geotools.proj/org.gvsig.geotools.proj.main/pom.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
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/maven-v4_0_0.xsd">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>org.gvsig.geotools.proj.main</artifactId>
5
  <packaging>jar</packaging>
6
  <name>${project.artifactId}</name>
7
  <parent>
8
    <groupId>org.gvsig</groupId>
9
    <artifactId>org.gvsig.geotools.proj</artifactId>
10
    <version>1.0.0-SNAPSHOT</version>
11
  </parent>
12
  <description>Contains executable classes (having a main method) to test the
13
   user interfaces of the CRS libraries. These classes are not used from gvSIG
14
   and are NOT unit tests.</description>
15
  <dependencies>
16
    <!-- gvsig -->
17
    <dependency>
18
      <groupId>org.gvsig</groupId>
19
      <artifactId>org.gvsig.tools</artifactId>
20
      <type>pom</type>
21
      <scope>compile</scope>
22
    </dependency>
23
    <!-- <dependency>
24
      <groupId>org.gvsig</groupId>
25
      <artifactId>org.gvsig.tools.lib</artifactId>
26
    </dependency>-->
27
    <dependency>
28
      <groupId>org.gvsig</groupId>
29
      <artifactId>org.gvsig.tools.lib</artifactId>
30
      <type>test-jar</type>
31
      <scope>compile</scope>
32
    </dependency>
33
    <dependency>
34
      <groupId>org.gvsig</groupId>
35
      <artifactId>org.gvsig.tools.swing.api</artifactId>
36
      <scope>compile</scope>
37
    </dependency>
38
    <dependency>
39
      <groupId>org.gvsig</groupId>
40
      <artifactId>org.gvsig.tools.swing.impl</artifactId>
41
      <scope>compile</scope>
42
    </dependency>
43
    <dependency>
44
      <groupId>org.gvsig</groupId>
45
      <artifactId>org.gvsig.tools.dynform.api</artifactId>
46
      <scope>compile</scope>
47
    </dependency>
48
    <dependency>
49
      <groupId>org.gvsig</groupId>
50
      <artifactId>org.gvsig.tools.dynform.spi</artifactId>
51
      <scope>compile</scope>
52
    </dependency>
53
    <dependency>
54
      <groupId>org.gvsig</groupId>
55
      <artifactId>org.gvsig.tools.dynform.services</artifactId>
56
      <scope>compile</scope>
57
    </dependency>
58
    <dependency>
59
      <groupId>org.gvsig</groupId>
60
      <artifactId>org.gvsig.tools.dynform.impl</artifactId>
61
      <scope>compile</scope>
62
    </dependency>
63
    <dependency>
64
      <groupId>org.gvsig</groupId>
65
      <artifactId>org.gvsig.geotools.proj.catalog.impl</artifactId>
66
      <scope>compile</scope>
67
    </dependency>
68
    <dependency>
69
      <groupId>org.gvsig</groupId>
70
      <artifactId>org.gvsig.geotools.proj.lib.impl</artifactId>
71
      <scope>compile</scope>
72
    </dependency>
73
    <dependency>
74
      <groupId>org.gvsig</groupId>
75
      <artifactId>org.gvsig.proj.swing.api</artifactId>
76
      <scope>compile</scope>
77
    </dependency>
78
    <dependency>
79
      <groupId>org.gvsig</groupId>
80
      <artifactId>org.gvsig.proj.swing.impl</artifactId>
81
      <scope>compile</scope>
82
    </dependency>
83
    <dependency>
84
      <groupId>org.gvsig</groupId>
85
      <artifactId>org.gvsig.geotools.proj.epsggriddata</artifactId>
86
      <type>jar</type>
87
    </dependency>
88
    <!-- gvsig preferred measuring api -->
89
    <dependency>
90
      <groupId>javax.measure</groupId>
91
      <artifactId>unit-api</artifactId>
92
      <scope>compile</scope>
93
    </dependency>
94
    <dependency>
95
      <groupId>systems.uom</groupId>
96
      <artifactId>systems-common-java8</artifactId>
97
      <scope>compile</scope>
98
    </dependency>
99
    <!-- external -->
100
    <dependency>
101
      <groupId>org.geotools</groupId>
102
      <artifactId>gt-referencing</artifactId>
103
      <scope>compile</scope>
104
    </dependency>
105
    <dependency>
106
      <groupId>org.geotools</groupId>
107
      <artifactId>gt-epsg-hsql</artifactId>
108
      <scope>compile</scope>
109
    </dependency>
110
    <dependency>
111
      <groupId>org.geotools</groupId>
112
      <artifactId>gt-epsg-extension</artifactId>
113
      <scope>compile</scope>
114
    </dependency>
115
    <dependency>
116
      <groupId>junit</groupId>
117
      <artifactId>junit</artifactId>
118
      <scope>test</scope>
119
    </dependency>
120
  </dependencies>
121
</project>
org.gvsig.geotools.proj/trunk/org.gvsig.geotools.proj/org.gvsig.geotools.proj.main/src/main/java/org/gvsig/geotools/proj/main/TestCrsPanel.java
1
package org.gvsig.geotools.proj.main;
2

  
3

  
4
import javax.swing.JFrame;
5
import javax.swing.SwingUtilities;
6

  
7
import org.apache.log4j.ConsoleAppender;
8
import org.apache.log4j.Level;
9
import org.apache.log4j.PatternLayout;
10
import org.gvsig.proj.swing.CoordinateReferenceSystemSelectorComponent;
11
import org.gvsig.proj.swing.CoordinateReferenceSystemSwingLocator;
12
import org.gvsig.proj.swing.impl.DefaultCoordinateReferenceSystemSwingManager;
13
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
14

  
15
public class TestCrsPanel {
16

  
17
	public TestCrsPanel() {
18
		// TODO Auto-generated constructor stub
19
	}
20

  
21
	public static void main(String[] args) {
22
		ConsoleAppender console = new ConsoleAppender(); //create appender
23
		//configure the appender
24
		String PATTERN = "%d [%p|%c|%C{1}] %m%n";
25
		console.setLayout(new PatternLayout(PATTERN)); 
26
		console.setThreshold(Level.ALL);
27
		console.activateOptions();
28
		//add appender to any Logger (here is root)
29
		org.apache.log4j.Logger.getRootLogger().addAppender(console);
30

  
31
		DefaultLibrariesInitializer initializer = new DefaultLibrariesInitializer();
32
		initializer.fullInitialize();
33
		final JFrame frame = new JFrame();
34
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
35
		DefaultCoordinateReferenceSystemSwingManager manager = (DefaultCoordinateReferenceSystemSwingManager) CoordinateReferenceSystemSwingLocator.getSwingManager();
36

  
37
		CoordinateReferenceSystemSelectorComponent selector = manager.createCoordinateReferenceSystemSelectionComponent();
38
		frame.add(selector.asJComponent());
39
		frame.setSize(400, 600);
40
		//frame.pack();
41
		SwingUtilities.invokeLater(new Runnable() {
42
			public void run() {
43
				frame.setVisible(true);
44
			}
45
		});
46

  
47
	}
48

  
49
}
org.gvsig.geotools.proj/trunk/org.gvsig.geotools.proj/org.gvsig.geotools.proj.main/src/main/resources/README.txt
1
====
2
    gvSIG. Desktop Geographic Information System.
3

  
4
    Copyright (C) 2007-2012 gvSIG Association.
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
    For any additional information, do not hesitate to contact us
22
    at info AT gvsig.com, or visit our website www.gvsig.com.
23
====
24

  
25
Put into this folder the resources needed by your classes.
26

  
27
This folder is added to the classpath, so you can load any resources 
28
through the ClassLoader.
29

  
30
By default, in this folder you can find an example of log4j configuration,
31
prepared to log messages through the console, so logging works when you
32
run your classes.
org.gvsig.geotools.proj/trunk/org.gvsig.geotools.proj/org.gvsig.geotools.proj.main/src/main/resources/log4j.xml
1
<?xml version="1.0" encoding="ISO-8859-1" ?>
2
<!--
3

  
4
    gvSIG. Desktop Geographic Information System.
5

  
6
    Copyright (C) 2007-2012 gvSIG Association.
7

  
8
    This program is free software; you can redistribute it and/or
9
    modify it under the terms of the GNU General Public License
10
    as published by the Free Software Foundation; either version 2
11
    of the License, or (at your option) any later version.
12

  
13
    This program is distributed in the hope that it will be useful,
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
    GNU General Public License for more details.
17

  
18
    You should have received a copy of the GNU General Public License
19
    along with this program; if not, write to the Free Software
20
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
    MA  02110-1301, USA.
22

  
23
    For any additional information, do not hesitate to contact us
24
    at info AT gvsig.com, or visit our website www.gvsig.com.
25

  
26
-->
27
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
28

  
29
<!-- 
30
Log4J configuration file for unit tests execution.
31
 -->
32
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
33

  
34
	<!-- Appender configuration to show logging messages through the console -->
35
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
36
		<layout class="org.apache.log4j.PatternLayout">
37
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
38
		</layout>
39
	</appender>
40

  
41
	<!-- 
42
	Activate logging messages of DEBUG level of higher only for the
43
	org.gvsig.tools packages.
44
	You can put full classes names or packages instead, to configure
45
	logging for all the classes and subpackages of the package.
46
	-->
47
	<category name="org.gvsig.tools">
48
		<priority value="DEBUG" />
49
	</category>
50
	<category name="org.gvsig.vectorediting">
51
		<priority value="DEBUG" />
52
	</category>
53

  
54
	<!-- 
55
	By default, show only logging messages of INFO level or higher, 
56
	through the previously configured CONSOLE appender. 
57
	-->
58
	<root>
59
		<priority value="INFO" />
60
		<appender-ref ref="CONSOLE" />
61
	</root>
62
</log4j:configuration>

Also available in: Unified diff