Skip to content

Commit

Permalink
move lopdsgen out of templates into translations, add hidtmgen templa…
Browse files Browse the repository at this point in the history
…te, add controlnetwork template (#3793)
  • Loading branch information
krlberry authored Mar 23, 2020
1 parent febc0db commit 6d2e680
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 9 deletions.
20 changes: 13 additions & 7 deletions isis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,13 @@ execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/autoseed)
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/cnetref) # *.def, *.def.example
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/cnetstats) # *.def, *.def.example
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/cnet_validmeasure) # *.def, *.def.example
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/controlnetworks)
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/findfeatures) # *.lis
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/fullcnetdiff) # *.lis
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/jigsaw) # *.pvl
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/kernels) # *.txt
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/photometry) # *.pvl
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/lopdsgen) # *.pvl
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/templates/hidtmgen) # *.pvl

execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/maps)
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/appdata/images/icons)
Expand Down Expand Up @@ -532,18 +533,18 @@ add_custom_target(templates ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/src/*/templates/*.def ${CMAKE_BINARY_DIR}/appdata/templates/apollo/)
add_dependencies(isis3 templates)

# Add custom build target to copy modified template files to the build/appdata/templates
# directory. (As above - may need to be updated)
add_custom_target(lopdsgen ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/src/lo/apps/lopdsgen/*.pft ${CMAKE_BINARY_DIR}/appdata/templates/lopdsgen/)
add_dependencies(isis3 lopdsgen)

# Add custom build target to copy modified template files to the build/appdata/templates
# directory. (As above - may need to be updated)
add_custom_target(autoreg ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/appdata/templates/autoreg/*.def ${CMAKE_BINARY_DIR}/appdata/templates/autoreg/)
add_dependencies(isis3 autoreg)

# Add custom build target to copy modified template files to the build/appdata/templates
# directory. (As above - may need to be updated)
add_custom_target(hidtmgen ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/appdata/templates/hidtmgen/*.pvl ${CMAKE_BINARY_DIR}/appdata/templates/hidtmgen/)
add_dependencies(isis3 hidtmgen)

add_custom_target(autoseed ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/appdata/templates/autoseed/*.def ${CMAKE_SOURCE_DIR}/appdata/templates/autoseed/*.pvl
${CMAKE_BINARY_DIR}/appdata/templates/autoseed/)
Expand All @@ -569,6 +570,11 @@ add_custom_target(cnetvalid ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_BINARY_DIR}/appdata/templates/cnet_validmeasure/)
add_dependencies(isis3 cnetvalid)

add_custom_target(controlnetworks ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/appdata/templates/controlnetworks/*.template
${CMAKE_BINARY_DIR}/appdata/templates/controlnetworks/)
add_dependencies(isis3 controlnetworks)

add_custom_target(findfeatures ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/appdata/templates/findfeatures/*.lis
${CMAKE_BINARY_DIR}/appdata/templates/findfeatures/)
Expand Down
78 changes: 78 additions & 0 deletions isis/appdata/templates/controlnetworks/ControlNetPvlV0005.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#############################################################
# #
# This is a template file for a PVLV0005 Control Network. #
# #
# #
# Required keywords are marked with a * next to their name. #
# #
#############################################################
#
# Object = ControlNetwork
# NetworkId* = ExampleNetwork1
# TargetName = Template
# UserName = aexample
# Created = 2012-01-04T12:09:57
# LastModified = 2012-01-04T12:09:57
# Description = "Example PvlV0005 ControlNetwork template."
# Version = 5
#
# Object = ControlPoint
# PointType = "Fixed # (Fixed, Constrained, Free)"
# PointId* = I00826010RDR_ex_1_ID
# ChooserName = aexample
# DateTime = 2012-01-04T17:01:32
# EditLock = True
# Ignore = True
# AprioriXYZSource = "User # (None, User, AverageOfMeasures, Reference, Basemap, BundleSolution)"
# AprioriXYZSourceFile = /home/temp/xyzSource.cub
# AprioriRadiusSource = "User # (AverageOfMeasures, BundleSolution, Ellipsoid, DEM)"
# AprioriRadiusSourceFile = /home/temp/radiusSource.cub
#
# # AprioriLatitude = 1.1 <degrees>
# AprioriX = 100 <meters>
#
# # AprioriLongitude = 2.2 <degrees>
# AprioriY = 100 <meters>
#
# # AprioriRadius = 3.3 <meters>
# AprioriZ = 100 <meters>
# AprioriCovarianceMatrix = (1.1, 2.2, 3.3, 4.4, 5.5, 6.6)
# LatitudeConstrained = True
# LongitudeConstrained = True
# RadiusConstrained = True
#
# # AdjustedLatitude = 1.1 <degrees>
# AdjustedX = 100 <meters>
#
# # AdjustedLongitude = 2.2 <degrees>
# AdjustedY = 100 <meters>
#
# # AdjustedRadius = 3.3 <meters>
# AdjustedZ = 100 <meters>
# AdjustedCovarianceMatrix = (1.1, 2.2, 3.3, 4.4, 5.5, 6.6)
#
# Group = ControlMeasure
# SerialNumber* = Example/Measure/111.000
# MeasureType = "Candidate # (Candidate, Manual, RegisteredPixel, RegisteredSubPixel)"
# ChooserName = aexample
# DateTime = 2012-01-04T17:01:32
# EditLock = True
# Ignore = True
# Sample = 180.0
# Line = 270.0
# Diameter = 10.0
# AprioriSample = 50
# AprioriLine = 50
# SampleSigma = 10 <pixels>
# LineSigma = 10 <pixels>
# SampleResidual = 10 <pixels>
# LineResidual = -10 <pixels>
# JigsawRejected = Yes
# MinimumPixelZScore = -6.9339878963865
# MaximumPixelZScore = 7.8509687345151
# GoodnessOfFit = 0.7774975693515
# Reference = True
# End_Group
# End_Object
# End_Object
# End
14 changes: 14 additions & 0 deletions isis/appdata/templates/hidtmgen/hidtmgenParamsTemplate.pvl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See hidtmgen documentation for explanation of
# DTM_SOURCE_PRODUCT_ID and ORTHO_SOURCE_DTM_ID codes
DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0"
DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0"
PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA"
PRODUCER_ID = "UA"
PRODUCER_FULL_NAME = "ALFRED MCEWEN"
PRODUCT_VERSION_ID = "1.0"
SOFTWARE_NAME = "Socet_Set 5.4.1"
PRODUCING_INSTITUTION = "A"
RATIONALE_DESC = ""
#DTM_SOURCE_PRODUCT_ID = (pSP_xxxxxx_xxxx, pSP_yyyyyy_yyyy)
#ORTHO_SOURCE_DTM_ID = DTems_xxxxxx_xxxx_yyyyyy_yyyy_vnn
END
2 changes: 1 addition & 1 deletion isis/src/lo/apps/lopdsgen/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void IsisMain() {

// Add an output format template (group, object, & keyword output order) to
// the PDS PVL
QString formatDir = "$ISISROOT/appdata/templates/lopdsgen/";
QString formatDir = "$ISISROOT/appdata/translations/";
pdsLabel.setFormatTemplate(formatDir + "LoExportTemplate.pft");

// Write labels to output file
Expand Down
2 changes: 1 addition & 1 deletion isis/src/mro/apps/hidtmgen/hidtmgen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ NOTE: The first 15 characters of the product ID pSP_xxxxxx_xxxx are taken

<parameter name="PARAMSPVL">
<type>filename</type>
<default><item>$mro/templates/labels/hidtmgenParamsTemplate.pvl</item></default>
<default><item>$ISISROOT/appdata/templates/hidtmgen/hidtmgenParamsTemplate.pvl</item></default>
<brief>
PVL-formatted file containing required keyword values.
</brief>
Expand Down

0 comments on commit 6d2e680

Please sign in to comment.