Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

included source .proto files from ISIS, regenerated _pb2 files with p… #211

Merged
merged 7 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ release.

### Fixed
- Fixed a bug where scale and offset were being applied backwards to GeoDataset objects.
- Copied and pieced together .proto files from ISIS3/src/control/objs/ControlNetVersioner to plio/plio/io.
- Regenerated _pb2.py files with protoc 28.2 to fix error with old-protoc-generated files. [#210](https://github.com/DOI-USGS/plio/issues/210)
jrcain-usgs marked this conversation as resolved.
Show resolved Hide resolved

## [1.5.5]()
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ dependencies:
- pytest-cov
- coveralls
- nbsphinx
- sphinx=6.2.1
- sphinx
3 changes: 2 additions & 1 deletion environment_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ dependencies:
- pvl
- pyyaml
- sphinx=6.2.1
- sqlalchemy
- sqlalchemy
- setuptools
21 changes: 21 additions & 0 deletions plio/io/ControlNetFileHeaderV0005.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Protocol buffer header descriptor for Isis Control Networks
//
// 2018-06-13 Jesse Mapel - Added flag to indicate it is a protobuf 2 file
// 2024-11-07 Jacob Cain - Copied into Plio from ISIS3/src/control/objs/ControlNetVersioner
// Generated new _pb2.py with protoc 28.2

syntax="proto2";

package Isis;

message ControlNetFileHeaderV0005 {
// Some fields of ControlNet
required string networkId = 1;
required string targetName = 2;
optional string created = 3;
optional string lastModified = 4;
optional string description = 5;
optional string userName = 6;
optional int32 numPoints = 7;
repeated double targetRadii = 10;
}
127 changes: 22 additions & 105 deletions plio/io/ControlNetFileHeaderV0005_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 128 additions & 0 deletions plio/io/ControlNetFileV0002.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
// 2024-11-07 Jacob Cain - Created by combining ControlNetFileHeaderV0002.proto
// and ControlPointFileEntryV0002.proto from
// ISIS3/src/control/objs/ControlNetVersioner
// Generated new _pb2.py with protoc 28.2

syntax="proto2";

package Isis;

message ControlNetFileHeaderV0002 {
// Some fields of ControlNet
required string networkId = 1;
required string targetName = 2;
optional string created = 3;
optional string lastModified = 4;
optional string description = 5;
optional string userName = 6;
repeated int32 pointMessageSizes = 7 [packed = true];
}

message ControlPointFileEntryV0002 {
enum PointType {
Free = 2; // Image to Image
Constrained = 3; // Image to Ground
Fixed = 4; // Image to Ground
obsolete_Tie = 0; // Image to Image
obsolete_Ground = 1; // Image to Ground
}

enum AprioriSource {
None = 0;
User = 1;
AverageOfMeasures = 2;
Reference = 3;
Ellipsoid = 4;
DEM = 5;
Basemap = 6;
BundleSolution = 7;
}

required string id = 1;
required PointType type = 2;
optional string chooserName = 3;
optional string datetime = 4;
optional bool editLock = 5;
optional bool ignore = 6;
optional bool jigsawRejected = 7;
optional int32 referenceIndex = 8;

optional AprioriSource aprioriSurfPointSource = 9;
optional string aprioriSurfPointSourceFile = 10;
optional AprioriSource aprioriRadiusSource = 11;
optional string aprioriRadiusSourceFile = 12;
optional bool latitudeConstrained = 13;
optional bool longitudeConstrained = 14;
optional bool radiusConstrained = 15;
optional double aprioriX = 16; // <meters>
optional double aprioriY = 17; // <meters>
optional double aprioriZ = 18; // <meters>

// Accuracy of apriori coordinates from basemap, user or mission SPICE,
// jigsaw weights based on these values. The sigmas are stored as a
// 3 x 3 variance-covariance matrix.
repeated double aprioriCovar = 19 [packed = true];

optional double adjustedX = 20;
optional double adjustedY = 21;
optional double adjustedZ = 22;

// Set in jigsaw. Accuracy of adjusted lat/lon from basemap, user or
// mission SPICE stored as a 3 x 3 variance-covariance matrix.
repeated double adjustedCovar = 23 [packed = true];

message PointLogData {
optional int32 doubleDataType = 1;
optional double doubleDataValue = 2;
optional int32 boolDataType = 3;
optional bool boolDataValue = 4;
}

repeated PointLogData log = 24;

// Start of ControlMeasure definition
message Measure {
enum MeasureType {
// predicted, unmeasured, unverified
Candidate = 0;
// Hand Measured (e.g., qnet)
Manual = 1;
// Automatically registered to whole pixel (e.g.,pointreg/qnet)
RegisteredPixel = 2;
// Automatically registered to sub-pixel (e.g., pointreg/qnet)
RegisteredSubPixel = 3;
}

message MeasureLogData {
optional int32 doubleDataType = 1;
optional double doubleDataValue = 2;
optional int32 boolDataType = 3;
optional bool boolDataValue = 4;
}

required string serialnumber = 1;
required MeasureType type = 2;
optional double sample = 3;
optional double line = 4;
// Jigsaw info-solution error <pixels>
optional double sampleResidual = 5;
optional double lineResidual = 6;
optional string choosername = 7;
optional string datetime = 8;
optional bool editLock = 9;
optional bool ignore = 10;
optional bool jigsawRejected = 11;
optional double diameter = 12;
// The first identified location of measure
optional double apriorisample = 13;
optional double aprioriline = 14;

// Uncertainty/Sigma of current samp/line <pixels>
optional double samplesigma = 15;
optional double linesigma = 16;
repeated MeasureLogData log = 17;
}

// Actual declaration of variable number of ControlMeasures
repeated Measure measures = 25;
}
Loading
Loading