Tag Info

New answers tagged


I wrote this for python and return a qgisPoint: def nearestPoint(A, B, p): A0 = A[0] A1 = A[1] B0 = B[0] B1 = B[1] p0 = p[0] p1 = p[1] AB0 = B0-A0 AB1 = B1-A1 AB_squared = (AB0*AB0+AB1*AB1)+0.0 if (AB_squared == 0): return A else: Ap0 = p0-A0 Ap1 = p1-A1 t = ...


I believe you would have to create a new column and input the command to calculate what you are wanting. You could try the following: case when "DNAME_2006" IN ('MASINDI') THEN ("Area_1" / "AREA") * "Population" END UPDATE: Unfortunately, I don't think you can do a simple SUM using the Field Calculator. However, there are a couple of other methods you ...


To do this I would use the Intersect (Analysis) tool. The ArcPy code will be: import arcpy homesFC = <your path to input Homes> districtsFC = <your path to input Districts> homesWithDistrictFC = <your path to output> arcpy.Intersect_analysis ([homesFC, districtsFC], homesWithDistrictFC)

Top 50 recent answers are included