Revision 1814
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/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/xsd/maven-4.0.0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.gpe</artifactId> |
|
5 |
<packaging>pom</packaging> |
|
6 |
<version>2.1.219</version> |
|
7 |
<description>Generic Persistence Engine</description> |
|
8 |
<url>http://devel.gvsig.org/sites/org.gvsig.gpe/${project.version}</url> |
|
9 |
<name>${project.artifactId}</name> |
|
10 |
|
|
11 |
<parent> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>org.gvsig.desktop</artifactId> |
|
14 |
<version>2.0.405</version> |
|
15 |
</parent> |
|
16 |
|
|
17 |
<scm> |
|
18 |
<connection>scm:svn:https://devel.gvsig.org/svn/gvsig-gpe/org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219</connection> |
|
19 |
<developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-gpe/org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219</developerConnection> |
|
20 |
<url>https://devel.gvsig.org/redmine/projects/gvsig-gpe/repository/show/org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219</url> |
|
21 |
</scm> |
|
22 |
<repositories> |
|
23 |
<repository> |
|
24 |
<id>gvsig-public-http-repository</id> |
|
25 |
<name>gvSIG maven public HTTP repository</name> |
|
26 |
<url>http://devel.gvsig.org/m2repo/j2se</url> |
|
27 |
<releases> |
|
28 |
<enabled>true</enabled> |
|
29 |
<updatePolicy>daily</updatePolicy> |
|
30 |
<checksumPolicy>warn</checksumPolicy> |
|
31 |
</releases> |
|
32 |
<snapshots> |
|
33 |
<enabled>true</enabled> |
|
34 |
<updatePolicy>daily</updatePolicy> |
|
35 |
<checksumPolicy>warn</checksumPolicy> |
|
36 |
</snapshots> |
|
37 |
</repository> |
|
38 |
</repositories> |
|
39 |
|
|
40 |
<build> |
|
41 |
<plugins> |
|
42 |
<plugin> |
|
43 |
<groupId>org.apache.maven.plugins</groupId> |
|
44 |
<artifactId>maven-release-plugin</artifactId> |
|
45 |
<configuration> |
|
46 |
<tagBase>https://devel.gvsig.org/svn/gvsig-gpe/org.gvsig.gpe/library/tags</tagBase> |
|
47 |
<goals>deploy</goals> |
|
48 |
</configuration> |
|
49 |
</plugin> |
|
50 |
</plugins> |
|
51 |
</build> |
|
52 |
|
|
53 |
<dependencyManagement> |
|
54 |
<dependencies> |
|
55 |
<!-- Self-deps --> |
|
56 |
|
|
57 |
<dependency> |
|
58 |
<groupId>org.gvsig</groupId> |
|
59 |
<artifactId>org.gvsig.gpe.lib.api</artifactId> |
|
60 |
<version>2.1.219</version> |
|
61 |
</dependency> |
|
62 |
<dependency> |
|
63 |
<groupId>org.gvsig</groupId> |
|
64 |
<artifactId>org.gvsig.gpe.lib.spi</artifactId> |
|
65 |
<version>2.1.219</version> |
|
66 |
</dependency> |
|
67 |
<dependency> |
|
68 |
<groupId>org.gvsig</groupId> |
|
69 |
<artifactId>org.gvsig.gpe.lib.impl</artifactId> |
|
70 |
<version>2.1.219</version> |
|
71 |
</dependency> |
|
72 |
<dependency> |
|
73 |
<groupId>org.gvsig</groupId> |
|
74 |
<artifactId>org.gvsig.gpe.prov.xml</artifactId> |
|
75 |
<version>2.1.219</version> |
|
76 |
</dependency> |
|
77 |
<dependency> |
|
78 |
<groupId>org.gvsig</groupId> |
|
79 |
<artifactId>org.gvsig.gpe.lib.impl</artifactId> |
|
80 |
<version>2.1.219</version> |
|
81 |
<classifier>tests</classifier> |
|
82 |
</dependency> |
|
83 |
<dependency> |
|
84 |
<groupId>org.gvsig</groupId> |
|
85 |
<artifactId>org.gvsig.gpe.exportto.kml</artifactId> |
|
86 |
<version>2.1.219</version> |
|
87 |
</dependency> |
|
88 |
<dependency> |
|
89 |
<groupId>org.gvsig</groupId> |
|
90 |
<artifactId>org.gvsig.gpe.exportto.generic</artifactId> |
|
91 |
<version>2.1.219</version> |
|
92 |
</dependency> |
|
93 |
<dependency> |
|
94 |
<groupId>org.gvsig</groupId> |
|
95 |
<artifactId>org.gvsig.gpe.prov.gml</artifactId> |
|
96 |
<version>2.1.219</version> |
|
97 |
</dependency> |
|
98 |
<dependency> |
|
99 |
<groupId>org.gvsig</groupId> |
|
100 |
<artifactId>org.gvsig.gpe.prov.kml</artifactId> |
|
101 |
<version>2.1.219</version> |
|
102 |
</dependency> |
|
103 |
<dependency> |
|
104 |
<groupId>org.gvsig</groupId> |
|
105 |
<artifactId>org.gvsig.gpe.app.mainplugin</artifactId> |
|
106 |
<version>2.1.80-SNAPSHOT</version> |
|
107 |
</dependency> |
|
108 |
|
|
109 |
|
|
110 |
<!-- SCHEMA/PULL LIBS --> |
|
111 |
<dependency> |
|
112 |
<groupId>org.gvsig</groupId> |
|
113 |
<artifactId>org.gvsig.xmlschema</artifactId> |
|
114 |
<version>${org.gvsig.xmlschema.version}</version> |
|
115 |
<type>pom</type> |
|
116 |
<scope>import</scope> |
|
117 |
<exclusions> |
|
118 |
<exclusion> |
|
119 |
<groupId>org.gvsig</groupId> |
|
120 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
121 |
</exclusion> |
|
122 |
</exclusions> |
|
123 |
</dependency> |
|
124 |
<dependency> |
|
125 |
<groupId>org.gvsig</groupId> |
|
126 |
<artifactId>org.gvsig.xmlpull</artifactId> |
|
127 |
<version>${org.gvsig.xmlpull.version}</version> |
|
128 |
<type>pom</type> |
|
129 |
<scope>import</scope> |
|
130 |
<exclusions> |
|
131 |
<exclusion> |
|
132 |
<groupId>org.gvsig</groupId> |
|
133 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
134 |
</exclusion> |
|
135 |
</exclusions> |
|
136 |
</dependency> |
|
137 |
|
|
138 |
<!-- TODO: Remove those entries when updated in libGPE (?) --> |
|
139 |
|
|
140 |
<dependency> |
|
141 |
<groupId>stax</groupId> |
|
142 |
<artifactId>stax-api</artifactId> |
|
143 |
<version>1.0.1</version> |
|
144 |
</dependency> |
|
145 |
<dependency> |
|
146 |
<groupId>stax</groupId> |
|
147 |
<artifactId>stax</artifactId> |
|
148 |
<version>1.2.0</version> |
|
149 |
</dependency> |
|
150 |
|
|
151 |
</dependencies> |
|
152 |
</dependencyManagement> |
|
153 |
|
|
154 |
<properties> |
|
155 |
<org.gvsig.xmlschema.version>2.0.43</org.gvsig.xmlschema.version> |
|
156 |
<org.gvsig.xmlpull.version>2.0.35</org.gvsig.xmlpull.version> |
|
157 |
</properties> |
|
158 |
|
|
159 |
<modules> |
|
160 |
<module>org.gvsig.gpe.app</module> |
|
161 |
<module>org.gvsig.gpe.lib</module> |
|
162 |
<module>org.gvsig.gpe.prov</module> |
|
163 |
|
|
164 |
<module>org.gvsig.gpe.exportto</module> |
|
165 |
|
|
166 |
</modules> |
|
167 |
</project> |
|
168 |
|
|
0 | 169 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<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"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.gpe.app</artifactId> |
|
6 |
<description>Adds support for some vector formats (GML, KML)</description> |
|
7 |
<packaging>pom</packaging> |
|
8 |
|
|
9 |
|
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>org.gvsig.gpe</artifactId> |
|
13 |
<version>2.1.219</version> |
|
14 |
</parent> |
|
15 |
|
|
16 |
<modules> |
|
17 |
<module>org.gvsig.gpe.app.mainplugin</module> |
|
18 |
</modules> |
|
19 |
</project> |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/buildNumber.properties | ||
---|---|---|
1 |
#Tue Feb 07 22:42:38 CET 2023 |
|
2 |
buildNumber=2321 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/resources/org/gvsig/fmap/dal/store/gpe/GPEMetadata.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of metadata fields for a gpe file. |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
|
|
9 |
<class name="GPE" namespace="Metadata"> |
|
10 |
<extends> |
|
11 |
<class namespace="Metadata" name="SpatialProvider"/> |
|
12 |
</extends> |
|
13 |
<description>Metadata of a GPE store</description> |
|
14 |
<fields> |
|
15 |
</fields> |
|
16 |
</class> |
|
17 |
|
|
18 |
</classes> |
|
19 |
</definitions> |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/resources/org/gvsig/fmap/dal/store/gpe/GPEParameters.xml | ||
---|---|---|
1 |
<?xml version= "1.0 "?> |
|
2 |
<definitions> |
|
3 |
<version>1.0.0</version> |
|
4 |
<classes> |
|
5 |
<class name="GPEStoreParameters"> |
|
6 |
<extends> |
|
7 |
<class namespace="dal" name="ProviderParameters"/> |
|
8 |
</extends> |
|
9 |
<description>Store the parameters need to open a GPE supported file</description> |
|
10 |
<fields> |
|
11 |
<field name="File" type="file" mandatory="true" group="Basic"> |
|
12 |
<description>GPE supported file</description> |
|
13 |
</field> |
|
14 |
<field name="CRS" type="crs" mandatory="true" group="Basic"> |
|
15 |
<description>The coordinate reference system used in this GPE supported file</description> |
|
16 |
</field> |
|
17 |
<field name="useAxisOrderYX" label="Use axis order YX" defaultValue="false" type="Boolean" mandatory="false" group="Basic"> |
|
18 |
<description>If set use axis order XY</description> |
|
19 |
</field> |
|
20 |
</fields> |
|
21 |
</class> |
|
22 |
</classes> |
|
23 |
</definitions> |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.fmap.dal.store.gpe.DALGPELibrary |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<!-- |
|
2 |
|
|
3 |
gvSIG. Desktop Geographic Information System. |
|
4 |
|
|
5 |
Copyright (C) 2007-2013 gvSIG Association. |
|
6 |
|
|
7 |
This program is free software; you can redistribute it and/or |
|
8 |
modify it under the terms of the GNU General Public License |
|
9 |
as published by the Free Software Foundation; either version 3 |
|
10 |
of the License, or (at your option) any later version. |
|
11 |
|
|
12 |
This program is distributed in the hope that it will be useful, |
|
13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15 |
GNU General Public License for more details. |
|
16 |
|
|
17 |
You should have received a copy of the GNU General Public License |
|
18 |
along with this program; if not, write to the Free Software |
|
19 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
20 |
MA 02110-1301, USA. |
|
21 |
|
|
22 |
For any additional information, do not hesitate to contact us |
|
23 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
24 |
|
|
25 |
--> |
|
26 |
<assembly> |
|
27 |
<id>gvsig-plugin-package</id> |
|
28 |
<formats> |
|
29 |
<format>zip</format> |
|
30 |
</formats> |
|
31 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
32 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
33 |
<files> |
|
34 |
<file> |
|
35 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
36 |
<outputDirectory>lib</outputDirectory> |
|
37 |
</file> |
|
38 |
<file> |
|
39 |
<source>target/package.info</source> |
|
40 |
</file> |
|
41 |
</files> |
|
42 |
|
|
43 |
<fileSets> |
|
44 |
<fileSet> |
|
45 |
<directory>src/main/resources-plugin</directory> |
|
46 |
<outputDirectory>.</outputDirectory> |
|
47 |
</fileSet> |
|
48 |
</fileSets> |
|
49 |
|
|
50 |
<dependencySets> |
|
51 |
<dependencySet> |
|
52 |
<useProjectArtifact>false</useProjectArtifact> |
|
53 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
54 |
<outputDirectory>lib</outputDirectory> |
|
55 |
<includes> |
|
56 |
<include>org.gvsig:org.gvsig.gpe.lib.api</include> |
|
57 |
<include>org.gvsig:org.gvsig.gpe.lib.spi</include> |
|
58 |
<include>org.gvsig:org.gvsig.gpe.lib.impl</include> |
|
59 |
<include>org.gvsig:org.gvsig.gpe.prov.xml</include> |
|
60 |
<include>org.gvsig:org.gvsig.gpe.prov.gml</include> |
|
61 |
<include>org.gvsig:org.gvsig.gpe.prov.kml</include> |
|
62 |
<include>org.gvsig:org.gvsig.xmlpull.lib.api</include> |
|
63 |
<include>org.gvsig:org.gvsig.xmlpull.lib.spi</include> |
|
64 |
<include>org.gvsig:org.gvsig.xmlpull.lib.impl</include> |
|
65 |
<include>org.gvsig:org.gvsig.xmlpull.prov.stax</include> |
|
66 |
<include>org.gvsig:org.gvsig.xmlpull.prov.kxml</include> |
|
67 |
<include>org.gvsig:org.gvsig.xmlschema.lib.api</include> |
|
68 |
<include>org.gvsig:org.gvsig.xmlschema.lib.spi</include> |
|
69 |
<include>org.gvsig:org.gvsig.xmlschema.lib.impl</include> |
|
70 |
<include>org.gvsig:org.gvsig.xmlschema.prov.kxml</include> |
|
71 |
<include>stax:stax</include> |
|
72 |
</includes> |
|
73 |
</dependencySet> |
|
74 |
</dependencySets> |
|
75 |
|
|
76 |
</assembly> |
|
77 |
|
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/gpe/GPELibraryExtension.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 |
* 2009 {Iver T.I.} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.gpe; |
|
29 |
|
|
30 |
import org.gvsig.andami.IconThemeHelper; |
|
31 |
import org.gvsig.andami.plugins.Extension; |
|
32 |
import org.gvsig.fmap.dal.store.gpe.GPEStoreProvider; |
|
33 |
import org.gvsig.fmap.mapcontext.MapContextLocator; |
|
34 |
|
|
35 |
|
|
36 |
/** |
|
37 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
38 |
*/ |
|
39 |
public class GPELibraryExtension extends Extension{ |
|
40 |
|
|
41 |
public void execute(String actionCommand) { |
|
42 |
} |
|
43 |
|
|
44 |
public void initialize() { |
|
45 |
IconThemeHelper.registerIcon("layer", "layer-icon-gpe", this); |
|
46 |
} |
|
47 |
|
|
48 |
public void postInitialize() { |
|
49 |
MapContextLocator.getMapContextManager().registerIconLayer(GPEStoreProvider.NAME, "layer-icon-gpe"); |
|
50 |
} |
|
51 |
|
|
52 |
public boolean isEnabled() { |
|
53 |
return false; |
|
54 |
} |
|
55 |
|
|
56 |
public boolean isVisible() { |
|
57 |
return false; |
|
58 |
} |
|
59 |
|
|
60 |
} |
|
61 |
|
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/MultiSurfaceWriteGml2Operation.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import org.gvsig.fmap.geom.Geometry; |
|
25 |
import org.gvsig.fmap.geom.aggregate.MultiSurface; |
|
26 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
27 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class MultiSurfaceWriteGml2Operation extends WriteGml2Operation{ |
|
36 |
|
|
37 |
public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException { |
|
38 |
initializeParams(ctx); |
|
39 |
MultiSurface multiSurface = (MultiSurface)geom; |
|
40 |
|
|
41 |
writerHandler.startMultiPolygon(id, srs); |
|
42 |
for (int i=0 ; i<multiSurface.getPrimitivesNumber() ; i++){ |
|
43 |
writerHandler.startPolygon(null, new OrientablePrimitiveCoordinateSequence(multiSurface.getSurfaceAt(i)), srs); |
|
44 |
writerHandler.endPolygon(); |
|
45 |
} |
|
46 |
writerHandler.endMultiPolygon(); |
|
47 |
|
|
48 |
return null; |
|
49 |
} |
|
50 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/CurveWriteGml2Operation.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import org.gvsig.fmap.geom.Geometry; |
|
25 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
26 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
27 |
import org.gvsig.fmap.geom.primitive.Curve; |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class CurveWriteGml2Operation extends WriteGml2Operation{ |
|
36 |
|
|
37 |
public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException { |
|
38 |
initializeParams(ctx); |
|
39 |
Curve curve = (Curve)geom; |
|
40 |
|
|
41 |
writerHandler.startLineString(id, new OrientablePrimitiveCoordinateSequence(curve), srs); |
|
42 |
writerHandler.endLineString(); |
|
43 |
|
|
44 |
return null; |
|
45 |
} |
|
46 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/MultiPointWriteGml2Operation.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import org.gvsig.fmap.geom.Geometry; |
|
25 |
import org.gvsig.fmap.geom.aggregate.MultiPoint; |
|
26 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
27 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class MultiPointWriteGml2Operation extends WriteGml2Operation{ |
|
36 |
|
|
37 |
public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException { |
|
38 |
initializeParams(ctx); |
|
39 |
MultiPoint multiPoint = (MultiPoint)geom; |
|
40 |
|
|
41 |
writerHandler.startMultiPoint(id, srs); |
|
42 |
for (int i=0 ; i<multiPoint.getPrimitivesNumber() ; i++){ |
|
43 |
writerHandler.startPoint(null, new PointCoordinatesSequence(multiPoint.getPointAt(i)), srs); |
|
44 |
writerHandler.endPoint(); |
|
45 |
} |
|
46 |
writerHandler.endMultiPoint(); |
|
47 |
|
|
48 |
return null; |
|
49 |
} |
|
50 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/WriteGml2OperationContext.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
25 |
import org.gvsig.gpe.lib.api.writer.IGPEWriterHandler; |
|
26 |
|
|
27 |
|
|
28 |
/** |
|
29 |
* @author gvSIG Team |
|
30 |
* @version $Id$ |
|
31 |
* |
|
32 |
*/ |
|
33 |
public class WriteGml2OperationContext extends GeometryOperationContext { |
|
34 |
public static final String ATTRIBUTE_GPEWRITERHANDLER = "writerHandler"; |
|
35 |
public static final String ATTRIBUTE_SRS = "srs"; |
|
36 |
public static final String ATTRIBUTE_ID = "id"; |
|
37 |
|
|
38 |
/** |
|
39 |
* @return the srs |
|
40 |
*/ |
|
41 |
public String getSrs() { |
|
42 |
return (String) super.getAttribute(ATTRIBUTE_SRS); |
|
43 |
} |
|
44 |
|
|
45 |
/** |
|
46 |
* @param srs the srs to set |
|
47 |
*/ |
|
48 |
public void setSrs(String srs) { |
|
49 |
this.setAttribute(ATTRIBUTE_SRS, srs); |
|
50 |
} |
|
51 |
|
|
52 |
/** |
|
53 |
* @return the Id |
|
54 |
*/ |
|
55 |
public String getId() { |
|
56 |
return (String) super.getAttribute(ATTRIBUTE_ID); |
|
57 |
} |
|
58 |
|
|
59 |
/** |
|
60 |
* @param id the id to set |
|
61 |
*/ |
|
62 |
public void setId(String id) { |
|
63 |
this.setAttribute(ATTRIBUTE_ID, id); |
|
64 |
} |
|
65 |
|
|
66 |
/** |
|
67 |
* @return the writerHandler |
|
68 |
*/ |
|
69 |
public IGPEWriterHandler getWriterHandler() { |
|
70 |
return (IGPEWriterHandler) super.getAttribute(ATTRIBUTE_GPEWRITERHANDLER); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* @param writerHandler the writerHandler to set |
|
75 |
*/ |
|
76 |
public void setWriterHandler(IGPEWriterHandler writerHandler) { |
|
77 |
this.setAttribute(ATTRIBUTE_GPEWRITERHANDLER, writerHandler); |
|
78 |
} |
|
79 |
} |
|
80 |
|
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/SurfaceWriteGml2Operation.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import org.gvsig.fmap.geom.Geometry; |
|
25 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
26 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
27 |
import org.gvsig.fmap.geom.primitive.Surface; |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class SurfaceWriteGml2Operation extends WriteGml2Operation{ |
|
36 |
|
|
37 |
public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException { |
|
38 |
initializeParams(ctx); |
|
39 |
Surface surface = (Surface)geom; |
|
40 |
|
|
41 |
writerHandler.startPolygon(id, new OrientablePrimitiveCoordinateSequence(surface), srs); |
|
42 |
writerHandler.endPolygon(); |
|
43 |
|
|
44 |
return null; |
|
45 |
} |
|
46 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/PointWriteGml2Operation.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import org.gvsig.fmap.geom.Geometry; |
|
25 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
26 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
27 |
import org.gvsig.fmap.geom.primitive.Point; |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class PointWriteGml2Operation extends WriteGml2Operation{ |
|
36 |
|
|
37 |
public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException { |
|
38 |
initializeParams(ctx); |
|
39 |
Point point = (Point)geom; |
|
40 |
|
|
41 |
writerHandler.startPoint(id, new PointCoordinatesSequence(point), srs); |
|
42 |
writerHandler.endPoint(); |
|
43 |
|
|
44 |
return null; |
|
45 |
} |
|
46 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/MultiCurveWriteGml2Operation.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import org.gvsig.fmap.geom.Geometry; |
|
25 |
import org.gvsig.fmap.geom.aggregate.MultiCurve; |
|
26 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
27 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
|
28 |
|
|
29 |
|
|
30 |
/** |
|
31 |
* @author gvSIG Team |
|
32 |
* @version $Id$ |
|
33 |
* |
|
34 |
*/ |
|
35 |
public class MultiCurveWriteGml2Operation extends WriteGml2Operation{ |
|
36 |
|
|
37 |
public Object invoke(Geometry geom, GeometryOperationContext ctx) throws GeometryOperationException { |
|
38 |
initializeParams(ctx); |
|
39 |
MultiCurve multiCurve = (MultiCurve)geom; |
|
40 |
|
|
41 |
writerHandler.startMultiLineString(id, srs); |
|
42 |
for (int i=0 ; i<multiCurve.getPrimitivesNumber() ; i++){ |
|
43 |
writerHandler.startLineString(null, new OrientablePrimitiveCoordinateSequence(multiCurve.getCurveAt(i)), srs); |
|
44 |
writerHandler.endLineString(); |
|
45 |
} |
|
46 |
writerHandler.endMultiLineString(); |
|
47 |
|
|
48 |
return null; |
|
49 |
} |
|
50 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/PointCoordinatesSequence.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import java.io.IOException; |
|
25 |
|
|
26 |
import org.gvsig.fmap.geom.primitive.Point; |
|
27 |
import org.gvsig.gpe.lib.api.parser.ICoordinateIterator; |
|
28 |
import org.gvsig.gpe.lib.api.writer.ICoordinateSequence; |
|
29 |
|
|
30 |
|
|
31 |
/** |
|
32 |
* @author gvSIG Team |
|
33 |
* @version $Id$ |
|
34 |
* |
|
35 |
*/ |
|
36 |
public class PointCoordinatesSequence implements ICoordinateSequence, ICoordinateIterator { |
|
37 |
private Point point = null; |
|
38 |
private boolean hasNext = true; |
|
39 |
|
|
40 |
public PointCoordinatesSequence(Point point) { |
|
41 |
super(); |
|
42 |
this.point = point; |
|
43 |
} |
|
44 |
|
|
45 |
public int getSize() { |
|
46 |
return 1; |
|
47 |
} |
|
48 |
|
|
49 |
public ICoordinateIterator iterator() { |
|
50 |
return this; |
|
51 |
} |
|
52 |
|
|
53 |
public boolean hasNext() throws IOException { |
|
54 |
if (hasNext){ |
|
55 |
hasNext = false; |
|
56 |
return true; |
|
57 |
} |
|
58 |
return false; |
|
59 |
} |
|
60 |
|
|
61 |
public int getDimension() { |
|
62 |
return point.getDimension(); |
|
63 |
} |
|
64 |
|
|
65 |
public void next(double[] buffer) throws IOException { |
|
66 |
for (int i=0 ; i<point.getDimension() ; i++){ |
|
67 |
buffer[i] = point.getCoordinateAt(i); |
|
68 |
} |
|
69 |
} |
|
70 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/WriteGml2Operation.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import org.gvsig.fmap.geom.GeometryLocator; |
|
25 |
import org.gvsig.fmap.geom.GeometryManager; |
|
26 |
import org.gvsig.fmap.geom.operation.GeometryOperation; |
|
27 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
|
28 |
import org.gvsig.gpe.lib.api.writer.IGPEWriterHandler; |
|
29 |
|
|
30 |
|
|
31 |
/** |
|
32 |
* @author gvSIG Team |
|
33 |
* @version $Id$ |
|
34 |
* |
|
35 |
*/ |
|
36 |
public abstract class WriteGml2Operation extends GeometryOperation { |
|
37 |
public static final String NAME = "writeGml2"; |
|
38 |
protected static GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
|
39 |
public static final int CODE = geomManager.getGeometryOperationCode(NAME); |
|
40 |
|
|
41 |
protected String id = null; |
|
42 |
protected IGPEWriterHandler writerHandler; |
|
43 |
protected String srs = null; |
|
44 |
|
|
45 |
public int getOperationIndex() { |
|
46 |
return CODE; |
|
47 |
} |
|
48 |
|
|
49 |
protected void initializeParams(GeometryOperationContext geometryOperationContext){ |
|
50 |
writerHandler = (IGPEWriterHandler)geometryOperationContext.getAttribute(WriteGml2OperationContext.ATTRIBUTE_GPEWRITERHANDLER); |
|
51 |
id = (String)geometryOperationContext.getAttribute(WriteGml2OperationContext.ATTRIBUTE_ID); |
|
52 |
srs = (String)geometryOperationContext.getAttribute(WriteGml2OperationContext.ATTRIBUTE_SRS); |
|
53 |
} |
|
54 |
|
|
55 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/geom/operation/writegml2/OrientablePrimitiveCoordinateSequence.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 |
package org.gvsig.fmap.geom.operation.writegml2; |
|
23 |
|
|
24 |
import java.awt.geom.PathIterator; |
|
25 |
import java.io.IOException; |
|
26 |
|
|
27 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
|
28 |
import org.gvsig.fmap.geom.primitive.OrientablePrimitive; |
|
29 |
import org.gvsig.gpe.lib.api.parser.ICoordinateIterator; |
|
30 |
import org.gvsig.gpe.lib.api.writer.ICoordinateSequence; |
|
31 |
|
|
32 |
|
|
33 |
/** |
|
34 |
* @author gvSIG Team |
|
35 |
* @version $Id$ |
|
36 |
* |
|
37 |
*/ |
|
38 |
public class OrientablePrimitiveCoordinateSequence implements ICoordinateSequence, ICoordinateIterator { |
|
39 |
private OrientablePrimitive orientablePrimitive; |
|
40 |
private GeneralPathX generalPathX; |
|
41 |
private PathIterator pathIterator; |
|
42 |
|
|
43 |
public OrientablePrimitiveCoordinateSequence( |
|
44 |
OrientablePrimitive orientablePrimitive) { |
|
45 |
super(); |
|
46 |
this.orientablePrimitive = orientablePrimitive; |
|
47 |
this.generalPathX = orientablePrimitive.getGeneralPath(); |
|
48 |
this.pathIterator = generalPathX.getPathIterator(null); |
|
49 |
} |
|
50 |
|
|
51 |
public boolean hasNext() throws IOException { |
|
52 |
return !pathIterator.isDone(); |
|
53 |
} |
|
54 |
|
|
55 |
public int getDimension() { |
|
56 |
return orientablePrimitive.getDimension(); |
|
57 |
} |
|
58 |
|
|
59 |
public void next(double[] buffer) throws IOException { |
|
60 |
pathIterator.currentSegment(buffer); |
|
61 |
pathIterator.next(); |
|
62 |
} |
|
63 |
|
|
64 |
public int getSize() { |
|
65 |
return orientablePrimitive.getNumVertices(); |
|
66 |
} |
|
67 |
|
|
68 |
public ICoordinateIterator iterator() { |
|
69 |
return this; |
|
70 |
} |
|
71 |
|
|
72 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/dal/store/gpe/handlers/FmapContentHandlerCreationException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.dal.store.gpe.handlers; |
|
2 |
|
|
3 |
import java.util.HashMap; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.tools.exception.BaseException; |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
/* CVS MESSAGES: |
|
49 |
* |
|
50 |
* $Id$ |
|
51 |
* $Log$ |
|
52 |
* |
|
53 |
*/ |
|
54 |
/** |
|
55 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
56 |
*/ |
|
57 |
public class FmapContentHandlerCreationException extends BaseException{ |
|
58 |
private static final long serialVersionUID = -6021604626521668293L; |
|
59 |
|
|
60 |
public FmapContentHandlerCreationException(){ |
|
61 |
initialize(); |
|
62 |
} |
|
63 |
|
|
64 |
public FmapContentHandlerCreationException(Throwable e){ |
|
65 |
initialize(); |
|
66 |
initCause(e); |
|
67 |
} |
|
68 |
|
|
69 |
protected Map values() { |
|
70 |
return new HashMap(); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* Initialize the properties |
|
75 |
*/ |
|
76 |
private void initialize() { |
|
77 |
messageKey = "gpe_lgvsig_contentHandler_error"; |
|
78 |
formatString = "Error creating the contentHandler for" + |
|
79 |
"Fmap"; |
|
80 |
code = serialVersionUID; |
|
81 |
} |
|
82 |
|
|
83 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/dal/store/gpe/handlers/FmapErrorHandler.java | ||
---|---|---|
1 |
package org.gvsig.fmap.dal.store.gpe.handlers; |
|
2 |
|
|
3 |
import org.gvsig.gpe.lib.impl.parser.GPEErrorHandler; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id$ |
|
48 |
* $Log$ |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
53 |
*/ |
|
54 |
public class FmapErrorHandler extends GPEErrorHandler{ |
|
55 |
|
|
56 |
} |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.219/org.gvsig.gpe.app/org.gvsig.gpe.app.mainplugin/src/main/java/org/gvsig/fmap/dal/store/gpe/handlers/FmapContentHandler.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
20 |
package org.gvsig.fmap.dal.store.gpe.handlers; |
|
21 |
|
|
22 |
import java.io.File; |
|
23 |
import java.io.IOException; |
|
24 |
import java.util.ArrayList; |
|
25 |
import java.util.HashMap; |
|
26 |
import java.util.Iterator; |
|
27 |
import java.util.List; |
|
28 |
import java.util.Map; |
|
29 |
|
|
30 |
import org.cresques.cts.IProjection; |
|
31 |
import org.gvsig.fmap.dal.DataTypes; |
|
32 |
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; |
|
33 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
|
34 |
import org.gvsig.fmap.dal.feature.Feature; |
|
35 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
36 |
import org.gvsig.fmap.dal.feature.spi.DefaultFeatureProvider; |
|
37 |
import org.gvsig.fmap.dal.feature.spi.FeatureProvider; |
|
38 |
import org.gvsig.fmap.dal.feature.spi.FeatureStoreProviderServices; |
|
39 |
import org.gvsig.fmap.dal.store.gpe.GPEStoreProvider; |
|
40 |
import org.gvsig.fmap.dal.store.gpe.model.GPEElement; |
|
41 |
import org.gvsig.fmap.dal.store.gpe.model.GPEFeature; |
|
42 |
import org.gvsig.fmap.geom.Geometry; |
|
43 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
44 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
|
45 |
import org.gvsig.fmap.geom.GeometryLocator; |
|
46 |
import org.gvsig.fmap.geom.GeometryManager; |
|
47 |
import org.gvsig.fmap.geom.aggregate.MultiCurve; |
|
48 |
import org.gvsig.fmap.geom.aggregate.MultiLine; |
|
49 |
import org.gvsig.fmap.geom.aggregate.MultiPoint; |
|
50 |
import org.gvsig.fmap.geom.aggregate.MultiPolygon; |
|
51 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
|
52 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
|
53 |
import org.gvsig.fmap.geom.primitive.Curve; |
|
54 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
55 |
import org.gvsig.fmap.geom.primitive.Line; |
|
56 |
import org.gvsig.fmap.geom.primitive.Point; |
|
57 |
import org.gvsig.fmap.geom.primitive.Polygon; |
|
58 |
import org.gvsig.fmap.geom.primitive.Ring; |
|
59 |
import org.gvsig.gpe.lib.api.parser.IAttributesIterator; |
|
60 |
import org.gvsig.gpe.lib.api.parser.ICoordinateIterator; |
|
61 |
import org.gvsig.gpe.lib.api.parser.IGPEErrorHandler; |
|
62 |
import org.gvsig.gpe.lib.impl.parser.GPEContentHandler; |
|
63 |
import org.jfree.util.Log; |
|
64 |
import org.slf4j.Logger; |
|
65 |
import org.slf4j.LoggerFactory; |
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
public class FmapContentHandler extends GPEContentHandler { |
|
70 |
private static final Logger LOG = LoggerFactory.getLogger(FmapContentHandler.class); |
|
71 |
|
|
72 |
private HashMap featureSet = null; |
|
73 |
private EditableFeatureType featureType = null; |
|
74 |
private FeatureStoreProviderServices store = null; |
|
75 |
private GPEStoreProvider storeProvider = null; |
|
76 |
private GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
|
77 |
private int featureId = 0; |
|
78 |
private Envelope envelope = null; |
|
79 |
private File file = null; |
|
80 |
private IProjection srs = null; |
|
81 |
private int geometryType = 0; |
|
82 |
private boolean useAxisOrderYX = false; |
|
83 |
|
|
84 |
public FmapContentHandler(IGPEErrorHandler errorHandler, FeatureStoreProviderServices store, |
|
85 |
GPEStoreProvider storeProvider, File file, IProjection srs, int geometryType) { |
|
86 |
super(); |
|
87 |
setErrorHandler(errorHandler); |
|
88 |
this.store = store; |
|
89 |
this.storeProvider = storeProvider; |
|
90 |
this.file = file; |
|
91 |
this.srs = srs; |
|
92 |
this.geometryType = geometryType; |
|
93 |
} |
|
94 |
|
|
95 |
public FmapContentHandler(IGPEErrorHandler errorHandler, FeatureStoreProviderServices store, |
|
96 |
GPEStoreProvider storeProvider, File file, IProjection srs, int geometryType, |
|
97 |
boolean useAxisOrderYX) { |
|
98 |
this(errorHandler, store, storeProvider, file, srs, geometryType); |
|
99 |
this.useAxisOrderYX = useAxisOrderYX; |
|
100 |
} |
|
101 |
|
|
102 |
public int getFeaturesCount(){ |
|
103 |
return featureSet.size(); |
|
104 |
} |
|
105 |
|
|
106 |
public Feature getFeatureAt(int index){ |
|
107 |
return (Feature)featureSet.get(new Integer(index)); |
|
108 |
} |
|
109 |
|
|
110 |
public EditableFeatureType getFeatureType(){ |
|
111 |
return featureType; |
|
112 |
} |
|
113 |
|
|
114 |
|
|
115 |
/** |
|
116 |
* @return the featureSet |
|
117 |
*/ |
|
118 |
public HashMap getFeatureSet() { |
|
119 |
return featureSet; |
|
120 |
} |
|
121 |
|
|
122 |
/* |
|
123 |
* (non-Javadoc) |
|
124 |
* @see org.gvsig.gpe.parser.GPEContentHandler#startLayer(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.gvsig.gpe.parser.IAttributesIterator, java.lang.Object, java.lang.Object) |
|
125 |
*/ |
|
126 |
public Object startLayer(String id, String namespace, String name, |
|
127 |
String description, String srs, IAttributesIterator iterator, Object parentLayer, Object box) { |
|
128 |
if (featureSet == null){ |
|
129 |
featureSet = new HashMap(); |
|
130 |
} |
|
131 |
if (envelope == null){ |
|
132 |
try { |
|
133 |
envelope = geomManager.createEnvelope(SUBTYPES.GEOM2D); |
|
134 |
} catch (CreateEnvelopeException e) { |
|
135 |
Log.error("Error creating the envelope", e); |
|
136 |
} |
|
137 |
} |
|
138 |
return featureSet; |
|
139 |
} |
|
140 |
|
|
141 |
/* |
|
142 |
* (non-Javadoc) |
|
143 |
* @see org.gvsig.gpe.IGPEContentHandler#endLayer(java.lang.Object) |
|
144 |
*/ |
|
145 |
public void endLayer(Object layer) { |
|
146 |
if (featureType == null){ |
|
147 |
createFeatureType(null); |
|
148 |
} |
|
149 |
storeProvider.setEnvelope(envelope); |
|
150 |
} |
|
151 |
|
|
152 |
/* |
|
153 |
* (non-Javadoc) |
|
154 |
* @see org.gvsig.gpe.parser.GPEContentHandler#startPoint(java.lang.String, org.gvsig.gpe.parser.ICoordinateIterator, java.lang.String) |
|
155 |
*/ |
|
156 |
public Object startPoint(String id, ICoordinateIterator coords, String srs) { |
|
157 |
return createPoint(coords); |
|
158 |
} |
|
159 |
|
|
160 |
private Point createPoint(ICoordinateIterator coords){ |
|
161 |
double[] buffer = new double[coords.getDimension()]; |
|
162 |
try { |
|
163 |
coords.hasNext(); |
|
164 |
coords.next(buffer); |
|
165 |
Point point = null; |
|
166 |
if (buffer.length == 2){ |
|
167 |
point = (Point) geomManager.create(TYPES.POINT, SUBTYPES.GEOM2D); |
|
168 |
if( useAxisOrderYX ) { |
|
169 |
point.setX(buffer[1]); |
|
170 |
point.setY(buffer[0]); |
|
171 |
} else { |
|
172 |
point.setX(buffer[0]); |
|
173 |
point.setY(buffer[1]); |
|
174 |
} |
|
175 |
}else if (buffer.length == 3){ |
|
176 |
point = (Point) geomManager.create(TYPES.POINT, SUBTYPES.GEOM3D); |
|
177 |
if( useAxisOrderYX ) { |
|
178 |
point.setX(buffer[1]); |
|
179 |
point.setY(buffer[0]); |
|
180 |
} else { |
|
181 |
point.setX(buffer[0]); |
|
182 |
point.setY(buffer[1]); |
|
183 |
} |
|
184 |
point.setCoordinateAt(2, buffer[2]); |
|
185 |
} |
|
186 |
return point; |
|
187 |
} catch (IOException e) { |
|
188 |
getErrorHandler().addError(e); |
|
189 |
} catch (CreateGeometryException e) { |
|
190 |
getErrorHandler().addError(e); |
|
191 |
} |
|
192 |
return null; |
|
193 |
} |
|
194 |
|
|
195 |
private Point createPoint(double[] buffer){ |
|
196 |
try { |
|
197 |
Point point = null; |
|
198 |
if (buffer.length == 2){ |
|
199 |
point = (Point) geomManager.create(TYPES.POINT, SUBTYPES.GEOM2D); |
|
200 |
if( useAxisOrderYX ) { |
|
201 |
point.setX(buffer[1]); |
|
202 |
point.setY(buffer[0]); |
|
203 |
} else { |
|
204 |
point.setX(buffer[0]); |
|
205 |
point.setY(buffer[1]); |
|
206 |
} |
|
207 |
}else if (buffer.length == 3){ |
|
208 |
point = (Point) geomManager.create(TYPES.POINT, SUBTYPES.GEOM3D); |
|
209 |
if( useAxisOrderYX ) { |
|
210 |
point.setX(buffer[1]); |
|
211 |
point.setY(buffer[0]); |
|
212 |
} else { |
|
213 |
point.setX(buffer[0]); |
|
214 |
point.setY(buffer[1]); |
|
215 |
} |
|
216 |
point.setCoordinateAt(2, buffer[2]); |
|
217 |
} |
|
218 |
return point; |
|
219 |
}catch (CreateGeometryException e) { |
|
220 |
getErrorHandler().addError(e); |
|
221 |
} |
|
222 |
return null; |
|
223 |
} |
|
224 |
|
|
225 |
|
|
226 |
/* (non-Javadoc) |
|
227 |
* @see org.gvsig.gpe.parser.GPEContentHandler#startLineString(java.lang.String, org.gvsig.gpe.parser.ICoordinateIterator, java.lang.String) |
|
228 |
*/ |
|
229 |
public Object startLineString(String id, ICoordinateIterator coords, |
|
230 |
String srs) { |
|
231 |
return createCurve(coords); |
|
232 |
} |
|
233 |
|
|
234 |
private Line createCurve(ICoordinateIterator coords){ |
|
235 |
// GeneralPathX gp = createGeneralPathX(coords); |
|
236 |
try { |
|
237 |
Line curve = null; |
|
238 |
if (coords == null || coords.getDimension() == 2){ |
|
239 |
curve = (Line) geomManager.create(TYPES.LINE, SUBTYPES.GEOM2D); |
|
240 |
}else if (coords.getDimension() == 3){ |
|
241 |
curve = (Line) geomManager.create(TYPES.LINE, SUBTYPES.GEOM3D); |
|
242 |
} |
|
243 |
while (coords.hasNext()){ |
|
244 |
Point point=createPoint(coords); |
|
245 |
curve.addVertex(point); |
|
246 |
} |
|
247 |
// curve.setGeneralPath(gp); |
|
248 |
return curve; |
|
249 |
} catch (CreateGeometryException e) { |
|
250 |
getErrorHandler().addError(e); |
|
251 |
} catch (IOException e) { |
|
252 |
getErrorHandler().addError(e); |
|
253 |
} |
|
254 |
return null; |
|
255 |
} |
|
256 |
|
|
257 |
// private GeneralPathX createGeneralPathX(ICoordinateIterator coords){ |
|
258 |
// GeneralPathX gp = new GeneralPathX(); |
|
259 |
// if (coords == null){ |
|
260 |
// return gp; |
|
261 |
// } |
|
262 |
// double[] buffer = new double[coords.getDimension()]; |
|
263 |
// try { |
|
264 |
// if (coords.hasNext()){ |
|
265 |
// coords.next(buffer); |
|
266 |
// if( this.useAxisOrderYX ) { |
|
267 |
// gp.moveTo(buffer[1], buffer[0]); |
|
268 |
// } else { |
|
269 |
// gp.moveTo(buffer[0], buffer[1]); |
|
270 |
// } |
|
271 |
// } |
|
272 |
// while(coords.hasNext()){ |
|
273 |
// coords.next(buffer); |
|
274 |
// if( this.useAxisOrderYX ) { |
|
275 |
// gp.lineTo(buffer[1], buffer[0]); |
|
276 |
// } else { |
|
277 |
// gp.lineTo(buffer[0], buffer[1]); |
|
278 |
// } |
|
279 |
// } |
|
280 |
// } catch (IOException e) { |
|
281 |
// getErrorHandler().addError(e); |
|
282 |
// } |
|
283 |
// return gp; |
|
284 |
// } |
|
285 |
|
|
286 |
/* (non-Javadoc) |
|
287 |
* @see org.gvsig.gpe.parser.GPEContentHandler#startPolygon(java.lang.String, org.gvsig.gpe.parser.ICoordinateIterator, java.lang.String) |
|
288 |
*/ |
|
289 |
|
|
290 |
public Object startPolygon(String id, ICoordinateIterator coords, String srs) { |
|
291 |
return createPolygon(coords); |
|
292 |
} |
|
293 |
|
|
294 |
private Polygon createPolygon(ICoordinateIterator coords){ |
|
295 |
// GeneralPathX gp = createGeneralPathX(coords); |
|
296 |
try { |
|
297 |
Polygon polygon = null; |
|
298 |
if (coords.getDimension() == 2){ |
|
299 |
polygon = (Polygon) geomManager.create(TYPES.POLYGON, SUBTYPES.GEOM2D); |
|
300 |
}else if (coords.getDimension() == 3){ |
|
301 |
polygon = (Polygon) geomManager.create(TYPES.POLYGON, SUBTYPES.GEOM3D); |
|
302 |
} |
|
303 |
//surface.setGeneralPath(gp); |
|
304 |
while (coords.hasNext()){ |
|
305 |
Point point=createPoint(coords); |
|
306 |
polygon.addVertex(point); |
|
307 |
} |
|
308 |
if (!polygon.getVertex(0).equals(polygon.getVertex(polygon.getNumVertices()-1))){ |
|
309 |
polygon.addVertex(polygon.getVertex(0)); |
|
310 |
} |
|
311 |
|
|
312 |
return polygon; |
|
313 |
} catch (CreateGeometryException e) { |
Also available in: Unified diff