Editing item geometry
Put an item on the map
When creating or editing an item, you can define its geometry (if allowed by the item's design).
Entering coordinates is no fun 💤, so the Geometry Editor lets you draw points, lines and polygons on the map to represent an item's location and shape.
For guidance on the different types of geometry and how to draw them from scratch, see Geometry types.
Edit an item's geometry
To edit the geometry of an item:
-
Select the item to view its details.
-
Use the tab bar to switch to the Geometry tab.
-
Select Edit in the action bar.
-
Select the Item location box to open the Geometry Editor.
In Alloy, all geometry is saved using the WGS84 Lat/Lng (EPSG:4326) coordinate system.
If the active basemap uses another coordinate system, item geometry is transformed on the fly (by Alloy or the map server) to keep things in proportion. Occasionally, this can result in the geometry appearing slightly misaligned with the basemap.
Therefore, we recommend switching to the most relevant basemap before editing item geometry, so you can draw directly over the basemap's features if necessary.
Using the Geometry Editor
1 Map
This shows the same basemap as the main map and initially shows the same area. Drag the map to pan around it. No other items are shown by default (unless you select Menu and choose Show layers).
Any current geometry is displayed in the centre of the map. The distance between its points are displayed along its edges.
2 Map tools
Use these to zoom in and out of the map (or use the scroll wheel on your mouse). The Measure tool shows the total area and length of all the lines and polygons you draw. To learn more, see Map tools.
3 Draw tools
Use these to draw different types of geometry on the map:
-
Point - select a single location.
-
Line - select multiple points to draw a connecting line through them all.
-
Polygon - select multiple points to draw a closed shape.
-
Box - select two points to draw a box shape between them.
-
Erase - while enabled, select any point on the map to remove it.
To finish drawing, select the last point twice. For more detailed guidance, see Geometry types.
The availability of these tools depends on the allowed geometry of the item's design.
4 Menu actions
For more actions, select Menu (bottom-right):
-
Clear all - remove all geometry points.
-
GeoJson view - edit the current geometry's underlying GeoJSON code. This lets you tweak the coordinates or paste in code from elsewhere. The editor will highlight any errors in the modified code.
-
Show/hide GeoJSON - show the current geometry's GeoJSON code in a panel on the right.
-
Show/hide layers - show the items of any layers that are currently enabled on the main map.
-
Snap layers - choose a visible layer to act as the snap layer. Whenever your pointer approaches snap layer geometry, it'll jump to align itself with the nearest point or line. This makes it easy to plot geometry alongside another item's geometry!
For example, a building connected to another building, or a road branching off from another.
5 GeoJSON panel
If enabled, this panel displays the coordinates of the current geometry in GeoJSON format. This makes it easy to copy the code if you want to use it elsewhere. To edit the code, select Menu and choose GeoJson view.
6 Done button
When you're finished, select Done to save your changes. To leave without saving, select in the top-right corner.
Edit the points of a line or polygon
To move a point within an existing line or shape, simply drag it to a new position. Your cursor will "snap" to a nearby point when it gets close!
Remove points
To start removing points, select the Erase tool. All geometry points will now display a button.
Select any point to remove it. When you're done, select Erase again to finish.
Add points
To add a point to an existing line or polygon, select and hold anywhere along one of its edges, and then drag the new point to the desired position.