diff --git a/LargeNetworkAnalysisTools.SolveLargeODCostMatrix.pyt.xml b/LargeNetworkAnalysisTools.SolveLargeODCostMatrix.pyt.xml index 6c46ea1..39d19b6 100644 --- a/LargeNetworkAnalysisTools.SolveLargeODCostMatrix.pyt.xml +++ b/LargeNetworkAnalysisTools.SolveLargeODCostMatrix.pyt.xml @@ -1,2 +1,2 @@ -20210326134543001.0TRUE2023010694038001500000005000ItemDescriptionc:\program files\arcgis\pro\Resources\Help\gp<DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>The feature class or layer containing the origins.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>The feature class or layer containing the destinations.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Network dataset, network dataset layer, or portal URL to use when calculating the OD Cost Matrix.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Network travel mode to use when calculating the OD Cost Matrix</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The time units the output Total_Time field will be reported in.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The distance units the output Total_Distance field will be reported in.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Defines the chunk size for parallel OD Cost Matrix calculations. For example, if you want to process a maximum of 1000 origins and 1000 destinations in a single chunk, set this parameter to 1000.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Defines the maximum number of parallel processes to run at once. Do not exceed the number of logical processors of your machine.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Path to the output feature class that will contain the updated origins, which may be spatially sorted and have added fields. The OriginOID field in the Output OD Lines Feature Class refers to the ObjectID of the Output Updated Origins and not the original input origins.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Path to the output feature class that will contain the updated destinations, which may be spatially sorted and have added fields. The DestinationOID field in the Output OD Lines Feature Class refers to the ObjectID of the Output Updated Destinations and not the original input destinations.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The desired output format for the OD Cost Matrix Lines. The available choices are:</SPAN></P><UL><LI><P><SPAN>"Feature class" - A single, combined feature class. This option is the slowest to create and will likely fail for extremely large problems.</SPAN></P></LI><LI><P><SPAN>"CSV files" - A set of .csv files. Each file represents the OD Cost Matrix Lines output, without shape geometry, for a chunk of origins and a chunk of destinations, using the naming scheme `ODLines_O_#_#_D_#_#.csv`, where the `#` signs represent the ObjectID ranges of the origins and destinations in the chunk. If you have set a value for the Number of Destinations to Find for Each Origin parameter, you may find some output files using the naming scheme `ODLines_O_#_#.csv` because results from all destinations have been combined into one file.</SPAN></P></LI><LI><P><SPAN>"Apache Arrow files" - A set of Apache Arrow files. Each file represents the OD Cost Matrix Lines output, without shape geometry, for a chunk of origins and a chunk of destinations, using the naming scheme `ODLines_O_#_#_D_#_#.arrow`, where the `#` signs represent the ObjectID ranges of the origins and destinations in the chunk. If you have set a value for the Number of Destinations to Find for Each Origin parameter, you may find some output files using the naming scheme `ODLines_O_#_#.arrow` because results from all destinations have been combined into one file. This option is not available in versions of ArcGIS Pro prior to 2.9 and is not available if the network data source is a service.</SPAN></P></LI></UL></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Path to the output feature class that will contain the OD Cost Matrix Lines output computed by the tool. The schema of this feature class is described in the </SPAN><A href="https://pro.arcgis.com:443/en/pro-app/latest/arcpy/network-analyst/origindestinationcostmatrix-output-data-types.htm" target="ESRI_SECTION1_9FF9489173C741DD95472F21B5AD8374" STYLE="text-decoration:underline;"><SPAN>arcpy documentation</SPAN></A><SPAN>.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Path to a folder, which will be created by the tool, that will contain the CSV or Arrow files representing the OD Cost Matrix Lines results if the Output OD Cost Matrix Format parameter value is "CSV files" or "Apache Arrow files". The schema of the files is described in the </SPAN><A href="https://pro.arcgis.com:443/en/pro-app/latest/arcpy/network-analyst/origindestinationcostmatrix-output-data-types.htm" target="ESRI_SECTION1_9FF9489173C741DD95472F21B5AD8374" STYLE="text-decoration:underline;"><SPAN>arcpy documentation</SPAN></A><SPAN>.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Impedance cutoff limiting the search distance for each origin. For example, you could set up the problem to find only destinations within a 15 minute drive time of the origins. This parameter is optional. Leaving it blank uses no cutoff.</SPAN></P><UL><LI><P><SPAN> If your travel mode has time-based impedance units, Cutoff represents a time and is interpreted in the units specified in the Time Units parameter.</SPAN></P></LI><LI><P><SPAN> If your travel mode has distance-based impedance units, Cutoff represents a distance and is interpreted in the units specified in the Distance Units parameter.</SPAN></P></LI><LI><P><SPAN> If your travel mode has other units (not time- or distance-based), Cutoff should be specified in the units of your travel mode's impedance attribute.</SPAN></P></LI></UL></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The number of destinations to find for each origin. For example, setting this to 3 will result in the output including the travel time and distance from each origin to its three closest destinations. This parameter is optional. Leaving it blank results in finding the travel time and distance from each origin to all destinations.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The start time of day for the analysis. No value indicates a time neutral analysis.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Point, line, and polygon barriers to use in the OD Cost Matrix analysis.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>When you solve a network analysis, the input points must "locate" on the network used for the analysis. When chunking your inputs to solve in parallel, inputs may be used many times. Rather than calculating the network location fields for each input every time it is used, it is more efficient to calculate all the network location fields up front and re-use them. Set this parameter to True to pre-calculate the network location fields. This is recommended for every situation unless:</SPAN></P><UL><LI><P><SPAN> You are using a portal URL as the network data source. In this case, pre-calculating network locations is not possible, and the parameter is hidden.</SPAN></P></LI><LI><P><SPAN> You have already pre-calculated the network location fields using the network dataset and travel mode you are using for this analysis. In this case, you can save time by not precalculating them again.</SPAN></P></LI></UL></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Sample script tool to solve a large OD Cost Matrix problem by chunking up the data and solving the chunks in parallel.</SPAN></P></DIV></DIV></DIV>Solve Large OD Cost MatrixNetwork AnalystOD Cost MatrixlargeoriginsdestinationsArcToolbox Tool20230106 +20210326134543001.0TRUE2023052585647001500000005000ItemDescriptionc:\program files\arcgis\pro\Resources\Help\gp<DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>The feature class or layer containing the origins.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>The feature class or layer containing the destinations.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Network dataset, network dataset layer, or portal URL to use when calculating the OD Cost Matrix.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Network travel mode to use when calculating the OD Cost Matrix</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The time units the output Total_Time field will be reported in.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The distance units the output Total_Distance field will be reported in.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Defines the chunk size for parallel OD Cost Matrix calculations. For example, if you want to process a maximum of 1000 origins and 1000 destinations in a single chunk, set this parameter to 1000.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Defines the maximum number of parallel processes to run at once. Do not exceed the number of logical processors of your machine.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Path to the output feature class that will contain the updated origins, which may be spatially sorted and have added fields. The OriginOID field in the Output OD Lines Feature Class refers to the ObjectID of the Output Updated Origins and not the original input origins.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Path to the output feature class that will contain the updated destinations, which may be spatially sorted and have added fields. The DestinationOID field in the Output OD Lines Feature Class refers to the ObjectID of the Output Updated Destinations and not the original input destinations.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The desired output format for the OD Cost Matrix Lines. The available choices are:</SPAN></P><UL><LI><P><SPAN>"Feature class" - A single, combined feature class. This option is the slowest to create and will likely fail for extremely large problems.</SPAN></P></LI><LI><P><SPAN>"CSV files" - A set of .csv files. Each file represents the OD Cost Matrix Lines output, without shape geometry, for a chunk of origins and a chunk of destinations, using the naming scheme `ODLines_O_#_#_D_#_#.csv`, where the `#` signs represent the ObjectID ranges of the origins and destinations in the chunk. If you have set a value for the Number of Destinations to Find for Each Origin parameter, you may find some output files using the naming scheme `ODLines_O_#_#.csv` because results from all destinations have been combined into one file.</SPAN></P></LI><LI><P><SPAN>"Apache Arrow files" - A set of Apache Arrow files. Each file represents the OD Cost Matrix Lines output, without shape geometry, for a chunk of origins and a chunk of destinations, using the naming scheme `ODLines_O_#_#_D_#_#.arrow`, where the `#` signs represent the ObjectID ranges of the origins and destinations in the chunk. If you have set a value for the Number of Destinations to Find for Each Origin parameter, you may find some output files using the naming scheme `ODLines_O_#_#.arrow` because results from all destinations have been combined into one file. This option is not available in versions of ArcGIS Pro prior to 2.9 and is not available if the network data source is a service.</SPAN></P></LI></UL></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Path to the output feature class that will contain the OD Cost Matrix Lines output computed by the tool. The schema of this feature class is described in the </SPAN><A href="https://pro.arcgis.com:443/en/pro-app/latest/arcpy/network-analyst/origindestinationcostmatrix-output-data-types.htm" target="ESRI_SECTION1_9FF9489173C741DD95472F21B5AD8374" STYLE="text-decoration:underline;"><SPAN>arcpy documentation</SPAN></A><SPAN>.</SPAN></P></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Path to a folder, which will be created by the tool, that will contain the CSV or Arrow files representing the OD Cost Matrix Lines results if the Output OD Cost Matrix Format parameter value is "CSV files" or "Apache Arrow files". The schema of the files is described in the </SPAN><A href="https://pro.arcgis.com:443/en/pro-app/latest/arcpy/network-analyst/origindestinationcostmatrix-output-data-types.htm" target="ESRI_SECTION1_9FF9489173C741DD95472F21B5AD8374" STYLE="text-decoration:underline;"><SPAN>arcpy documentation</SPAN></A><SPAN>.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Impedance cutoff limiting the search distance for each origin. For example, you could set up the problem to find only destinations within a 15 minute drive time of the origins. This parameter is optional. Leaving it blank uses no cutoff.</SPAN></P><UL><LI><P><SPAN> If your travel mode has time-based impedance units, Cutoff represents a time and is interpreted in the units specified in the Time Units parameter.</SPAN></P></LI><LI><P><SPAN> If your travel mode has distance-based impedance units, Cutoff represents a distance and is interpreted in the units specified in the Distance Units parameter.</SPAN></P></LI><LI><P><SPAN> If your travel mode has other units (not time- or distance-based), Cutoff should be specified in the units of your travel mode's impedance attribute.</SPAN></P></LI></UL></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The number of destinations to find for each origin. For example, setting this to 3 will result in the output including the travel time and distance from each origin to its three closest destinations. This parameter is optional. Leaving it blank results in finding the travel time and distance from each origin to all destinations.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>The start time of day for the analysis. No value indicates a time neutral analysis.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Point, line, and polygon barriers to use in the OD Cost Matrix analysis.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>When you solve a network analysis, the input points must "locate" on the network used for the analysis. When chunking your inputs to solve in parallel, inputs may be used many times. Rather than calculating the network location fields for each input every time it is used, it is more efficient to calculate all the network location fields up front and re-use them. Set this parameter to True to pre-calculate the network location fields. This is recommended for every situation unless:</SPAN></P><UL><LI><P><SPAN> You are using a portal URL as the network data source. In this case, pre-calculating network locations is not possible, and the parameter is hidden.</SPAN></P></LI><LI><P><SPAN> You have already pre-calculated the network location fields using the network dataset and travel mode you are using for this analysis. In this case, you can save time by not precalculating them again.</SPAN></P></LI></UL></DIV></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><P><SPAN>Whether to spatially sort origins and destinations prior to commencing the parallel solve. Using sorted data will improve the efficiency of the chunking behavior significantly, and it may reduce the number of credits consumed if you're using a service that charges credits. If your input data is already sorted, then sorting is not useful, and you should set this parameter to false. Otherwise, you should set his parameter to true. Note, however, that spatial sorting is only available if you have the Advanced license. Spatial sorting will be skipped automatically if you don't have the necessary license, and the parameter will be hidden in the tool dialog.</SPAN></P></DIV></DIV><DIV STYLE="text-align:Left;"><DIV><DIV><P><SPAN>Sample script tool to solve a large OD Cost Matrix problem by chunking up the data and solving the chunks in parallel.</SPAN></P></DIV></DIV></DIV>Solve Large OD Cost MatrixNetwork AnalystOD Cost MatrixlargeoriginsdestinationsArcToolbox Tool20230525 diff --git a/README.md b/README.md index 02f5368..346a376 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ The *Solve Large OD Cost Matrix* tool can be used to solve a large [origin-desti - **Precalculate Network Locations** (Python: *Precalculate_Network_Locations*) - When you solve a network analysis, the input points must "locate" on the network used for the analysis. When chunking your inputs to solve in parallel, inputs may be used many times. Rather than calculating the network location fields for each input every time it is used, it is more efficient to calculate all the network location fields up front and re-use them. Set this parameter to True to pre-calculate the network location fields. This is recommended for every situation unless: - You are using a portal URL as the network data source. In this case, pre-calculating network locations is not possible, and the parameter is hidden. - You have already pre-calculated the network location fields using the network dataset and travel mode you are using for this analysis. In this case, you can save time by not precalculating them again. +- **Spatially Sort Inputs** (Python: *Sort_Inputs*) - A Boolean indicating whether to spatially sort origins and destinations prior to commencing the parallel solve. Using sorted data will improve the efficiency of the chunking behavior significantly, and it may reduce the number of credits consumed if you're using a service that charges credits. If your input data is already sorted, then sorting is not useful, and you should set this parameter to false. Otherwise, you should set his parameter to true. Note, however, that spatial sorting is only available if you have the Advanced license. Spatial sorting will be skipped automatically if you don't have the necessary license, and the parameter will be hidden in the tool dialog. ### Running the tool from ArcGIS Pro diff --git a/images/SolveLargeODCostMatrix_Dialog.png b/images/SolveLargeODCostMatrix_Dialog.png index 7e845b6..227fe85 100644 Binary files a/images/SolveLargeODCostMatrix_Dialog.png and b/images/SolveLargeODCostMatrix_Dialog.png differ