Dear Gurus!
There is a layer of roads. Each road consists of several segments. How to set kilometers icons on the road ? If I understand correctly, I need to create a special feature layer by using something like divide command in arcgis Desktop 10.1 or programmatically? Some reference please.
Solved! Go to Solution.
I am not completely certain what you want these kilometer icons to look like or how you want them placed along your road, but what comes to mind is using either linear referencing hatching to show measure positions or creating points along the road and using text symbols containing a number read from a field and a shield or marker symbol background. If you are mostly just interested in the position numbers, the first option is the most flexible, but if you are wanting these to look like actual signs posted along your roads, the second option is better.
So before I describe how to do each method, let me know which direction you are most interested in seeing.
I am not completely certain what you want these kilometer icons to look like or how you want them placed along your road, but what comes to mind is using either linear referencing hatching to show measure positions or creating points along the road and using text symbols containing a number read from a field and a shield or marker symbol background. If you are mostly just interested in the position numbers, the first option is the most flexible, but if you are wanting these to look like actual signs posted along your roads, the second option is better.
So before I describe how to do each method, let me know which direction you are most interested in seeing.
Something like that
Hatching would not put the little flag symbol on the map, by it can certainly but the numbers at the correct positions and a hatch mark along the road the number belongs to.
So, the first step is to convert your roads to linear referenced routes using the Create Route tool. You should access the environment settings in the Geoprocessing menu and explicitly set the M Tolerance, M Resolution and M Domain settings prior to running this tool to ensure you get measures with the degree or precision you want and the range of values that you want.
The next thing you need to identify is what you want to use as your RouteID value for the Create Route tool. This could be the road name or a route number or some other value that groups the segments that connect together.
The other important thing is to get your existing lines to build routes that orient the route measures correctly to fit your kilometer posts. If your current lines have fields for the beginning kilometer and ending kilometer position of each line you can use those to create the routes so that the measures increase in the direction of your stationing. This is the best option for making sure each road's measures match the orientation you expect. If you do not have such fields, you can use the Lower Left Coordinate Priority option to get most roads to build with the typical stationing that orients measues from west to east or from south to north. However, roads that are oriented northwest to southeast will likely have problems and have to be redone using either Upper Left priority (typically for such road that you want treated as west to east) or Lower Right priority (typically for such roads that you want treated as south to north) to get them to orient correctly and then appended those routes to the other routes that stationed correctly with the Lower Left priority.
Once the routes are generated you will see a new tab in the layer properties for that feature class that is called Hatching. From this tab you can create one or more hatching layouts that can be displayed along your routes. You can control many different aspects of the hatches, such as the tick mark intervals and offsets along the route using major and minor tick marks (like a ruler) and separately control which of these tick marks will display text numbers. By using SQL expressions with your hatching definitions you can change which routes show hatching and which don't and control multiple hatching styles within one route layer, like you can with label classes.
If you want points on your routes you can build an event table with measure positions at your kilometer positions to create a point Route Event Layer. I normally select all rows in the Route table view and then use the copy rows functions from the context menu and then paste that into Excel. I add a column called measure and populate it with 0. There are ways to then select this set of records and drag them in excel to make them increment the numbers, but I don't have Excel installed on my system to test it. Anyway, once all routeIDs have the largest set of kilometer interval numbers you could need to display you can create points along the routes with those numbers using the Make Route Event Layer tool. You can control the label positions with label settings to display your kilometer numbers or add another column to your event table with a distance number for offsetting the points to the side of the road so that you can use the actual point positions with labels on the center of the point to better control the label positions..
Thank you very much! I will try
Could You tell me what I'm doing wrong?
It is necessary to make road markers at intervals of 100 m and to display text is enough only at kilometers icons, and the text must contain the number of kilometers, not thousands of meters. I do not get so. I did next steps.
1. Accept default values for M-resolution (0.0001) and M-tolerance(0.001)
2. Use Pulkovo_1942_GK_Zone_6 where unit of measure - meter
2. Start Create routes tool with next parameters :
Measure source - Length
Measure factor - 1
3. When routes created I add to fields -
- beginning_kilometer - for the first icon on the some road
- ending_kilometer.
But I don't understand how to use them.
4. Then in the properties of the layer I set next hatch parameters.
- hatch interval - 1000
on hatch placement - start hatching at a value - beginning kilometer
check hatches features in this layer
5. In hatch definition
place this hatches every 1 hatch interval
check - label these hatches
I am interesting:
1. Marker is display 1000 , 2000 and so on, But I want - 1, 2 ,3 ... How I can do it?
2. Numbering starts from 0. How must I use beginning and ending kilometers?
Sorry for the question - I am new in using of arcgis desktop.
To set this up you will want to make the hatch interval 100, not 1000.
The first definition will be at every 1 hatch interval with a shorter line length and without labeling.
Add a new Hatch Definition and make it have an interval of 10 with a longer line length and the "Label these hatches" option checked. Press the Label Settings button and check "Build a text expression:", then press the Expression button. For the expression enter: cstr(round(cdbl(esri__measure)/1000, 1))
Add an End Hatch Definition and make it have a line length similar to the second definition and label it using the Build a text expression: option with the same label expression.
Are you saying that you do not want a label of 0?
Edit: I changed the label expression to make the rounding occur after the division by 1000.
Note: You can add multiple Hatch Classes and apply different settings for different scale ranges so that as you zoom in and out you can adjust things like the minimum length a route must be to show hatching at a particular scale using an SQL expression at the Hatch Class level and the size of the hatch marks, which should become longer when you zoom out.
And one more question.
Richard Fairhurst написал(а):
The other important thing is to get your existing lines to build routes that orient the route measures correctly to fit your kilometer posts. If your current lines have fields for the beginning kilometer and ending kilometer position of each line you can use those to create the routes so that the measures increase in the direction of your stationing.
In routes layer I have added to field -
But how I can use it? Should I set in this field the real last kilometer of the route, because enough only to indicate direction. And the actual length of the route is listed in a separate field. And I have not noticed yet how to implement the numbering with a specific value of first kilometer (with using init_km)?
P.S. Can I publish map service with route hatch symbology?
The label expression can be anything you like and does not have to be a measure number. It is a label, like any other label. So if you want a string to appear simply enclose the string you want in quotes, or use any field as the value.
Unfortunately, hatching is not supported for a map service. You could vote for the idea to add support for route hatching in map service here. This may mean that you have to create points events at the equivalent positions. If you paste a sample of what your hatching looks like then I can tell you how to place points at those locations with the same labels. The hatch marks may be more of a trick, but you could use something more like the flag marker in your original picture.