I'm drawing roads with different widths. The road data is constructed using GeoJson. (Each road is represented with a LineString.)

When I draw the roads with almost the same width, a trivial, direct drawing solution, i.e., each road is drawn as a polyline, it will look good:

enter image description here

However, if some roads have huge width, things become complicated. Direct drawing will result into some offset at the junction:

enter image description here

I think I can get the contour path of the road with huge width, and compute the intersect point of the wide road and the roads that it crosses with.

Then an irregular polygon is drawn to make it the cross smoother. But this is not elegant.

I'd like to explore a more elegant way to fix this despite the performance.

  • 3
    Welcome to GIS.SE. What drawing software are you using? Can you explain your possible solution ("I think I can...") more clearly? Maybe add a third graphic for illustration. Use the edit button. Also, how likely is it that a very wide road terminates at a narrow road?
    – Martin F
    Commented Jun 12, 2014 at 16:05
  • I didn't use a software. I write that with c# code, load the geojson data, and render it myself. I was doing some optimization work on road width, so sometimes a very wide road may occur.
    – GodoorSun
    Commented Jun 13, 2014 at 2:40

1 Answer 1


This is a long standing problem with fat and thin lines joining. I'm surprised that there's not a way to rectify this with advanced drawing options (from an ArcMap point of view, but other packages have the same problem).

When I was making cartographic maps with ArcPlot ready for printing I resolved this problem by extending the line by symbol width, buffering by half the symbol width and then cutting the buffer with the terminating feature and drawing that. In terms of how you achieve this in your software I can't comment but it's bound to be a few lines of code.

Round / bevel line ends can also appear more pleasing if that's an option in the software you're using, not a perfect solution but significantly easier.

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.