Java Doc for DemoBase.java in  » GIS » GeoTools-2.4.1 » org » example » geotools » base » 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 » GeoTools 2.4.1 » org.example.geotools.base 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.example.geotools.base.DemoBase

DemoBase
public class DemoBase (Code)
DemoBase is the primary class of the three Demo* classes which combine into a demonstration application that introduces each of the major modules of the Geotools library. DemoBase creates an instance of each class and provides the methods which will control almost all of the action in the demonstration. WARNING: This is a work in progress and is incomplete. The Demo* classes are organized into a [data model / view / controller] split common to modern applications. Control starts in the 'main' method of this DemoBase class and immediately passses to the DemoGUI instance which is created. In the GUI, interactive control by the user is limited to the 'Quit' button and one other button. Each button, when pressed, returns the control to the 'button*' methods in the demoBase instance of this class. These 'button*' methods then call the remaining methods in the class. Readers can therefore follow the action of the demonstration application simply by reading in turn each of the methods below which follow the 'button*' methods. The View is managed by demoGUI, an instance of the DemoGUI class, which creates the window of the demonstration application. Later on, the instance also creates the JMapPane in which the map will be rendered. The instance therefore holds on to the Renderer and the MapContext instances which determine the contents which will actually be rendered and the details of the rendering such as the styling and projection information. The data model is managed by demoData, an instance of the DemoData class, which holds all the Feature data (the geospatial data maintained by the application). The instance holds several List objects which show how an application can manage data itself. The instance also holds a Catalog object which shows how to use that system of the Geotools Library to manage contents. This tutorial shows the following elements: (1) FeatureSource creation: This creates, through several approaches, the handles which are used later for the manipulation of data. 1.1 - a feature source from scratch 1.2 - a feature source from a shapefile 1.3 - a feature source from a WMS/WFS (an image) (.) Catalog creation: This creates a resource through which to handle all the features used by a complex application. (.) Coordinate Transform creation: This creates a coordinate operation and uses that to transform the data in a feature source to a different Coordinate Referencing System. (.) Query creation: This creates a Filter/Expression to query a feature for its contents and thereby to subset a feature. ... (5) Style creation: This creates the graphical elements which are used to display the data. (6) Display: This creates a GUI MapViewerto display the data. (7) Image output: This renders an image to an image buffer and then dumps the image buffer to a file. ... HISTORY: This class regroups work from many different tutorials. Section 1.1 - "Feature from scratch" was inspired by earlier tutorials. Section 1.2 - "Feature from shapefile" was in Ian's MapViewer class. Section 5 - The style demo came from an email by Tom Howe on user-list. Section 6 - The GUI was inspired by Ian Turton's MapViewer demo. Section 7 - MakeImage with email advice from David Adler, Aaron B. Parks.
author:
   Adrian Custer, gnuGIS
author:
   Justin Deoliveira, The Open Planning Project
version:
   0.03
since:
   2.3-M0


Field Summary
final  StringPOSTGISDATABASE
    
final  StringPOSTGISSERVERURL
    
final  StringPOSTGISUSERNAME
    
final  StringSHAPEFILENAME
    
final  StringSHAPEFILESLDNAME
    
final  StringWFSSERVERURL
    
 DemoDatademoData
    
 DemoGUIdemoGUI
    
final  Envelopeenvlp_NoEdges
    
final  ReferencedEnvelopeenvlp_NoEdges2
    
final  StringimageFileEnd
    
 CoordinateReferenceSystemprojCRS
    

Constructor Summary
public  DemoBase()
    

Method Summary
public  voidbuttonCaptureImage()
    
public  voidbuttonCreateFeatures()
    
public  voidbuttonCreateMap()
    
public  voidbuttonCreateStyles()
    
public  voidbuttonProjectMap()
    
public  voidcapture_as_image()
    
public  FeaturecreateLondonPointFeatureFromScratch()
    
public  StylecreateLondonStyleFromScratch()
     Creates a Style for the London point feature.
public  StylecreateShapefileStyleFromSLDFile(String shpSLDfile)
    
public  voidcreate_ProjectedCRS_from_DefaultGeogCRS()
    
public  voiddisplay_projected_as_Mercator()
    
public  FeatureSourcegetAShapefileFeatureSourceFromCatalog()
     Gets a FeatureCollection with the shapefile from the catalog.
