|
POST
|
There are so many resources on the Internet that can help you to learn Python, it is to much to mention. One way is to do a search in GeoNet: https://community.esri.com/search.jspa?q=learn+python or just Google it. You will find a large number of post with lots of like to different sites like: Dive Into Python Learn Python If you are willing to pay for a book, then this post references a very good book: Re: Any Good Python Books I have posted some Python Snippets that might help: Some Python Snippets
... View more
01-08-2015
03:47 PM
|
1
|
0
|
3513
|
|
POST
|
Indeed the region group tool is a method to obtain the result.+1 for that!
... View more
01-08-2015
01:19 PM
|
1
|
1
|
2417
|
|
POST
|
Options 1 and 2 do not account for the those areas that are flat but surrounded by inaccesible áreas...
... View more
01-08-2015
06:17 AM
|
0
|
1
|
2417
|
|
POST
|
I converted the PDF to raster, changed the raster, did some vectorization and made some edits (added some additional water points). The unpolished code I used I included below. It creates a list of OID's of the fence areas Loops through the list of OID´s creates a featurelayer with only the current fence area based on OID creates a featurelayer with only the water points in that area creates the multi ring buffer on those points clips the resulting buffers with the area import arcpy, os
fc_pnt = r"C:\Forum\Pasture\test.gdb\waterpoints"
fc_pol = r"C:\Forum\Pasture\test.gdb\FenceAreas"
ws = r"C:\Forum\Pasture\test.gdb"
arcpy.env.overwriteOutput = True
dists="25000;50000;75000;100000;125000;150000;175000;200000"
fld_oid = arcpy.Describe(fc_pol).OIDFieldName
lst_OIDs = [r[0] for r in arcpy.da.SearchCursor(fc_pol, "OID@")]
for oid in lst_OIDs:
where = "{0} = {1}".format(arcpy.AddFieldDelimiters(fc_pol, fld_oid),oid)
arcpy.MakeFeatureLayer_management(fc_pol, "flpol", where_clause=where)
arcpy.MakeFeatureLayer_management(fc_pnt, "flpnt")
arcpy.SelectLayerByLocation_management("flpnt", 'intersect', "flpol")
fc_buf = os.path.join(ws, "buf_{0}".format(oid))
arcpy.MultipleRingBuffer_analysis(Input_Features="flpnt",Distances=dists,
Output_Feature_class=fc_buf,Buffer_Unit="Default",
Field_Name="distance",Dissolve_Option="ALL",
Outside_Polygons_Only="FULL")
fc_bufclip = os.path.join(ws, "buf_{0}clip".format(oid))
arcpy.Clip_analysis(fc_buf,"flpol",fc_bufclip)
# ... also merge the buffer layers into a single featureclass
... View more
01-08-2015
06:13 AM
|
1
|
2
|
3534
|
|
POST
|
Yep, Cost Distance is the best way to get the desired result. Just attach a piece of your data and I'll show you how to get the result.
... View more
01-07-2015
06:39 PM
|
0
|
0
|
3234
|
|
POST
|
If the fields in the featureclasses are all named the same, I guess you don't have to use field mapping... You could simply merge the featureclasses together and then remove any redundant fields...
... View more
01-07-2015
06:33 PM
|
0
|
0
|
947
|
|
POST
|
I assume you have Corel Draw. If so you have several formats that can be used as intermediate format that Corel Draw can import. You may want to read this thread: vector - Export shp spatial data to Corel - Geographic Information Systems Stack Exchange I suppose converting to EMF, EPS, SVG or AI could also work.
... View more
01-07-2015
06:21 PM
|
3
|
1
|
1735
|
|
POST
|
If you're willing to share (part of) the data, I'm sure things will become clearer and that will allow us to come up with a solution. Please also provide info on the versión of ArcGIS and if you hace access to the Spatial Analyst extension.
... View more
01-07-2015
02:02 PM
|
0
|
0
|
3234
|
|
POST
|
If you have some sample data that follows the structure you want to use, I can see if I can come up with a script to process the 110 pastures.
... View more
01-07-2015
01:59 PM
|
0
|
5
|
3534
|
|
POST
|
weird... ... and what if you try this: def main():
import arcpy
import os
fc_in = r"C:\Forum\DistLinePol\test.gdb\Points" # this one exists
fld_count = "Count"
fc_out = r"C:\Forum\DistLinePol\test.gdb\Points_out" # this one will be created
sr = arcpy.Describe(fc_in).spatialReference
# create the empty output featureclass
path, name = os.path.split(fc_out)
arcpy.CreateFeatureclass_management(path, name, "POINT", fc_in, "SAME_AS_TEMPLATE", "SAME_AS_TEMPLATE", sr)
# insert the features into the output fc
with arcpy.da.SearchCursor(fc_in, '*') as curs_in:
flds_in = curs_in.fields
idx_cnt = flds_in.index(fld_count)
with arcpy.da.InsertCursor(fc_out, '*') as curs_out:
for row in curs_in:
cnt = row[idx_cnt]
for i in range(0, cnt):
curs_out.insertRow(row)
if __name__ == '__main__':
main()
... View more
01-07-2015
11:06 AM
|
2
|
20
|
5362
|
|
POST
|
When it creates the output featureclass it is taking the input featureclass as the spatial reference. The error indicates that the featureclass is not valid to extract the spatial reference from. What did you specify as input featureclass? Does it have a spatial reference (=coordinate system)?
... View more
01-07-2015
10:55 AM
|
0
|
22
|
5362
|
|
POST
|
Simply drag the window; locate the mouse on the blue title bar, drag the window until you see the anchor points appear and locate the window for instance to the center left anchor to make it appear as the left column of the window.
... View more
01-07-2015
10:17 AM
|
2
|
1
|
1216
|
|
POST
|
You will probably have to script this or créate a model: Loop through each fence polygon Select the water points inside the current polygon Do the multiring buffer Clip with the current fence polygon
... View more
01-07-2015
10:14 AM
|
0
|
7
|
3534
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-09-2020 09:26 AM | |
| 6 | 12-20-2019 08:41 AM | |
| 1 | 01-21-2020 07:21 AM | |
| 2 | 01-30-2020 12:46 PM | |
| 1 | 05-30-2019 08:24 AM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|