Vertex Density Visualizer
Identify geometries with excessive vertex counts
What Is a Vertex Density Visualizer?
A vertex density visualizer identifies geometries in a vector layer with excessive vertex counts β the features that are bulking up your file size, slowing down your rendering, or suggesting that something went wrong in digitizing. It reports per-feature vertex counts, calculates density (vertices per kilometer of boundary), and flags outliers so you can simplify or fix the offenders without touching the rest of the layer.
Excessive vertex counts are a common problem in real-world GIS data. A hand-traced polygon from a satellite image can end up with tens of thousands of vertices when a few hundred would describe the same shape. GPS tracks recorded at 1 Hz for a multi-hour hike contain hundreds of thousands of points, most of them redundant. Machine-generated footprints from photogrammetry or computer vision can have one vertex per pixel. Files with these features are slow to load, slow to render, and slow to analyze β but simplifying the entire layer uniformly is overkill when only 5% of features are problematic.
The Vertex Density Visualizer lets you see which features those are. It color-codes the map by vertex count or density, lists the top offenders in a sortable table, and provides a direct link to simplify just those features with the Simplify Preserving Topology or GeoJSON Simplifier tools. Everything runs in the browser, so large layers can be profiled without uploading anywhere.
How Vertex Density Analysis Works
Counting Vertices
For each feature, the tool walks the geometry and counts vertices. Points count as 1. LineStrings count as their coordinate array length. Polygons sum the vertices across outer and inner rings. MultiGeometries sum across all parts.
Computing Density
Density is vertices per unit of boundary length for lines and polygons, or per unit of area for polygons. Density is a better indicator than raw count because a large polygon with many vertices may still be well-specified, while a small polygon with many vertices is suspicious.
Outlier Detection
Statistical outliers (features more than 2 or 3 standard deviations above the mean) are flagged as candidates for simplification. Other heuristics include "vertex per pixel at display scale" and "vertex per meter of length."
Visualization
The tool color-codes features on a map using a sequential color ramp β green for low density, yellow for moderate, red for high. A histogram shows the distribution of counts across the layer.
Key Parameters and Options
Metric
Raw vertex count, vertices per km of boundary, vertices per kmΒ² of area, or "vertices per pixel at current zoom."
Color Ramp
Choose between continuous gradients (green β red) or categorical buckets.
Outlier Threshold
Flag features above a configurable percentile (90th, 95th, 99th) or above N standard deviations.
Sort Order
The feature list can be sorted by count, density, or name.
Practical Applications
File Size Optimization
Identifying the features responsible for most of a file's size lets you simplify just those and leave the rest untouched.
Rendering Performance
Slow-rendering web maps often have a handful of over-vertexed features. Fixing those can dramatically improve load times.
Digitizing QA
A feature with 10,000 vertices where 100 are expected is a signal of a digitizing error or an accidental duplicate-click. Vertex density catches these.
Data Quality Review
Before publishing to a public catalog, a vertex density pass is a good sanity check.
Machine-Learning Output Cleanup
Buildings and roads extracted by ML often have one vertex per pixel. Density analysis identifies which features need simplification and at what tolerance.
Legacy Data Assessment
Old datasets often have irregular vertex distributions from historical digitizing habits. Density analysis quantifies the heterogeneity.
GPS Track Cleanup
Raw GPS tracks recorded at high frequency have dense point clusters. Density analysis identifies where to thin.
Step-by-Step Workflow in gis.tools
- Open the Vertex Density Visualizer.
- Drop a GeoJSON, Shapefile, or KML file.
- The tool computes vertex counts and density for every feature.
- The map colors features by density; the side panel shows the top offenders.
- Click a feature in the list to zoom to it on the map.
- Inspect the histogram to understand the distribution.
- Click "Simplify selected" to pass the flagged features to Simplify Preserving Topology or GeoJSON Simplifier.
- Export the profiled layer (with a new
vertex_countattribute) for documentation.
Worked Example
A web developer is building a choropleth of US ZIP code areas and notices that the map takes 12 seconds to render. She drops the ZCTA shapefile into the Vertex Density Visualizer and finds that 94 of the 33,000 ZIP codes have more than 5,000 vertices each β most of them coastal areas where the original digitizing traced every wave on the shoreline. The worst offender has 18,000 vertices. She clicks "simplify top 1%" and passes those features to the Simplify tool with a tolerance of 50 m. The resulting file loads in under 2 seconds with no visible quality loss on the choropleth map. The 99% of the layer that was already well-specified stays untouched.
Common Pitfalls and Gotchas
- Density is not always bad: A detailed shoreline might legitimately need many vertices at a given scale.
- Count alone isn't enough: A 10,000-vertex polygon may be fine if it's a country outline; the same count on a neighborhood polygon is excessive.
- Scale-dependent thresholds: "Too many vertices" depends on the display scale. Use the zoom-aware metric.
- Uneven distribution within a feature: A feature may have dense clusters of vertices in one area and sparse elsewhere; the average doesn't tell the whole story.
- Attribute pollution: Adding a
vertex_countattribute can confuse downstream tools that expect a specific schema. - Not a simplification tool: The visualizer identifies problems but doesn't fix them. Pair with a simplifier.
- Mixed geometry types: Comparing points to polygons via vertex count is meaningless.
- CRS matters: Density per kilometer requires a metric CRS; WGS84 degrees produce misleading density values.
Tips for Best Results
- Use the "vertices per km of boundary" metric for fair comparison across differently-sized features.
- Set the outlier threshold at the 95th or 99th percentile to find the true outliers.
- Reproject to a metric CRS for meaningful density values.
- Combine visualization with histogram analysis to understand the distribution.
- Keep the original file; only simplify the flagged features.
- Re-run the visualizer after simplification to verify improvement.
- Pair with Column Statistics for attribute-based quality checks.
Comparison with Other GIS Approaches
QGIS has field calculator expressions like num_points($geometry) and a "Count points in polygon" tool. ArcGIS Pro has a similar Calculate Geometry Attributes tool. Turf.js turf.coordCount gives per-feature vertex counts. Our visualizer puts it all together with a map view and outlier detection β a level of integration that standalone functions don't offer.
Performance Considerations
Vertex counting is O(n) and extremely fast. Layers with millions of vertices can be profiled in seconds. The map rendering is the limiting factor.
Data Privacy and Browser-Based Processing
All analysis is client-side. Confidential layers never leave your browser.
Related GIS Concepts
- Simplification: the operation of reducing vertex count (see Douglas-Peucker, Visvalingam-Whyatt).
- Coordinate precision: the number of decimal places per coordinate β another axis of file size.
- Level of Detail: storing multiple versions at different simplification levels.
- Sliver polygons: often accompany excessive vertex counts in post-overlay data.
- GPS noise: one source of vertex density in tracks.
Frequently Asked Questions
How many vertices are too many?
It depends on the feature size and display scale. A country polygon may have 10,000 vertices legitimately; a neighborhood polygon rarely needs more than a few hundred.
What should I do with flagged features?
Pass them to the Simplify Preserving Topology or GeoJSON Simplifier tool to reduce vertex count.
Does it modify my data?
No β the visualizer is read-only. It adds optional attributes but doesn't change geometry.
Can I export the vertex counts?
Yes β the tool can emit a new GeoJSON with a vertex_count attribute for each feature.
How is density calculated?
Vertices per unit length for lines and polygons, or vertices per unit area for polygons. Use a metric CRS for meaningful values.
Related Tools on gis.tools
Related Tools
View All ToolsGeometry Repair
Fix self-intersections and other geometry errors
Vector EditingMerge Features
Combine multiple features into one
Vector EditingUndo/Redo Edit Stack
Full undo/redo history for all edits
Vector EditingSimplify Preserving Topology
Reduce vertices while maintaining shared boundaries
Vector EditingCut Polygon by Line
Split a polygon using a cutting line
Vector EditingFeature Editor
Move, rotate, and reshape features in the browser
Vector Editing100% client-side processing - your data stays private and never leaves your device