GIS Tools

Language

Made withfor the GIS community

Line Intersection Finder

Find all intersection points in line layers

Geoprocessing

Drop files here or click to browse

Supported formats: GeoJSON

GeoJSON
Examples:
Lines
Feature Intersections
Self-Intersections

Use Cases

  • Find road intersections for network analysis
  • Detect boundary conflicts between parcels
  • Identify self-intersecting (invalid) geometries
  • Find crossing utility lines or pipelines

What Is a Line Intersection in GIS?

A line intersection is the point (or set of points) where two or more line features cross each other. In GIS analysis, finding all intersection points in a line layer is a fundamental operation for building network topology, detecting crossings, validating data quality, and producing point datasets from line overlap patterns. Every intersection represents a place where features cross β€” a road junction, a pipeline tee, a river confluence, or a boundary meeting.

The Line Intersection Finder on gis.tools identifies every intersection point in one or two line layers, directly in your browser. Drop in a single line layer to find self-intersections and internal crossings, or provide two layers to find all the places where they meet. The output is a point layer where each point carries attributes from the intersecting lines, ready for further analysis or export.

Line intersection detection is a low-level building block for higher-level operations. Network topology cleanup, junction node generation, traffic accident hotspot studies, and crossing impact analysis all depend on reliable intersection detection.

How Line Intersection Detection Works

The naive approach of comparing every line segment to every other is O(nΒ²) and unacceptable for real data. Modern implementations use one of two approaches:

  1. Bentley-Ottmann sweep line: a classical algorithm that sweeps a horizontal line across the plane, maintaining the set of segments crossed and detecting intersections in O((n + k) log n) where k is the number of intersections found.
  2. Spatial index pruning: use an R-tree or STR-tree on segment bounding boxes, then compute exact intersection only for pairs whose bounding boxes overlap.

The gis.tools tool uses the second approach with Turf.js turf.lineIntersect semantics. Output points are computed by solving the parametric line equations for each candidate pair.

Geometry Types

Line-on-line intersections produce point features. Degenerate cases include:

  • Collinear overlapping segments: produce line overlap rather than a point intersection
  • Endpoint-only contacts (lines that share just one endpoint) may or may not be reported depending on the implementation
  • Self-intersections within a single feature (a line that crosses itself) can be detected in single-layer mode

Key Parameters and Options

Single Layer or Two Layer Mode

Single layer mode finds intersections between features within one layer. Two-layer mode finds intersections between features in two separate layers.

Include Endpoint Touches

Toggle whether shared endpoints count as intersections.

Preserve Attributes

Each intersection point can carry attributes from one or both source lines. By default, both sets of parent attributes are included.

Output Unique Points Only

Collapse coincident intersections at identical coordinates into single output features.

Practical Applications

Road Network Topology

Generate junction points for every road intersection in a centerline layer. These points become nodes in a routable network graph.

Accident Hotspot Analysis

Finding all road intersections is the first step in junction-based crash rate studies: the intersection points become the unit of analysis, and crashes are joined to the nearest intersection.

Utility Network Validation

Pipelines, water mains, and electrical conductors should only meet at explicit junction structures. Detecting intersections that don't have a corresponding tee or junction feature flags data errors.

River Network Structure

River confluences (places where tributaries meet the main stem) are all intersection points in a hydrography line layer.

Boundary Audits

Administrative boundaries should not cross each other; intersection detection flags topology errors in parcel or municipal data.

Transportation Planning

Identify every railroad-road grade crossing by intersecting rail and road centerline layers. The result feeds safety analysis and crossing inventory.

Cable and Conduit Conflicts

Underground utility mapping uses intersection detection to find conflicts between different utility networks sharing the same right-of-way.

Geometry Quality Control

Detect undesirable self-intersections in digitized line data β€” a common sign of data entry errors.

Step-by-Step Workflow in gis.tools

  1. Open the Line Intersection Finder
  2. Drag in one or two line layers
  3. Choose single-layer or two-layer mode
  4. Toggle endpoint touches and unique-points options
  5. Click "Find Intersections"
  6. Inspect the resulting point layer on the map
  7. Each point carries attributes from the intersecting lines
  8. Export as GeoJSON, KML, Shapefile, or CSV

Worked Example

A transportation safety analyst needs a point layer of every road-railroad crossing in a county. She loads the road centerline layer and the railroad centerline layer into the Line Intersection Finder in two-layer mode. The tool finds 143 intersection points. Each carries the road name and the railroad operator in separate attribute columns. She exports the result as a shapefile and uses the Spatial Join tool to attach crash counts from an incident point layer within a 100-meter buffer of each crossing.

Common Pitfalls and Gotchas

  • Tolerance and precision: floating-point rounding can cause "almost intersecting" lines to be missed. Snap endpoints first with Topology Helpers.
  • Collinear overlaps produce line outputs, not point outputs. Standard intersection detection reports only true crossings.
  • CRS mismatch between two input layers produces wrong results. Verify with CRS Metadata Inspector.
  • Endpoint-only touches are sometimes excluded by default; adjust the option if you need them.
  • Duplicate points at multi-line crossings (three or more lines meeting at one point) can appear as multiple near-identical points.
  • Performance degrades with very dense line data; use a spatially indexed approach for millions of segments.
  • MultiLineString handling: intersections within a multipart feature are sometimes missed.

Tips for Best Results

  • Clean topology with Topology Helpers before finding intersections
  • Reproject both layers to the same CRS first
  • Use the unique-points option to collapse duplicates
  • Filter by minimum distance or distance threshold if you need to dedupe near-duplicates
  • Pair with Snap Points to Line if intersection points need to align to specific network layers

Comparison with Other GIS Approaches

PostGIS uses ST_Intersection and ST_Intersects with line inputs. QGIS has Line Intersections under Vector > Analysis Tools. ArcGIS Pro has Intersect with line output. Turf.js has turf.lineIntersect. The browser-based gis.tools Line Intersection Finder follows the Turf.js semantics and runs entirely client-side.

Performance Considerations

With a spatial index, line intersection detection scales to hundreds of thousands of segments. Output point count can be much larger than input segment count for dense networks.

Data Privacy and Browser-Based Processing

Utility network, pipeline, and infrastructure line data is often confidential. Processing runs entirely in your browser.

Related GIS Concepts

Bentley-Ottmann algorithm is the classical sweep-line algorithm for finding all line segment intersections. Topology describes how features connect; intersection detection is a building block for topology. Planar graph is the mathematical structure formed by a line layer with all its intersections resolved. Node in network analysis is a point where edges meet, produced by intersection detection.

Frequently Asked Questions

Can I find intersections within a single layer?

Yes β€” single-layer mode finds every internal crossing.

What about lines that touch but don't cross?

Endpoint-only touches can be included or excluded via a toggle.

Does the tool handle MultiLineString?

Yes β€” all parts are considered when detecting intersections.

How do I get one point per intersection instead of many near-duplicates?

Enable the unique-points option, which collapses coincident outputs.

Related Tools on gis.tools

100% client-side processing - your data stays private and never leaves your device