I have a geolocated greyscale geojpeg image showing a network of geological fractures in the ground. They show up as bright lineations and create a reticulate pattern (think giraffe pattern). I've converted the image into a binary where the raster values of the fractures are 0 (black) and the remaining pixels not associated with the fracture pattern are white. The fractures are between 1 and 5 pixels wide. There are also some noisy pixels not associated with the fractures.

How do I convert this binary image into a vector file? I want to end up with a polyline shapefile of the fracture network so I can quantify some metrics, like the angle the fractures make to each other, etc. This would replace having to digitize the pattern by hand.

I've tried the raster to polyline and polygon tool but it creates vectors around each individual raster pixel, which is not what I want. I have the Spatial Analyst and 3D Analyst extensions.

Any tips on tools or workflow?

Update: screenshots attached screenshot of the fractures

more fractures

  • 1
    Screenshot would help.
    – FelixIP
    Apr 3, 2020 at 19:11
  • 1
    Raster to polygon, delete polygons below a certain area (to remove "noise") then something like gis.stackexchange.com/questions/29863/…. What have you tried and what was the result?
    – BERA
    Apr 5, 2020 at 12:48

2 Answers 2


Hopefully I understood you right- perhaps you should try to use raster calculator to pick only the relevant pixels, and once you have that, do Raster To Polygon. This way you'd end up with continuous areas.


Extract black part from raster, convert to points and run kernel density on them:

KernelDensity_sa("POINTS", "NONE", "C:/SCRATCH/COUNT", "1", "10")

enter image description here

Note - you might play with search radius to get result that in your opinion shows future lines best. Select high density areas:

RasterCalculator_sa('Con("COUNT" >= 500000,1)', "C:/SCRATCH/ONe")

Convert it to polygons and delete ones with area below some threshold. If you see that expected lines will form multiple polygons, follow above comments to compute their medial axis.


Use EliminatePolygonPart to remove holes inside polygons. Simplify polygons, extract their vertices, delete spatially identical. Use technique from this post to eliminate points with polygon internal angle > 90 deg.:

enter image description here

Will use cost distance to force travel inside polygons between characteristic points shown above. Convert polygons to raster and expand by 1 cell. Region group them and compute zonal statistics (MAXIMUM) for kernel density raster. Compute cost raster as follows:

Exp(5-5*"COUNT" / "SMAX")

Compute backlink raster:


Switch selection in RELEVANT points and compute cost paths from them:


Picture below shows original raster, relevant (characteristic points) and cost paths converted to polylines:

enter image description here

  • Thank you for this detailed solution. The polylines are what I would like to end up with. I follow up until "Region group them and compute zonal statistics (MAXIMUM) for kernel density raster. Compute cost raster as follows" After this, I am at a loss on what to do. Is computing the cost raster done with the raster calculator, and on what raster? And what values are "count" and "smax" referring to? Exp(5-5*"COUNT" / "SMAX")
    – meguh78
    Apr 8, 2020 at 4:40
  • Count is output of kernel. Smax output of zonal statistics.
    – FelixIP
    Apr 8, 2020 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.