Comments (2)
Please note the correct syntax for the variable usage:
;$$
It looks like there's a typo in the doc or the single '$' functionality in the MDCS source has been removed for clarity. Will update doc.
Here the in the MDCS parameter file has to to be replaced with a unique name of your choice. Do this for all the variables you have, each with its own unique name without any duplicates unless you want the same user defined value to replace at multiple locations in the parameter file.
e.g. CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year_GENERIC;$MDName$
Now at the command like you can enter the following to replace the default value for the MD i.e CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year_GENERIC with a value of your choice.
e.g. -p:My_New_MD_Name$MDName
Please correct your parameter file and try. If you still face any issues, let us know.
From: eagletilmann [mailto:[email protected]]
Sent: Wednesday, July 22, 2015 2:52 PM
To: Esri/mdcs-py
Subject: [mdcs-py] Use of variables in configuration script (#24)
When using a batch file to create a series of similar Mosaic datasets from the same configuration file (see extract below) I am not able to use variables in the batch and configuration files.
The variables seem to be ignored and the default value is always used. Also: how is a variable used when the variable name is non-unique in the configuration XML? (as is the case with which occurs twice at the top of the file). I am getting a
log-critical: Error: should be the first child-element in
and then the MDCS script fails.
The help specifies the following syntax:
;$
which in my case for below configuration file looks as follows when I want the, and variables to be dynamically specified:
c:\python27\ArcGIS10.3\python.exe C:\Image_Mgmt_Workflow\MDCS\scripts\mdcs.py -i:C:\Image_Mgmt_Workflow\MDCS\Parameter\Config\MPI_CreateMosaicDataset_GENERIC_AlbersEqualArea.xml -p:CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Ficticious$MosaicDataset/Name -p:CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year01$dataset_id -p:year=1$filter
CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year_GENERIC
CM+AR+AF+BB+ERF+SP+CC+CV+AI+DO+BO
<WorkspacePath>md</WorkspacePath>
<Geodatabase>CatchMapper_MPI_Demo_YearlyMosaics</Geodatabase>
<MosaicDataset>
<Name>CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year_GENERIC;$</Name>
<MosaicDatasetType>Source</MosaicDatasetType>
<SRS>PROJCS['NZ_Albers_Equal_Area',GEOGCS['GCS_WGS_1984',DATUM
['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM
['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Albers'],PARAMETER
['false_easting',0.0],PARAMETER['false_northing',0.0],PARAMETER
['central_meridian',175.0],PARAMETER['standard_parallel_1',-30.0],PARAMETER
['standard_parallel_2',-50.0],PARAMETER['latitude_of_origin',-40.0],UNIT['Meter',1.0]]
<num_bands>1</num_bands>
<pixel_type>8_BIT_UNSIGNED</pixel_type>
<AddRasters>
<AddRaster>
<dataset_id>MPI8bit_mosaics_Albers_Year05Grouped;$</dataset_id>
<raster_type>Table @ C:\Image_Mgmt_Workflow\MDCS\MD\CatchMapper_MPI_Demo_YearlyMosaics.gdb\CatchMapper_MPI_AlbersEqualArea_MDCS_Demo\RasterType.OBJECTID=3</raster_type>
<Sources> <data_path>C:\Image_Mgmt_Workflow\MDCS\MD\CatchMapper_MPI_Demo.gdb\CatchMapper_MPI_AlbersEqualArea_MDCS_Demo</data_path>
</Sources>
<filter>year=1;$</filter>
<duplicate_items_action>OVERWRITE_DUPLICATES</duplicate_items_action>
</AddRaster>
</AddRasters>
Thanks for any help on this.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/24.
from mdcs-py.
Thanks Peter,
That works - Have updated my batch and config files.
Just need to mention how MDCS really is the missing link for me when working with Mosaic datasets: scripted configuration of MDS will be the norm for me now- I can hardly believe how much manual configuration that is going to save!
Would you consider writing a blog entry for the Esri blogs to promote this?
Thanks for the great work!
Tilmann
On 25/07/2015, at 8:34 am, Peter Becker <[email protected]mailto:[email protected]> wrote:
Please note the correct syntax for the variable usage:
;$$
It looks like there's a typo in the doc or the single '$' functionality in the MDCS source has been removed for clarity. Will update doc.
Here the in the MDCS parameter file has to to be replaced with a unique name of your choice. Do this for all the variables you have, each with its own unique name without any duplicates unless you want the same user defined value to replace at multiple locations in the parameter file.
e.g. CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year_GENERIC;$MDName$
Now at the command like you can enter the following to replace the default value for the MD i.e CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year_GENERIC with a value of your choice.
e.g. -p:My_New_MD_Name$MDName
Please correct your parameter file and try. If you still face any issues, let us know.
From: eagletilmann [mailto:[email protected]]
Sent: Wednesday, July 22, 2015 2:52 PM
To: Esri/mdcs-py
Subject: [mdcs-py] Use of variables in configuration script (#24)
When using a batch file to create a series of similar Mosaic datasets from the same configuration file (see extract below) I am not able to use variables in the batch and configuration files.
The variables seem to be ignored and the default value is always used. Also: how is a variable used when the variable name is non-unique in the configuration XML? (as is the case with which occurs twice at the top of the file). I am getting a
log-critical: Error: should be the first child-element in
and then the MDCS script fails.
The help specifies the following syntax:
;$
which in my case for below configuration file looks as follows when I want the, and variables to be dynamically specified:
c:\python27\ArcGIS10.3\python.exe C:\Image_Mgmt_Workflow\MDCS\scripts\mdcs.py -i:C:\Image_Mgmt_Workflow\MDCS\Parameter\Config\MPI_CreateMosaicDataset_GENERIC_AlbersEqualArea.xml -p:CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Ficticious$MosaicDataset/Name -p:CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year01$dataset_id -p:year=1$filter
CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year_GENERIC
CM+AR+AF+BB+ERF+SP+CC+CV+AI+DO+BO
md
CatchMapper_MPI_Demo_YearlyMosaics
CatchMapper_MPI_AlbersEqualArea_MDCS_Demo_Year_GENERIC;$
Source
PROJCS['NZ_Albers_Equal_Area',GEOGCS['GCS_WGS_1984',DATUM
['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM
['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Albers'],PARAMETER
['false_easting',0.0],PARAMETER['false_northing',0.0],PARAMETER
['central_meridian',175.0],PARAMETER['standard_parallel_1',-30.0],PARAMETER
['standard_parallel_2',-50.0],PARAMETER['latitude_of_origin',-40.0],UNIT['Meter',1.0]]
<num_bands>1</num_bands>
<pixel_type>8_BIT_UNSIGNED</pixel_type>
<dataset_id>MPI8bit_mosaics_Albers_Year05Grouped;$</dataset_id>
<raster_type>Table @ C:\Image_Mgmt_Workflow\MDCS\MD\CatchMapper_MPI_Demo_YearlyMosaics.gdb\CatchMapper_MPI_AlbersEqualArea_MDCS_Demo\RasterType.OBJECTID=3</raster_type>
<data_path>C:\Image_Mgmt_Workflow\MDCS\MD\CatchMapper_MPI_Demo.gdb\CatchMapper_MPI_AlbersEqualArea_MDCS_Demo</data_path>
year=1;$
<duplicate_items_action>OVERWRITE_DUPLICATES</duplicate_items_action>
Thanks for any help on this.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/24.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-124713042.
This email is confidential and may be legally privileged.
If received in error please destroy and immediately notify us.
from mdcs-py.
Related Issues (20)
- Updated MDTools Setup to support 3.1 version of ArcGIS Pro
- Mosaic Layer as input for MDCS HOT 3
- How to register Mosaic Datasets Footprint layer for web tool publication HOT 3
- Add Deep Learning Commands
- Issue related to Pro with MDCS PYTs/custom objects. HOT 1
- Introducing MDCS Steps functionality HOT 1
- Add standard Lidar commands
- MDTools Setup to support ArcGIS Pro 3.2
- Support for longer namespaces such as arcpy.ia..
- MDCS access support via Jupyter Notebooks
- Update Set Mosaic Dataset Properties .py file HOT 1
- Add Point to Raster tool to MDCS
- Add support to modify the MDCS command chain from a User Function
- Update Master.xml with new parameters for all the relevant GP tools
- MDCS fix ArcGIS version check for Pro
- MDCS/ removal of redundant code that are no longer needed for SP command invocation
- Pro 3.2 support?
- To support user variable values with ';' character
- AMR failure
- No image displayed after embedding raster proxy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdcs-py.