|
POST
|
I think you can mark your own reply as correct if it includes the full solution from various sources and the correct attribution is given to the original authors. Anyone else who stumbles upon this thread with a similar issue would want quick access to the final solution, not just which one helped the most in getting there. Ideally the reply marked as correct would have all of these things.
... View more
04-07-2015
03:49 PM
|
1
|
2
|
1312
|
|
POST
|
After working with Esri support (thanks Jing!) I have some more information to share. To add a new entry to ST_SPATIAL_REFERENCE Table, you can create or import a feature class with the spatial reference you wanted to the geodatabase. Make sure you use ST_Geometry as the Configuration Keyword. By default, if you choose Default as the Configuration Keyword, it will create a ST_Geometry type feature class. If you know a feature class that is using the desired SRID, you can import this feature class to your 10.0 geodatabase, there will be a new record account for this SRID in the ST_SPATIAL_REFERENCE Table. If you want to create a feature class to generate the desired SRID, you can following the following steps For example the SRID you wanted is 4152, you can run "select * from ST_COORDINATE_SYSTEMS where id=4152;" in Oracle. The returned Type field is Geographic, so when we select the coordinate system for our new feature class, you will go to Geographic Coordinate Systems. The Description Colum will give us a clue on where to find this coordinate system. In ArcCatalog, right click on the database connection > New > Feature class > Provide Name, then click Next > Expand Geographic Coordinate Sytems, Then North America, select NAD 1983 HARN, then click Next > Next > Select Default as the Configuration Keyword, click Next > Finish Check ST_SPATIAL_REFERENCE Table, you will see a new record show up in there. Feel free to delete the feature class. Delete the feature class will not delete the record in the ST_SPATIAL_REFERENCE Table This worked in ArcSDE 10.0 but I haven't tested anything else. I'm assuming from looking at the documentation that it works the same. The big thing to keep in mind here is that SRID is just an arbitrary number for that row in the ST_Spatial_References table. It means nothing outside of that table. The SRID doesn't have to be the same as the CS_ID. So when we upgrade to 10.2.2, we will have to remember to check the SRIDs in the table to see if they changed and alter our SQL views accordingly. I followed the steps to create a new feature class in SDE with the coordinate system I wanted (GCS_North_American_1983_HARN - 4152). Our final SQL for 10.0 uses 57 for SRID, which only applies to our particular SDE database. SELECT EID,
ST_X(sde.st_transform(SHAPE, 57)) as LONGITUDE,
ST_Y(sde.st_transform(SHAPE, 57)) as LATITUDE
FROM LIS.ADDRESS_PNT;
... View more
04-07-2015
03:35 PM
|
1
|
0
|
1243
|
|
DOC
|
This is the first thing I've seen about multithreaded processing with Python. Thanks for the post!
... View more
04-03-2015
01:19 PM
|
1
|
0
|
12242
|
|
POST
|
ArcGIS REST API - Remove User ArcGIS for Server (Windows) - Scripting with the ArcGIS REST API Sorry, I haven't done this before so getting the info is as much as I know. Anything more and I'm learning right with you. Here's some other useful information I've found... ArcGIS Server Administration Toolkit - 10.1+ arcpy/AdministeringArcGISServerwithPython_DS2014 · GitHub
... View more
04-03-2015
09:49 AM
|
3
|
4
|
1885
|
|
POST
|
I think your workspace has to be a geodatabase, not an MXD. Also, the point variable is the name your input feature class (not a the layer name from an MXD). EDIT You may also need to change the strings in the if statement from "True" to "TRUE" and "False" to "FALSE" so it matches your data.
... View more
04-03-2015
09:36 AM
|
2
|
0
|
1344
|
|
POST
|
for row in cursor:
if row[1] == 'True':
x = row[0]
elif row[1] == 'False':
list.append(x) Wouldn't that only get the last row that is TRUE? x gets replaced each time it's true and only gets appended to list when it finds a FALSE. Seems like you'd have to do something like for row in cursor:
if row[1] == 'True':
list.append(row[0])
elif row[1] == 'False':
break
... View more
04-03-2015
08:45 AM
|
2
|
13
|
2466
|
|
POST
|
That's not reliable because you cannot guarantee the order in which the rows are returned. Could you describe in more detail why you only want to copy rows until it finds a FALSE?
... View more
04-03-2015
08:32 AM
|
1
|
1
|
2466
|
|
POST
|
There is a lot of little things wrong with your code. Before I try creating new code, I have a question. It looks like you have a second condition you are using to filter your table, could you please describe that? Right now I see the only thing you check is that the Condition field is equal to "TRUE". What criteria did you use to eliminate FID 4 and 5?
... View more
04-03-2015
08:21 AM
|
2
|
3
|
2466
|
|
POST
|
I didn't realize this is was something that Esri designed. Thanks for the clarification.
... View more
04-03-2015
07:51 AM
|
0
|
0
|
997
|
|
POST
|
I don't know if I follow exactly what you're getting at here, but I think you need to actually return something from your method; probably parameters. Right now your changing the .enabled and .value attributes of parameters[1], but those changes are only in the local variables for the method, they don't go anywhere. Try this at the end. return parameters Then I'm assuming you use parameters as input for some other process or method, in which case it should have the new properties you set in updateParameters(). Thank you, Adam Cox, for the clarification.
... View more
04-02-2015
04:41 PM
|
0
|
2
|
997
|
|
POST
|
I try to use the r string prefix with path names so it escapes the backslashes. mypath = r"C:\temp\myfile.mxd" Or you can construct file paths with os.path mydrive = "c:"
myfolder = "temp"
myfile = "mapdoc.mxd"
mypath = os.path.join(mydrive, myfolder, myfile)
... View more
04-02-2015
11:47 AM
|
3
|
1
|
1909
|
|
POST
|
Glad you got it working. Is there a database trigger set up on any of the tables? That could slow down the processing with lots of activity. You could also try scripting your process with Python (like you originally mentioned) using Calculate Field. Python might be able to power through because there is no UI (ArcMap) involved. Still might have to wait for everyone to stop editing the version though. May also be worth investigating using different versions for everyone; that's what they're there for.
... View more
04-02-2015
11:39 AM
|
1
|
0
|
1133
|
|
POST
|
Doh! Yes, ST_X and ST_Y works. SELECT EID,
ST_X(sde.st_transform(SHAPE, 4152)) as LONGITUDE,
ST_Y(sde.st_transform(SHAPE, 4152)) as LATITUDE
FROM LIS.ADDRESS_PNT; I'll see about getting our funked up spatial references table fixed. Thanks Joshua!
... View more
04-01-2015
03:39 PM
|
0
|
0
|
6235
|
|
POST
|
SRID 4152 was the ticket! However, it only works in 10.2.2 SDE. When I run the same query in 10.0 it errors because it can't find the SRID in the spatial references table. Follow-up questions: Any idea on the best way to update/refresh the spatial references table in SDE so it has the right SRIDs? Do you know if there is a way to calculate latitude and longitude as separate fields instead of the CLOB returned from ST_AsText?
... View more
04-01-2015
02:03 PM
|
0
|
2
|
4992
|
|
POST
|
I just checked in our development instance of SDE that we upgraded to 10.2.2 and the SDE.ST_Spatial_References table is different. It actually has SRIDs that match the expected numbers like 4269 and 4326, but it also has the other "off" numbers like 0 and 48. SRID 6152 is not in there at all. I tried running the same query on the Dev 10.2.2 SDE database and I got it to work but the coordinates still seem wrong (there's no negative).
... View more
04-01-2015
11:42 AM
|
0
|
4
|
4992
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-01-2025 06:19 AM | |
| 1 | 07-31-2025 11:59 AM | |
| 1 | 07-31-2025 09:12 AM | |
| 2 | 06-18-2025 03:00 PM | |
| 1 | 06-18-2025 02:50 PM |