File tree Expand file tree Collapse file tree 6 files changed +63
-1
lines changed
Expand file tree Collapse file tree 6 files changed +63
-1
lines changed Original file line number Diff line number Diff line change 1+ .. module :: workspace.flatgeobuf
2+ :synopsis: Flatgeobuf workspace implementation.
3+
4+ Geobuf
5+ ======
6+
7+ .. automodule :: geoscript.workspace.flatgeobuf
8+ :members: Flatgeobuf
9+
10+
Original file line number Diff line number Diff line change 1+ .. module :: workspace.geobuf
2+ :synopsis: Geobuf workspace implementation.
3+
4+ Geobuf
5+ ======
6+
7+ .. automodule :: geoscript.workspace.geobuf
8+ :members: Geobuf
9+
10+
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ def _import(mod, clas):
1818Oracle = _import ('oracle' , 'Oracle' )
1919GeoPackage = _import ('geopackage' , 'GeoPackage' )
2020Geobuf = _import ('geobuf' , 'Geobuf' )
21-
21+ FlatGeobuf = _import ( 'flatgeobuf' , 'FlatGeobuf' )
Original file line number Diff line number Diff line change 1+ """
2+ the :mod:`workspace.property` module provides a workspace implemntation based on a directory of java style property files.
3+ """
4+
5+ import os
6+ from java import io , net
7+ from geoscript import util
8+ from geoscript .workspace import Workspace
9+ from org .geotools .data .flatgeobuf import FlatgeobufDataStoreFactory
10+
11+ class FlatGeobuf (Workspace ):
12+ """
13+ A subclass of :class:`Workspace <geoscript.workspace.workspace.Workspace>` that provides layers that correspond to flatgeobuf files in a directory.
14+
15+ *dir* is the optional path as a ``str`` to a directory. If not specified it defaults to ``os.getcwd()``.
16+ """
17+
18+ def __init__ (self , dir = None ):
19+ dir = dir or os .getcwd ()
20+ params = {'flatgeobuf-file' : util .toFile (dir )}
21+ Workspace .__init__ (self , FlatgeobufDataStoreFactory (), params )
22+
23+ def __repr__ (self ):
24+ return 'FlatGeobuf[%s]' % str (self ._store .info .source .path )
Original file line number Diff line number Diff line change 155155 <artifactId >gt-imageio-ext-gdal</artifactId >
156156 <version >${gt.version} </version >
157157 </dependency >
158+ <dependency >
159+ <groupId >org.geotools</groupId >
160+ <artifactId >gt-flatgeobuf</artifactId >
161+ <version >${gt.version} </version >
162+ </dependency >
158163 <dependency >
159164 <groupId >org.geotools</groupId >
160165 <artifactId >gt-geopkg</artifactId >
Original file line number Diff line number Diff line change 1+ import os
2+ import shutil
3+ from tests .workspace .workspacetest import WorkspaceTest
4+ from geoscript .workspace import FlatGeobuf
5+
6+ class FlatGeobufWorkspace_Test (WorkspaceTest ):
7+
8+ def setUp (self ):
9+ self .path = 'work/flatgeobufs'
10+ if os .path .isdir (self .path ):
11+ shutil .rmtree (self .path )
12+ os .mkdir (self .path )
13+ self .ws = FlatGeobuf (self .path )
You can’t perform that action at this time.
0 commit comments