Source Code Cross Referenced for GM_LineString.java in  » GIS » GeOxygene-1.3 » fr » ign » cogit » geoxygene » spatial » coordgeom » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeOxygene 1.3 » fr.ign.cogit.geoxygene.spatial.coordgeom 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of the GeOxygene project source files. 
003:         * 
004:         * GeOxygene aims at providing an open framework which implements OGC/ISO specifications for 
005:         * the development and deployment of geographic (GIS) applications. It is a open source 
006:         * contribution of the COGIT laboratory at the Institut Géographique National (the French 
007:         * National Mapping Agency).
008:         * 
009:         * See: http://oxygene-project.sourceforge.net 
010:         *  
011:         * Copyright (C) 2005 Institut Géographique National
012:         *
013:         * This library is free software; you can redistribute it and/or modify it under the terms
014:         * of the GNU Lesser General Public License as published by the Free Software Foundation; 
015:         * either version 2.1 of the License, or any later version.
016:         *
017:         * This library is distributed in the hope that it will be useful, but WITHOUT ANY 
018:         * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
019:         * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
020:         *
021:         * You should have received a copy of the GNU Lesser General Public License along with 
022:         * this library (see file LICENSE if present); if not, write to the Free Software 
023:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024:         *  
025:         */
026:
027:        package fr.ign.cogit.geoxygene.spatial.coordgeom;
028:
029:        import java.util.List;
030:
031:        //import operateur.OpDirectPosition;
032:
033:        /**
034:         * Polyligne. 
035:         * L'attribut "interpolation" est égal à "linear".
036:         * 
037:         * @author Thierry Badard & Arnaud Braun
038:         * @version 1.1
039:         * 
040:         * 19.02.2007 : correction de bug constructeur à partir d'une liste de DirectPosition
041:         *  
042:         */
043:
044:        public class GM_LineString extends GM_CurveSegment {
045:
046:            //////////////////////////////////////////////////////////////////////////
047:            // Attribut "controlPoint" et méthodes pour le traiter ///////////////////
048:            //////////////////////////////////////////////////////////////////////////
049:            /** Points pour le dessin de la polyligne : séquence de DirectPosition. 
050:                Le premier point est le startPoint de la polyligne. */
051:            protected DirectPositionList controlPoint;
052:
053:            /** Renvoie la liste conbtrolPoint. Equivalent de samplePoint() et de coord(). A laisser ?*/
054:            public DirectPositionList getControlPoint() {
055:                return controlPoint;
056:            }
057:
058:            /** Renvoie le DirectPosition de rang i. */
059:            public DirectPosition getControlPoint(int i) {
060:                return (DirectPosition) this .controlPoint.get(i);
061:            }
062:
063:            /** Affecte un DirectPosition au i-ème rang de la liste. */
064:            public void setControlPoint(int i, DirectPosition value) {
065:                this .controlPoint.set(i, value);
066:            }
067:
068:            /** Ajoute un DirectPosition en fin de liste */
069:            public void addControlPoint(DirectPosition value) {
070:                this .controlPoint.add(value);
071:            }
072:
073:            /** Ajoute un DirectPosition au i-ème rang de la liste. */
074:            public void addControlPoint(int i, DirectPosition value) {
075:                this .controlPoint.add(i, value);
076:            }
077:
078:            /** Efface de la liste le DirectPosition passé en paramètre. */
079:            public void removeControlPoint(DirectPosition value) {
080:                this .controlPoint.remove(value);
081:            }
082:
083:            /** Efface le i-ème DirectPosition de la liste. */
084:            public void removeControlPoint(int i) {
085:                this .controlPoint.remove(i);
086:            }
087:
088:            /** Renvoie le nombre de DirectPosition. */
089:            public int sizeControlPoint() {
090:                return this .controlPoint.size();
091:            }
092:
093:            //////////////////////////////////////////////////////////////////////////
094:            // Constructeurs /////////////////////////////////////////////////////////
095:            //////////////////////////////////////////////////////////////////////////
096:            /** Constructeur par défaut.*/
097:            public GM_LineString() {
098:                super ();
099:                this .segment.add(this );
100:                controlPoint = new DirectPositionList();
101:                interpolation = "linear";
102:            }
103:
104:            /** Constructeur à partir d'une liste de DirectPosition.*/
105:            public GM_LineString(DirectPositionList points) {
106:                super ();
107:                this .segment.add(this );
108:                controlPoint = new DirectPositionList();
109:                controlPoint.addAll(points);
110:                interpolation = "linear";
111:            }
112:
113:            //////////////////////////////////////////////////////////////////////////
114:            // Méthode de la norme ///////////////////////////////////////////////////
115:            //////////////////////////////////////////////////////////////////////////
116:            /** A FAIRE. Renvoie null.
117:             * Décompose une polyligne en une séquence de segments.
118:             */
119:            public List asGM_LineSegment() {
120:                return null;
121:            }
122:
123:            //////////////////////////////////////////////////////////////////////////
124:            // Implémentation de méthodes abstraites /////////////////////////////////
125:            //////////////////////////////////////////////////////////////////////////
126:            /**  Renvoie la liste ordonnée des points de contrôle (idem que coord()).   */
127:            public DirectPositionList coord() {
128:                return (this .controlPoint);
129:            }
130:
131:            /** Renvoie un GM_CurveSegment de sens opposé. */
132:            public GM_CurveSegment reverse() {
133:                GM_LineString result = new GM_LineString();
134:                int n = controlPoint.size();
135:                for (int i = 0; i < n; i++)
136:                    result.getControlPoint().add(
137:                            (DirectPosition) controlPoint.get(n - 1 - i));
138:                return result;
139:            }
140:
141:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.