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


org.geotools.data.shapefile.ShapefileDataStore
   org.geotools.data.shapefile.indexed.IndexedShapefileDataStore

IndexedShapefileDataStore
public class IndexedShapefileDataStore extends ShapefileDataStore (Code)
A DataStore implementation which allows reading and writing from Shapefiles.
author:
   Ian Schneider
author:
   Tommaso Nolli

Inner Class :protected static class Reader extends AbstractAttributeIO implements AttributeReader,RecordNumberTracker
Inner Class :protected class Writer implements FeatureWriter

Field Summary
final public static  byteTREE_GRX
    
final public static  byteTREE_NONE
    
final public static  byteTREE_QIX
    
 booleancreateIndex
    
public  URLfixURL
    
 intmaxDepth
    
 bytetreeType
    
final  URLtreeURL
    
final  booleanuseIndex
    

Constructor Summary
public  IndexedShapefileDataStore(URL url)
     Creates a new instance of ShapefileDataStore.
public  IndexedShapefileDataStore(URL url, URI namespace)
     Creates a new instance of ShapefileDataStore.
public  IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer)
     Creates a new instance of ShapefileDataStore.
public  IndexedShapefileDataStore(URL url, boolean useMemoryMappedBuffer)
     Creates a new instance of ShapefileDataStore.
public  IndexedShapefileDataStore(URL url, boolean useMemoryMappedBuffer, boolean createIndex)
     Creates a new instance of ShapefileDataStore.
public  IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer, boolean createIndex, byte treeType)
     Creates a new instance of ShapefileDataStore.
public  IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer, boolean createIndex, byte treeType, Charset dbfCharset)
     Creates a new instance of ShapefileDataStore.

Method Summary
public  voidbuildQuadTree(int maxDepth)
     Builds the QuadTree index.
protected  FeatureReadercreateFeatureReader(String typeName, Reader r, FeatureType readerSchema)
    
protected  StringcreateFeatureTypeName()
     Create the type name of the single FeatureType this DataStore represents.
For example, if the urls path is file:///home/billy/mytheme.shp, the type name will be mytheme.
protected  FeatureWritercreateFeatureWriter(String typeName, Transaction transaction)
     Create a FeatureWriter for the given type name.
protected  voidfinalize()
    
protected  ReadergetAttributesReader(boolean readDbf, boolean readGeometry, Filter filter)
     Returns the attribute reader, allowing for a pure shape reader, or a combined dbf/shp reader.
protected  EnvelopegetBounds(Query query)
    
protected  StringgetCurrentTypeName()
    
protected  FeatureReadergetFeatureReader(String typeName, Query query)
     Use the spatial index if available and adds a small optimization: if no attributes are going to be read, don't uselessly open and read the dbf file.
public  FeatureSourcegetFeatureSource(String typeName)
    
public  FeatureWritergetFeatureWriterAppend(String typeName, Transaction transaction)
    
public  FeatureTypegetSchema(String typeName)
     Obtain the FeatureType of the given name.
public  FeatureTypegetSchema()
    
public  String[]getTypeNames()
     Get an array of type names this DataStore holds.
ShapefileDataStore will always return a single name.
protected  FiltergetUnsupportedFilter(String typeName, Filter filter)
    
public  booleanisIndexed()
     Returns true if the indices already exist and do not need to be regenerated.
public  booleanisLocal()
     Determine if the location of this shape is local or remote.
public  booleanisMemoryMapped()
    
protected  DbaseFileReaderopenDbfReader()
     Convenience method for opening a DbaseFileReader.
protected  QuadTreeopenQuadTree()
     Convenience method for opening a QuadTree index.
protected  RTreeopenRTree()
     Convenience method for opening an RTree index.
protected  voidtypeCheck(String requested)
     A convenience method to check if a type name is correct.

Field Detail
TREE_GRX
final public static byte TREE_GRX(Code)



TREE_NONE
final public static byte TREE_NONE(Code)



TREE_QIX
final public static byte TREE_QIX(Code)



createIndex
boolean createIndex(Code)



fixURL
public URL fixURL(Code)



maxDepth
int maxDepth(Code)



treeType
byte treeType(Code)



treeURL
final URL treeURL(Code)



useIndex
final boolean useIndex(Code)




Constructor Detail
IndexedShapefileDataStore
public IndexedShapefileDataStore(URL url) throws java.net.MalformedURLException(Code)
Creates a new instance of ShapefileDataStore.
Parameters:
  url - The URL of the shp file to use for this DataSource.



IndexedShapefileDataStore
public IndexedShapefileDataStore(URL url, URI namespace) throws java.net.MalformedURLException(Code)
Creates a new instance of ShapefileDataStore.
Parameters:
  url - The URL of the shp file to use for this DataSource.
Parameters:
  namespace - DOCUMENT ME!



IndexedShapefileDataStore
public IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer) throws java.net.MalformedURLException(Code)
Creates a new instance of ShapefileDataStore.
Parameters:
  url - The URL of the shp file to use for this DataSource.
Parameters:
  namespace - DOCUMENT ME!
