1

I'm trying to make a simplified triangulation of a US state (say Ohio) based on the counties. The way I accomplish this is to treat all boundaries, no matter how crooked, as straight lines whose vertices are all the points where three counties meet. How would I find the requisite coordinates from a shapefile for further processing?

RN I plan on getting the coordinates for use in Matlab for a personal algorithm that is based on Delaunay Triangulation, and I've attempted to use shapefiles describing said counties on Google Earth Engine and ArcGIS without much luck, unless I'm taking things in the wrong direction.

EDIT: The file is from http://ogrip-geohio.opendata.arcgis.com/datasets/7212b60cc5fc4949869995813628182c_12

and I am trying to use QGIS 2.18.14 to get the individual points. Is there an easy way to highlight and pinpoint all the places where at least 3 counties touch?

  • Please Edit the question to specify what GIS software you are using and what you have tried. – Vince Jun 14 at 16:29
  • @Vince got it, I'm planning on using these for Matlab – Sean Skyhawk Jun 14 at 16:39
0

I make a example for you:

I download, all polygons form ohio state in shapefile form: open in qgis like this:

enter image description here

I filter the information to select only 3 states:

  1. right click
  2. filter
  3. coy this: "COUSUBFP" = '43554' OR "COUSUBFP" = '01000' OR "COUSUBFP" = '70898'

enter image description here

  1. Know go to processing toolbox in the right and select centroids, to generate the points to make the delaunay triangulation

  2. when i obtein the points. i run the next script in the console and obtain the middle point between the three countries.

layer = iface.activeLayer()
features = layer.getFeatures()

x = 0
y = 0

for f in features:
    puntos = f.geometry().asPoint()
    x = x + puntos.x()
    y = y + puntos.y()

vlayer = QgsVectorLayer('Point?crs=epsg:4686&field=Punto:integer&index=yes', 'puntos' , 'memory')
points = []
points.append(QgsPointXY(x/3, y/3).asWkt())

prov = vlayer.dataProvider()

feats = [ QgsFeature() for i in range(len(points)) ]

for i, feat in enumerate(feats):
    feat.setAttributes([i]) 
    feat.setGeometry(QgsGeometry.fromWkt(points[i]))

prov.addFeatures(feats)
QgsProject.instance().addMapLayer(vlayer)

remember, select the layer. Centroids to run the script

enter image description here

I hope it is usefull for you.

  • what I have more in mind is figuring out the points where three counties coincide thank – Sean Skyhawk Jun 14 at 17:17
  • Sean Skyhawk, I edited the answer, tell me if solution is usefull for you – Jhon Galindo Jun 14 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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