POST
|
You can register a feature class via command line using the 'sdetable -o alter_reg' command with the '-V MULTI' option. Ex:
sdetable -o alter_reg -t building -V MULTI -i sde:sqlserver:esri -D vector -u vector -p **** You could also register a feature class as versioned using python. Ex: import arcpy
from arcpy import env
env.workspace = r"Database Connections\SQL.sde"
fc = "Parcels"
arcpy.RegisterAsVersioned_management(fc)
... View more
05-04-2011
11:20 AM
|
0
|
0
|
507
|
POST
|
Here is an example on how you can sum the Area field into a new field (SUM_Area). From there you can calculate the percentage. list = []
lstRasters = arcpy.ListRasters("*")
for raster in lstRasters:
rows = arcpy.SearchCursor(raster)
for row in rows:
list.append(row.Area)
S = sum(list)
arcpy.CalculateField_management(raster, "SUM_Area", S)
list = []
del row, rows
... View more
05-04-2011
04:40 AM
|
0
|
0
|
381
|
POST
|
The code above is attempting to multiply two strings together. I believe that is why you are receiving the error. When multiplying rasters, try using the spatial analyst Times function. This will successfully multiply two rasters together.
... View more
05-04-2011
03:56 AM
|
0
|
0
|
1290
|
POST
|
After running the Build Raster Attribute Table tool, the attribute table of the raster will contain a field called Value representing the pixel value, and a field called Count representing how many pixels of that Value. You can then use the following code to write these value to an output text file: lstRasters = arcpy.ListRasters("*")
logfile = open(r"c:\temp\pixels.txt", "w")
for raster in lstRasters:
rows = arcpy.SearchCursor(raster)
for row in rows:
logfile.write("Value of " + str(row.value) + " = " + str(row.count) + " pixels" + "\n")
logfile.close()
... View more
05-03-2011
12:48 PM
|
0
|
0
|
406
|
POST
|
I ran a test with this scenario. I created a two-way replica from one sql server database to another. I added the child geodatabase feature class to ArcMap, added a join, updated a field based off of the join, did not remove the join, and then executed the 'Export Data Changes Message' tool from the Distributed Geodatabase toolbar. I was able to successfully create the XML file and import this into parent geodatabase. So, the join/relate should not be affecting the replica. What is the error message you are receiving?
... View more
05-03-2011
06:30 AM
|
0
|
0
|
225
|
POST
|
What service pack are you running for SQL Server 2005? You can run the following query to find out: SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
... View more
05-03-2011
05:58 AM
|
0
|
0
|
1740
|
POST
|
Try building pyramids using a direct connection. You will just need to replace '-i' with 'sde:sqlserver:<server name>. Also, make sure you are attempting to build pyramids with the raster dataset owner (GIS_ADMIN). I would also specify '-1' for the -L option. This will build all necessary pyramid levels. Ex: sderaster -o pyramid -l HRES_COLOR_MRSID_MOSAIC_2010,RASTER -v 1 -L -1 -I bilinear -D RASTER -i sde:sqlserver:<server name> -u GIS_ADMIN -p *****
... View more
05-02-2011
11:52 AM
|
0
|
0
|
1740
|
POST
|
What is the command line syntax you are using when you attempt to build pyramids? Are you using an application server connection (ie 5151) or a direct connection?
... View more
05-02-2011
10:42 AM
|
0
|
0
|
1740
|
POST
|
Not the most elegant way, but I got the below code working. Could be cleaned up a bit. rows = arcpy.UpdateCursor(input)
for row in rows:
Xcoord = str(row.X)
Xcoord2 = Xcoord.split(".")
XDegrees = Xcoord2[0]
Xcoord3 = float("." + Xcoord2[1])
Xcoord4 = Xcoord3 * 60
Xcoord5 = str(Xcoord4)
Xcoord6 = Xcoord5.split(".")
XMinutes = Xcoord6[0]
Xcoord7 = float("." + Xcoord6[1])
Xcoord8 = Xcoord7 * 60
Xcoord9 = str(Xcoord8)
XSeconds = Xcoord9
DMS = XDegrees + " " + XMinutes + "' " + XSeconds + "''"
row.Lat = DMS
rows.updateRow(row)
del row, rows You can duplicate the code and run it for the Longitude value.
... View more
04-29-2011
04:47 AM
|
0
|
0
|
6654
|
POST
|
Pyramids will consume approximately 1/3 of the raster dataset size. If this raster dataset is 24 GBs, you're looking at another 7.2 GBs in storage you'll need. I would recommend running the 'sp_spaceused' command in SQL Server Management Studio to see how much unallocated space is available. If the tool is still executing, re-execute this query a couple times and see if the unallocated space is shrinking. If it is, this means pyramids are still being generated. If it is not, it may be your log file is full. You can check this by executing one of the queries below: EXEC sp_helpdb RASTER DBCC SQLPERF(logspace)
... View more
04-28-2011
09:40 AM
|
0
|
0
|
1740
|
POST
|
What type of database are you using (ie SQL Server 2005, Oracle 10.2.0.3)?
... View more
04-28-2011
09:20 AM
|
0
|
0
|
1740
|
POST
|
Try the following: import arcgisscripting
gp = arcgisscripting.create(9.3)
input = "<shapefile>"
rows = gp.UpdateCursor(input)
row = rows.Next()
while row:
TimeList = row.Start_Time.split(":")
row.Hour = TimeList[0]
rows.UpdateRow(row)
row = rows.Next()
del row, rows
... View more
04-28-2011
07:52 AM
|
0
|
0
|
583
|
POST
|
Here is the code I got to work at 10. You should be able to replace 'arcpy' with 'gp' and this should work at 9.3. input = "<table/feature class>"
rows = arcpy.UpdateCursor(input)
for row in rows:
TimeList = row.Start_Time.split(":")
row.Hour = TimeList[0]
rows.updateRow(row)
del row, rows
... View more
04-28-2011
07:07 AM
|
0
|
0
|
583
|
POST
|
Here is an example on how to do this. You will need to replace 'arcpy' with 'gp'. input = "<table/feature class>"
rows = arcpy.SearchCursor(input)
for row in rows:
TimeList = row.Start_Time.split(":")
rows2 = arcpy.UpdateCursor(input)
for row2 in rows2:
row2.Hour = TimeList[0]
rows2.updateRow(row2) The field 'Hour' is of type Text.
... View more
04-28-2011
06:25 AM
|
0
|
0
|
583
|
POST
|
Geocoding results are not dynamic since the output is a feature class. The only type of outputs that are dynamic in this matter are event layers. You will need to re-geocode the addresses after the updates have been applied and overwrite the feature class. I would recommend running a script to do this at a given time(s) during the day.
... View more
04-27-2011
10:26 AM
|
0
|
0
|
271
|
Title | Kudos | Posted |
---|---|---|
1 | Tuesday | |
1 | Monday | |
1 | Monday | |
3 | 12-15-2020 04:55 PM | |
6 | 04-26-2024 10:15 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|