Parameters:
  useMemoryMappedBuffer - enable/disable memory mapping of files



IndexedShapefileDataStore
public IndexedShapefileDataStore(URL url, boolean useMemoryMappedBuffer) throws java.net.MalformedURLException(Code)
Creates a new instance of ShapefileDataStore.
Parameters:
  url - The URL of the shp file to use for this DataSource.
Parameters:
  useMemoryMappedBuffer - enable/disable memory mapping of files



IndexedShapefileDataStore
public IndexedShapefileDataStore(URL url, boolean useMemoryMappedBuffer, boolean createIndex) throws java.net.MalformedURLException(Code)
Creates a new instance of ShapefileDataStore.
Parameters:
  url - The URL of the shp file to use for this DataSource.
Parameters:
  useMemoryMappedBuffer - enable/disable memory mapping of files
Parameters:
  createIndex - enable/disable automatic index creation if needed



IndexedShapefileDataStore
public IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer, boolean createIndex, byte treeType) throws MalformedURLException(Code)
Creates a new instance of ShapefileDataStore.
Parameters:
  url - The URL of the shp file to use for this DataSource.
Parameters:
  namespace - DOCUMENT ME!
Parameters:
  useMemoryMappedBuffer - enable/disable memory mapping of files
Parameters:
  createIndex - enable/disable automatic index creation if needed
Parameters:
  treeType - DOCUMENT ME!
throws:
  NullPointerException - DOCUMENT ME! .



IndexedShapefileDataStore
public IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer, boolean createIndex, byte treeType, Charset dbfCharset) throws java.net.MalformedURLException(Code)
Creates a new instance of ShapefileDataStore.
Parameters:
  url - The URL of the shp file to use for this DataSource.
Parameters:
  namespace - DOCUMENT ME!
Parameters:
  useMemoryMappedBuffer - enable/disable memory mapping of files
Parameters:
  createIndex - enable/disable automatic index creation if needed
Parameters:
  treeType - DOCUMENT ME!
Parameters:
  dbfCharset - Charset used to decode strings from the DBF
throws:
  NullPointerException - DOCUMENT ME! .




Method Detail
buildQuadTree
public void buildQuadTree(int maxDepth) throws TreeException(Code)
Builds the QuadTree index. Usually not necessary since reading features will index when required
Parameters:
  maxDepth - depth of the tree. if < 0 then a best guess is made.
throws:
  TreeException -



createFeatureReader
protected FeatureReader createFeatureReader(String typeName, Reader r, FeatureType readerSchema) throws SchemaException, IOException(Code)
DOCUMENT ME!
Parameters:
  typeName -
Parameters:
  r -
Parameters:
  readerSchema -
throws:
  SchemaException -
throws:
  IOException -



createFeatureTypeName
protected String createFeatureTypeName()(Code)
Create the type name of the single FeatureType this DataStore represents.
For example, if the urls path is file:///home/billy/mytheme.shp, the type name will be mytheme. A name based upon the last path component of the url minus theextension.



createFeatureWriter
protected FeatureWriter createFeatureWriter(String typeName, Transaction transaction) throws IOException(Code)
Create a FeatureWriter for the given type name.
Parameters:
  typeName - The typeName of the FeatureType to write
Parameters:
  transaction - DOCUMENT ME! A new FeatureWriter.
throws:
  IOException - If the typeName is not available or some other error occurs.



finalize
protected void finalize() throws Throwable(Code)



getAttributesReader
protected Reader getAttributesReader(boolean readDbf, boolean readGeometry, Filter filter) throws IOException(Code)
Returns the attribute reader, allowing for a pure shape reader, or a combined dbf/shp reader.
Parameters:
  readDbf - -if true, the dbf fill will be opened and read
Parameters:
  readGeometry - DOCUMENT ME!
Parameters:
  filter - -a Filter to use
throws:
  IOException -



getBounds
protected Envelope getBounds(Query query) throws IOException(Code)

See Also:   org.geotools.data.AbstractDataStore.getBounds(org.geotools.data.Query)



getCurrentTypeName
protected String getCurrentTypeName()(Code)



getFeatureReader
protected FeatureReader getFeatureReader(String typeName, Query query) throws IOException(Code)
Use the spatial index if available and adds a small optimization: if no attributes are going to be read, don't uselessly open and read the dbf file.
See Also:   org.geotools.data.AbstractDataStore.getFeatureReader(java.lang.Stringorg.geotools.data.Query)



getFeatureSource
public FeatureSource getFeatureSource(String typeName) throws IOException(Code)

See Also:   org.geotools.data.DataStore.getFeatureSource(java.lang.String)



getFeatureWriterAppend
public FeatureWriter getFeatureWriterAppend(String typeName, Transaction transaction) throws IOException(Code)



getSchema
public FeatureType getSchema(String typeName) throws IOException(Code)
Obtain the FeatureType of the given name. ShapefileDataStore contains only one FeatureType.
Parameters:
  typeName - The name of the FeatureType. The FeatureType that this DataStore contains.
throws:
  IOException - If a type by the requested name is not present.



getSchema
public FeatureType getSchema() throws IOException(Code)



