ArcGIS Desktop

  • Documentation
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Convert M-Value Units Of Measure

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Converts the measure (m) values of a dataset from one unit to another. The m-values of the input dataset are modified upon executing this tool.

Usage

  • This tool is used for the HPMS 2012 models.

    Note:

    Any uncalibrated routes in the network get an m-value of zero (0) after executing this tool; therefore, you should calibrate all the routes in the network prior to running this tool.

    For more information on calibrating a route, please see Calibrate a route.

Syntax

ConvertMValueUnitsOfMeasure_roads (in_network, in_source_unit_of_measure, in_target_unit_of_measure, in_precision)
ParameterExplanationData Type
in_network

The source network feature.

Feature Layer
in_source_unit_of_measure

The unit of measure of the source network layer.

Linear unit
in_target_unit_of_measure

The unit of measure the source network layer values will convert to.

Linear unit
in_precision

The number of decimals for the target units.

Long

Code sample

ConvertMValueUnitsOfMeasure(in-line)

The following script demonstrates how to use the Convert M value Units of Measure function in immediate mode.

# tool variables
in_network="network_lyr"
in_source_unit_of_measure="feet"
in_target_unit_of_measure="miles"
in_precision="3"

# set current workspace
arcpy.env.workspace="C:/Data/NY_Data.gdb/LRSN_MilePoint"

# execute the tool
arcpy.ConvertMValueUnitsOfMeasure_roads("network_lyr", "Feet", "Miles", "3")
ConvertMValueUnitsOfMeasure(stand-alone Python script)

The following python script demonstrates how to use Conver M value Units of Measure in a stand alone python script.

# Name: ConvertM-ValueUnitsOfMeasure.py
# Description: Converts the measure (m) values of a dataset from one unit to another. The m-values of the input dataset are modified upon executing this tool.
# Requires: Esri Roads and Highways Solution

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("Highways")

# Local variables:
network = r"C:/Data/NY_Data.gdb/LRSN_MilePoint"

# Make a feature layer for network
arcpy.MakeFeatureLayer_management(network, "network_lyr")

# Process: Convert M-value Units Of Measure
arcpy.ConvertMValueUnitsOfMeasure_roads("network_lyr", "Feet", "Miles", "3")

Environments

This tool does not use any geoprocessing environments

Licensing information

  • ArcGIS Desktop Basic: Requires Roads and Highways
  • ArcGIS Desktop Standard: Requires Roads and Highways
  • ArcGIS Desktop Advanced: Requires Roads and Highways

Related topics

  • An overview of the Roads and Highways toolbox

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2017 Esri. | Privacy | Legal