|
POST
|
Hi Tom, Does the initial data format have to be a shapefile, or can it be in a File Geodatabase? If it can reside in a FGD, I would recommend setting up replication between the File Geodatabase and the SDE geodatabase. You can then synchronize the changes from the FGD to SDE, and then to the field crew.
... View more
03-06-2012
10:07 AM
|
0
|
0
|
496
|
|
POST
|
Hi Heather, You can accomplish this using the Field Calculator and the 'split' method. Example: !FullAddr!.split(" ", 1)[0] Where 'FullAddr' represents the field name containing the address. The above will return the house number. To return the street name you would specify: !FullAddr!.split(" ", 1)[1] Be sure 'Python' is checked at the top of the Field Calculator. [ATTACH=CONFIG]12255[/ATTACH]
... View more
02-27-2012
10:00 AM
|
0
|
0
|
810
|
|
POST
|
Hi Rich, I ran the same code that you posted. The only difference that I can see is that my raster is on my local disk. Try copying the IMG to your local C:\ drive and see if you can reproduce the same issue.
... View more
02-27-2012
07:10 AM
|
0
|
0
|
1613
|
|
POST
|
The wizard shouldn't have prompted you to create a service, but it won't matter if you created one. What errors are recorded in your sdedc_SQL Server.log file? This is typically found at C:\Program Files\ArcGIS\ArcSDE\sqlexe\etc.
... View more
02-27-2012
01:33 AM
|
0
|
0
|
3201
|
|
POST
|
This could be something specific with the raster you are using. I tested with a .IMG using ArcGIS 10 SP3 and everything worked as it should. I've attached the .IMG file. See if you are able to reproduce the same issue with the attached IMG.
... View more
02-27-2012
01:29 AM
|
0
|
0
|
1613
|
|
POST
|
Hi Rich, It looks like you are specifying the incorrect field name. You created the new field called 'Class', but you are trying to update a field called 'Class_Name'. Change all 'row.Class_Name' objects to 'row.Class' and your code should work.
... View more
02-24-2012
11:09 AM
|
0
|
0
|
1613
|
|
POST
|
Yes, choose 'Custom' on the first dialog and then specify only the option to Authorize ArcSDE: [ATTACH=CONFIG]12208[/ATTACH] Follow the rest of the wizard to complete the authorization.
... View more
02-24-2012
06:32 AM
|
0
|
0
|
3201
|
|
POST
|
Hi Asim, It looks like this is a bug. The Select tool does not honor 'Z Values' environment variable even though the help states that it does. As a workaround, I would recommend using the 'Feature Class to Feature Class' tool. You can apply a SQL Query when exporting the DWG file, and setting the 'Z Values' to 'Disabled' in the environment settings will be honored.
... View more
02-23-2012
06:42 AM
|
0
|
0
|
1017
|
|
POST
|
Hi Farhad, Did you change the compatibility level from SQL Server 2005 (90) to SQL Server 2008 (100)? You can do this by right-clicking on the database in SQL Server Management Studio > Properties > Options. Also, the database appears to be authorized for ArcGIS Server 9.3. Be sure to re-authorize this for ArcGIS Server 10.
... View more
02-23-2012
03:21 AM
|
0
|
0
|
3201
|
|
POST
|
Hi Kevin, Multiversioned views access the SDE.Default version by default. In order to query edits from other versions you will need to execute the ArcSDE version_util.set_current_version stored procedure. Here is more information on how to do this. You can also perform a reconcile/post to the SDE.Default version and then the edits from the child version will be available in the multiversioned view.
... View more
02-23-2012
03:05 AM
|
0
|
0
|
1871
|
|
POST
|
Here is an example on how to do this: import arcpy from arcpy import env env.workspace = r"C:\TEMP\Python\test.gdb" env.overwriteOutput = 1 fc1 = "River" fc2 = "New_Poyline" coordList = [] arcpy.FeatureVerticesToPoints_management(fc1, "vertices", "MID") arcpy.AddXY_management("vertices") rows = arcpy.SearchCursor("vertices") for row in rows: X = row.getValue("POINT_X") Y = row.getValue("POINT_Y") coordList.append([X, Y]) del row, rows coordList.sort() point = arcpy.Point() array = arcpy.Array() for feature in coordList: point.X = feature[0] point.Y = feature[1] array.add(point) polyline = arcpy.Polyline(array) array.removeAll() arcpy.Delete_management("vertices") arcpy.CopyFeatures_management(polyline, fc2) This will create a polyline feature class using the midpoint vertices of each River segment. It starts from the lowest mid-point and ends at the highest.
... View more
02-22-2012
08:28 AM
|
0
|
0
|
1450
|
|
POST
|
Here is an example on how I was able to add an XY event layer to an MXD (using arcpy for ArcGIS 10): import arcpy
from arcpy import env
from arcpy import mapping
env.workspace = r"C:\TEMP\Python\test.gdb"
env.overwriteOutput = 1
table = "XY"
#Make XY event layer
arcpy.MakeXYEventLayer_management(table, "X", "Y", "XY_event")
#Save XY event to a layer file
arcpy.SaveToLayerFile_management("XY_event", r"C:\temp\Python\XY_event.lyr")
#Add layer file to MXD
mxd = mapping.MapDocument(r"C:\temp\python\Airports.mxd")
for df in mapping.ListDataFrames(mxd):
lyr = mapping.Layer(r"C:\temp\python\XY_event.lyr")
mapping.AddLayer(df, lyr)
arcpy.RefreshTOC()
arcpy.RefreshActiveView()
mxd.save()
del lyr, mxd, df
... View more
02-22-2012
07:06 AM
|
0
|
0
|
838
|
|
POST
|
Hi Mike, You can use the Make XY Event Layer tool for this.
... View more
02-22-2012
05:08 AM
|
0
|
0
|
744
|
|
POST
|
You will have to declare the mxd with the 'arcpy.mapping.MapDocument' function. Try the following: path = r"C:\\"
mxdList = glob.glob(path + "\\*.mxd")
for mxd in mxdList:
mxd = arcpy.mapping.MapDocument(mxd)
for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
if elm.text == "works":
elm.text = "replaceword"
mxd.save()
del mxd
... View more
02-22-2012
03:09 AM
|
0
|
0
|
775
|
|
POST
|
Hi Mark, You will need to append the field name to the 'testFields' list. Try: testFields = []
for fields in arcpy.ListFields(masterTable):
testFields.append(fields.name)
... View more
02-17-2012
10:07 AM
|
0
|
0
|
1340
|
| Title | Kudos | Posted |
|---|---|---|
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM | |
| 1 | 01-20-2026 04:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|