This post explains an approach to generating fantasy maps that is really interesting. One part of generating a non-grid based map, is to use create Voronoi polygons around some random number of x,y points on the map. There’s a lot of heavy math involved, but there are libraries for calculating them with Python and even PHP.