public  ListgetListOfFeatureSourcesForWebFeatureService()
     Loads all the wfs feature sources from the wfs service.

This method must be called

a java List of FeatureSources.
public  voidloadDatabaseIntoCatalog(String dburl)
     Loads a postgis database into the catalog.
public  voidloadLondonFeatureCollectionIntoList(FeatureCollection fc)
    
public  voidloadShapefileIntoCatalog(String shpname)
     Loads a shapefile service into the catalog.
public  voidloadWebFeatureServiceIntoCatalog(String wfsurl)
     Loads a Web Feature Service into the catalog.
public static  voidmain(String[] args)
    
public  FeatureCollectionmakeLondonFeatureCollection(Feature f)
    
public  voidxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx()
    
public  voidxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx()
    

Field Detail
POSTGISDATABASE
final String POSTGISDATABASE(Code)



POSTGISSERVERURL
final String POSTGISSERVERURL(Code)



POSTGISUSERNAME
final String POSTGISUSERNAME(Code)



SHAPEFILENAME
final String SHAPEFILENAME(Code)



SHAPEFILESLDNAME
final String SHAPEFILESLDNAME(Code)



WFSSERVERURL
final String WFSSERVERURL(Code)



demoData
DemoData demoData(Code)



demoGUI
DemoGUI demoGUI(Code)



envlp_NoEdges
final Envelope envlp_NoEdges(Code)



envlp_NoEdges2
final ReferencedEnvelope envlp_NoEdges2(Code)



imageFileEnd
final String imageFileEnd(Code)



projCRS
CoordinateReferenceSystem projCRS(Code)




Constructor Detail
DemoBase
public DemoBase()(Code)




Method Detail
buttonCaptureImage
public void buttonCaptureImage()(Code)



buttonCreateFeatures
public void buttonCreateFeatures()(Code)



buttonCreateMap
public void buttonCreateMap()(Code)



buttonCreateStyles
public void buttonCreateStyles()(Code)



buttonProjectMap
public void buttonProjectMap()(Code)



capture_as_image
public void capture_as_image()(Code)



createLondonPointFeatureFromScratch
public Feature createLondonPointFeatureFromScratch()(Code)



createLondonStyleFromScratch
public Style createLondonStyleFromScratch()(Code)
Creates a Style for the London point feature. a Style appropriate for the point feature.



createShapefileStyleFromSLDFile
public Style createShapefileStyleFromSLDFile(String shpSLDfile)(Code)



create_ProjectedCRS_from_DefaultGeogCRS
public void create_ProjectedCRS_from_DefaultGeogCRS()(Code)



display_projected_as_Mercator
public void display_projected_as_Mercator()(Code)



getAShapefileFeatureSourceFromCatalog
public FeatureSource getAShapefileFeatureSourceFromCatalog()(Code)
Gets a FeatureCollection with the shapefile from the catalog.

This method must be called after DemoBase.loadShapefileIntoCatalog(String) .

The shapefile feature source.
throws:
  IOException - Any I/O errors that occur accessing the shapefile resource.



getListOfFeatureSourcesForWebFeatureService
public List getListOfFeatureSourcesForWebFeatureService() throws IOException(Code)
Loads all the wfs feature sources from the wfs service.

This method must be called

a java List of FeatureSources.
throws:
  IOException -



loadDatabaseIntoCatalog
public void loadDatabaseIntoCatalog(String dburl)(Code)
Loads a postgis database into the catalog.
throws:
  IOException - Any I/O errors loading into the catalog.



loadLondonFeatureCollectionIntoList
public void loadLondonFeatureCollectionIntoList(FeatureCollection fc)(Code)



loadShapefileIntoCatalog
public void loadShapefileIntoCatalog(String shpname)(Code)
Loads a shapefile service into the catalog.
throws:
  IOException - Any I/O errors loading into the catalog.



loadWebFeatureServiceIntoCatalog
public void loadWebFeatureServiceIntoCatalog(String wfsurl)(Code)
Loads a Web Feature Service into the catalog.
Parameters:
  wfsurl - a string URL for the Web Feature Service location.



main
public static void main(String[] args)(Code)

Parameters:
  args -



makeLondonFeatureCollection
public FeatureCollection makeLondonFeatureCollection(Feature f)(Code)



xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
public void xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx()(Code)



xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
public void xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.