getTypeNames
public String[] getTypeNames()(Code)
Get an array of type names this DataStore holds.
ShapefileDataStore will always return a single name. An array of length one containing the single type held.



getUnsupportedFilter
protected Filter getUnsupportedFilter(String typeName, Filter filter)(Code)



isIndexed
public boolean isIndexed()(Code)
Returns true if the indices already exist and do not need to be regenerated. true if the indices already exist and do not need to be regenerated.



isLocal
public boolean isLocal()(Code)
Determine if the location of this shape is local or remote. true if local, false if remote



isMemoryMapped
public boolean isMemoryMapped()(Code)



openDbfReader
protected DbaseFileReader openDbfReader() throws IOException(Code)
Convenience method for opening a DbaseFileReader. A new DbaseFileReader
throws:
  IOException - If an error occurs during creation.



openQuadTree
protected QuadTree openQuadTree() throws StoreException(Code)
Convenience method for opening a QuadTree index. A new QuadTree
throws:
  StoreException -



openRTree
protected RTree openRTree() throws IOException(Code)
Convenience method for opening an RTree index. A new RTree.
throws:
  IOException - If an error occurs during creation.
throws:
  DataSourceException - DOCUMENT ME!



typeCheck
protected void typeCheck(String requested) throws IOException(Code)
A convenience method to check if a type name is correct.
Parameters:
  requested - The type name requested.
throws:
  IOException - If the type name is not available



Fields inherited from org.geotools.data.shapefile.ShapefileDataStore
final public static Charset DEFAULT_STRING_CHARSET(Code)(Java Doc)
protected Charset dbfCharset(Code)(Java Doc)
final protected URL dbfURL(Code)(Java Doc)
protected URI namespace(Code)(Java Doc)
final protected URL prjURL(Code)(Java Doc)
protected Lock readWriteLock(Code)(Java Doc)
protected FeatureType schema(Code)(Java Doc)
final protected URL shpURL(Code)(Java Doc)
final protected URL shxURL(Code)(Java Doc)
protected boolean useMemoryMappedBuffer(Code)(Java Doc)
final protected URL xmlURL(Code)(Java Doc)

Methods inherited from org.geotools.data.shapefile.ShapefileDataStore
protected void copyAndDelete(URL src, long temp) throws IOException(Code)(Java Doc)
protected static DbaseFileHeader createDbaseHeader(FeatureType featureType) throws IOException, DbaseFileException(Code)(Java Doc)
protected FeatureReader createFeatureReader(String typeName, Reader r, FeatureType readerSchema) throws SchemaException(Code)(Java Doc)
protected String createFeatureTypeName()(Code)(Java Doc)
protected FeatureWriter createFeatureWriter(String typeName, Transaction transaction) throws IOException(Code)(Java Doc)
protected Map createMetadata(String typeName)(Code)(Java Doc)
public void createSchema(FeatureType featureType) throws IOException(Code)(Java Doc)
public void forceSchemaCRS(CoordinateReferenceSystem crs) throws IOException(Code)(Java Doc)
protected Reader getAttributesReader(boolean readDbf) throws IOException(Code)(Java Doc)
protected Envelope getBounds() throws DataSourceException(Code)(Java Doc)
protected Envelope getBounds(Query query) throws IOException(Code)(Java Doc)
public int getCount(Query query) throws IOException(Code)(Java Doc)
protected String getCurrentTypeName()(Code)(Java Doc)
protected FeatureReader getFeatureReader(String typeName) throws IOException(Code)(Java Doc)
protected FeatureReader getFeatureReader() throws IOException(Code)(Java Doc)
protected FeatureReader getFeatureReader(String typeName, Query query) throws IOException(Code)(Java Doc)
public FeatureSource getFeatureSource(String typeName) throws IOException(Code)(Java Doc)
protected ReadableByteChannel getReadChannel(URL url) throws IOException(Code)(Java Doc)
public FeatureType getSchema(String typeName) throws IOException(Code)(Java Doc)
public FeatureType getSchema() throws IOException(Code)(Java Doc)
protected File getStorageFile(URL url, long temp)(Code)(Java Doc)
protected URL getStorageURL(URL url, long temp) throws java.net.MalformedURLException(Code)(Java Doc)
public Charset getStringCharset()(Code)(Java Doc)
public String[] getTypeNames()(Code)(Java Doc)
protected WritableByteChannel getWriteChannel(URL url) throws IOException(Code)(Java Doc)
public boolean isLocal()(Code)(Java Doc)
protected DbaseFileReader openDbfReader() throws IOException(Code)(Java Doc)
protected IndexFile openIndexFile(URL shxURL) throws IOException(Code)(Java Doc)
protected PrjFileReader openPrjReader() throws IOException, FactoryException(Code)(Java Doc)
protected ShapefileReader openShapeReader() throws IOException(Code)(Java Doc)
protected AttributeType[] readAttributes() throws IOException(Code)(Java Doc)
public void setStringCharset(Charset stringCharset)(Code)(Java Doc)
protected void typeCheck(String requested) throws IOException(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.