Because #43 has been punted, this is now our last true task before 1.4 can go out the door.
[x] Split get-create-datastore-params command to 2 commands:
list-create-datastore-params - Prints out all parameter names
describe-create-datastore-param - Prints out information about the given parameter
[x] Split get-destroy-datastore-params command to 2 commands:
list-destroy-datastore-params - Prints out all parameter names
describe-destroy-datastore-param - Prints out information about the given parameter
[x] Add powershell test harness for FdoCmd.exe
[x] Add command to query features (analogue of ogrinfo). Default output to ogrinfo-style output
[x] Add GeoJSON output format
[x] Add CSV output format
[x] Add command to obtain feature count of a feature class
[x] Support a --from-file variant of connection method (taking advantage of #45 )
[x] Add tests to powershell harness to exercise a basic command (list-classes) through various file types
[x] Implement command to create a spatial context (create-spatial-context)
[x] Implement command to destroy a spatial context (destroy-spatial-context)
[x] Implement command to get extents of a feature class (get-class-extents)
[x] Add GeoJSON output support
[x] dump-schema command should allow the option to change the name of the schema being saved
[x] apply-schema command should allow for schema names to be re-mapped
[x] Fix up execute-sql-query
[x] Implement execute-sql-non-query
[x] Implement select-aggregates
[x] Add usage examples for our implemented commands
[ ] Use FileInfo and DirectoryInfo instead of string to represent file and directory arguments respectively (the CommandLine library supports this, so we should use it!) Bug in upstream CommandLine library means we can't generate useful usage examples for any command that would have options of this type, so park it.
[x] Replace copy-to-file command with a more lower-level copy-class command to copy data from one feature class to another (copy-to-file can be replicated as a powershell wrapper on top of this lower-level command)
[x] Add a mode for this command where only the "check if target class needs to be created/modified" section is run with the main bulk copy being skipped.
[x] If target file path given and path does not exist, attempt to create it
[x] If target file path is a .shp file, use the apply schema trick to create the file
[x] Support specifying spatial context overrides
[x] Make sure bcp error logs aren't written to where FdoCmd.exe resides
Acceptance Tests
[x] Solely through FdoCmd.exe we can bulk copy all test Sheboygan SHP files into an RDBMS of our choosing
[x] Not required but nice to have: See if we can fully bootstrap an Oracle datastore without the assistance of ogr2ogr and SQLPlus CLI.
Issues discovered during testing
[x] copy-class: Need to support a flag where only the task is generated (don't do setup and don't do bulk copy)
[x] copy-class: Add support for insert batch size
[x] Document the quirks of the King Oracle provider and its workarounds
Class name encoding when doing a copy-class
Applying schemas does not update, it fully creates. Has important ramifications for bulk copy. Strongly recommend that necessary target tables and bcp definitions be prepared up-front and just use FdoCmd for bcp task execution.
Strongly recommend setting a batch size when doing bulk copy as regular insert is extremely slow Batch insert may not work properly for King Oracle provider, may have to accept the slowness
Spatial contexts are not persisted (only recorded in memory by provider)
Spatial contexts have/should only specify a SC name of OracleSridXXXX where XXXX is a 4-digit SRID
Because #43 has been punted, this is now our last true task before 1.4 can go out the door.
get-create-datastore-params
command to 2 commands:list-create-datastore-params
- Prints out all parameter namesdescribe-create-datastore-param
- Prints out information about the given parameterget-destroy-datastore-params
command to 2 commands:list-destroy-datastore-params
- Prints out all parameter namesdescribe-destroy-datastore-param
- Prints out information about the given parameterFdoCmd.exe
ogrinfo
). Default output to ogrinfo-style output--from-file
variant of connection method (taking advantage of #45 )list-classes
) through various file typescreate-spatial-context
)destroy-spatial-context
)get-class-extents
)dump-schema
command should allow the option to change the name of the schema being savedapply-schema
command should allow for schema names to be re-mappedexecute-sql-query
execute-sql-non-query
select-aggregates
[ ] UseBug in upstream CommandLine library means we can't generate useful usage examples for any command that would have options of this type, so park it.FileInfo
andDirectoryInfo
instead ofstring
to represent file and directory arguments respectively (the CommandLine library supports this, so we should use it!)copy-to-file
command with a more lower-levelcopy-class
command to copy data from one feature class to another (copy-to-file
can be replicated as a powershell wrapper on top of this lower-level command)FdoCmd.exe
residesFdoCmd.exe
we can bulk copy all test Sheboygan SHP files into an RDBMS of our choosingFdoCmd.exe
we can replicate the GeoJSON feature splitting process as I had blogged previously (https://themapguyde.blogspot.com/2020/03/mapguide-tidbits-unconventional-way-to.html)ogr2ogr
and SQLPlus CLI.copy-class
: Need to support a flag where only the task is generated (don't do setup and don't do bulk copy)copy-class
: Add support for insert batch sizecopy-class
Strongly recommend setting a batch size when doing bulk copy as regular insert is extremely slowBatch insert may not work properly for King Oracle provider, may have to accept the slownessOracleSridXXXX
whereXXXX
is a 4-digit SRID