|
POST
|
I guess the code I provided earlier represents a slightly simpler way to duplicate the points...
... View more
12-31-2014
11:13 PM
|
1
|
0
|
2931
|
|
POST
|
I don't think the script I posted can have this effect on your behavior of arcpy modules in ArcGIS 10.3. Are you sure nothing else happened at your system? Did you perhaps install ArcGIS Pro and python 3.4? There might be something wrong with the definition of your paths.
... View more
12-31-2014
11:08 PM
|
0
|
0
|
5062
|
|
POST
|
Do all the input rasters have the same dimension (width, height, resolution and location)? If not, you will have to account for these differences.
... View more
12-31-2014
10:57 PM
|
0
|
0
|
1100
|
|
POST
|
I would think that something like this would work, but I'm getting a 400 error: import urllib, urllib2, json
updateAttr = [{"attributes" : {"objectid": 12988724, "address" : "1217 2ND AVE some change"}}]
service_url = r"http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0"
params = urllib.urlencode({'f': 'json', 'features': updateAttr})
req = urllib2.Request("{0}/updateFeatures/?{1}".format(service_url, params))
response = urllib2.urlopen(req)
jsonResult = json.load(response)
print jsonResult {u'error': {u'message': u'Unable to complete operation.', u'code': 400, u'details': [u'Unable to update features']}} The ObjectID in your example does not seem to exist...
... View more
12-30-2014
08:04 PM
|
1
|
1
|
2072
|
|
POST
|
If you write the output to a file geodatabase the length field will be filled automatically.
... View more
12-30-2014
08:01 PM
|
0
|
0
|
987
|
|
POST
|
Dear Thomas Caruso , Although Joe Flannery may have answered your question and you are able to access your shapefile stored in the .gdb folder. this is not (and I repeat) *NOT* they way to solve your problem. As Vince Angelo indicates, you should NOT store shapefiles in the .gdb folder. It may corrupt the other data in the file geodatabase, Please, please, *PLEASE*, remove the files from the .gdb folder and store them elsewhere. For a list of file extensions you will want to move to another folder, see: Shapefile - Wikipedia, the free encyclopedia or this old documentation: ArcGIS Desktop Help 9.2 - Shapefile file extensions
... View more
12-30-2014
05:59 PM
|
2
|
0
|
4372
|
|
POST
|
You can either correct the raster B1 to only have value 0 (yellow) before conversion, or set a definition query on the resulting polygon featureclass using Gridcode = 0 (this will only show the yellow polygons). When using this layer in a intersection it will only use the yellow polygons and ignore the blue ones.
... View more
12-30-2014
05:03 PM
|
1
|
0
|
1019
|
|
POST
|
One of the errors is at saving the output mxd. Change it to: mxd.saveACopy(arcpy.GetParameterAsText(2)) Did you test with specifying the exact same parameters as hard coded in your first example script? I also noticed the error: AttributeError: 'unicode' object has no attribute '_arc_object' Are you using any non-ASCII characters in the MXD, paths, etc?
... View more
12-30-2014
04:57 PM
|
0
|
2
|
2242
|
|
POST
|
You could use some python to do 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
# 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", fc_in)
# 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() This code can be transformed in a tool that you can use in a model...
... View more
12-30-2014
03:49 PM
|
3
|
26
|
5341
|
|
POST
|
This page shows a C# sample of using the mask: ArcObjects Help for .NET developers
... View more
12-30-2014
03:20 PM
|
0
|
0
|
940
|
|
POST
|
I made some minor changes to the code: I put the program flow in the def main changed the code to create the list of pairs used str.format to create the output raster name (please note that if the inputs are .img, you can better strip the extension to get a valid output name) the numpy.sign is executed on the entire array, not for each cell individually I used the os.path.join to create the output path, name for the raster To assign an output projection, you will probably have to set the output coordinate system in the environments. The numpy to raster conversion seems to honor this setting (arcpy.env.outputCoordinateSystem): ArcGIS Help (10.2, 10.2.1, and 10.2.2)
... View more
12-30-2014
03:14 PM
|
0
|
2
|
1100
|
|
POST
|
Since you like python, you might want to give this one a try... http://yorik.uncreated.net/scripts/dxfconvert.py It is a Linux DWG to DXF converter and requires you to have wine installed and the veryDWG utility.
... View more
12-30-2014
03:08 PM
|
0
|
0
|
4391
|
|
POST
|
I have noticed that it log in automatically (using the same credentials and maps you had open the last time). In case the map is not owned by you or it has been shared differently in the mean time, it probably does not allow access to it. Signing out is a little strange. You didn't change the password for the account, right?
... View more
12-30-2014
02:49 PM
|
0
|
0
|
1570
|
|
POST
|
There are some blogs and post outside of GeoNet that threat this topic: Ned Batchelder: Extracting JPGs from PDFs Converting a PDF to a series of images with Python - Stack Overflow
... View more
12-30-2014
02:33 PM
|
0
|
0
|
3752
|
| 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
|