Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Swigcsm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Swigcsm
Commits
a0ea1a77
Commit
a0ea1a77
authored
6 years ago
by
jay
Browse files
Options
Downloads
Patches
Plain Diff
Added README.md
parent
73b83ad7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+45
-0
45 additions, 0 deletions
README.md
with
45 additions
and
0 deletions
README.md
0 → 100644
+
45
−
0
View file @
a0ea1a77
# SWIG wrappers for the Community Sensor Model
This repository contains SWIG wrappers for the CSM. The wrappers are currently
only be created for Python, though many other languages can be supported.
## Building & Installing
-
Ensure that the library is installed
-
(Optional) Install the USGS CSM_CameraModel libraries to ensure that this
wrapper is able to do something.
-
mkdir build
-
cd build
-
cmake ..
-
make
-
cd python
-
python setup.py install
##
The CSM is designed so that plugins with a common insterface are dynamically
loaded. This wrapper is designed to continue that philosophy. Therefore,
loading an implementation of the interface is a little different than a
standard python import.
```
python
import
csmapi
import
ctypes
# THis dynamically registers this plugin with the CSM API.
lib
=
ctypes
.
CDLL
(
'
path_to_the_libusgscsm.so
'
)
# The two methods that are implemented are getList and findPlugin
plugin_list
=
csmapi
.
Plugin
.
getList
()
# Should be 2 assuming the USGS CSM-CameraModel was used
print
(
len
(
plugin_list
))
```
## Issues
The dynamic cast from the model up the inheretance tree to RasterGM has not
yet been implemented. The test_functional.py (in tests) demonstrates how the
returned object is a pointer to a Model. This needs to be dynamically cast (I
think with a %factory directive) to the RasterGM class that contains the full
suite of methods.
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment