Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »






Clean up shapefile store implementation



The current shapefile datastore is based on AbstractDataStore, a base class that while not deprecated, is not favoured either for new implementation (the new reference being ContentDataStore). The current implementation is brittle and harder than it should be to maintain, and it's also based on two stores, the plain and indexed ones, that were never merged togheter, effectively duplicating the effort to maintain the code.

The current shapefile-ng module, in unsupported, is based on ContentDataStore instead, providing a set of advantages:

  • the base class is actively maintained and improved
  • cleaner implementation, with less classes, less duplication, better leveraging what the base library has to offer
  • tidied up set of constructors, smaller public interface, with behavior variants exposed as properties
  • cleaner package structure
  • several unused classes removed
  • unit tests migrated to JUnit 4
  • small performance improvements in the non indexed case (useful when reading from read only media or remote locations)
The change only affected the upper level, whilst the code reading shp/dbf/shx/fix/qix files has remained largely untouched.
Migration wise, there are a few cases depending on how much the client code is linked to the shapefile data store specific methods:
  • if the code creates the shapefile store by using either the factory or the DataStoreFinder no changes are needed, as the same parameters are exposed in the two stores
  • if the code manually creates the shapefile store using its constructors, changes will be required as the new code has a single constructor with the shapefile URL, and all other parameters are provided via setters instead
  • if the code uses methods specific to ShapefileDataStore some renames of the methods being called are in order


This proposal is under construction.

Voting has not started yet:


This section is used to make sure your proposal is complete (did you remember documentation?) and has enough paid or volunteer time lined up to be a success


no progress






lack mandate/funds/time


volunteer needed

  1. API changed based on BEFORE / AFTER (tick)
  2. Update default implementation (tick)
  3. Remove deprecated code from GeoTools project (tick)
  4. Update the user guide (tick)
  5. Update or provided sample code in demo (tick)
  6. review user documentation (tick)

API Changes

Using ShapefileDataStore directly



Documentation Changes

list the pages effected by this proposal

  • No labels