|
POST
|
Strange... If you had to make that change on line 16, you may as well change it on line 35 (I guess). I think the code does not account for a feature without attachment. Is that the case for you? It would be nice if I could look at a small part of the data. Kind regards, Xander
... View more
01-27-2015
08:53 AM
|
0
|
0
|
2728
|
|
POST
|
Normally I would suggest that you "close" this thread and start another. You can do this by marking the post that answered you question as the correct answer. In the other thread if necessary you could include a link to this thread. The description of this thread may not attract the correct audience. First of all when you change a coordinate system you normally project the data to another coordinate system. This is the process of changing the coordinates of the geometry by the projection and possibly a transformation. A coordinate system can have a vertical reference in meters or feet or any other unit. When projecting, the XYZ values of the geometry change, the values in the attribute table do not change. I am sure that Melita Kennedy who is really an expert in this field can provide you with a more adequate answer.
... View more
01-27-2015
08:47 AM
|
0
|
0
|
495
|
|
POST
|
Probably the easiest way would be to use the Tracking Analyst extension. ArcGIS Tracking Analyst | Features Otherwise this should be possible with some Python code.
... View more
01-27-2015
08:38 AM
|
1
|
0
|
941
|
|
POST
|
On line 12, you shoud convert the float to int to avoid the ".0": path = os.path.join(Ausgabepfad, "{0}{1}".format(int(row.getValue(fld_oid)), ext)) The other error is a bit weird (maybe that´s why I don't use the old cursor anymore...) If you have 10.1 SP1 or higher switch to the arcpy.daUpdateCursor syntax. Which would be: flds = (fld_oid, fld_out)
with arcpy.da.UpdateCursor(fc, flds) as curs:
for row in curs:
row[1] = os.path.join(Ausgabepfad, "{0}{1}".format(int(row[0]), ext))
curs.updateRow(row)
... View more
01-27-2015
08:15 AM
|
0
|
0
|
2935
|
|
POST
|
To create a unique list of values from a field inside a cursor would repeat that for every feature, while the list remains the same. If I understand correctly, you want to construct a path (string) and store that in a field. You could use this: import arcpy, os
Ausgabepfad = r"R:\Karto\Bierer2014\Datenabgabe\20150113_Brandt\raster"
fgdb = "RasterCatalog.gdb" # you're not using this
arcpy.env.workspace = os.path.join(Ausgabepfad, fgdb) # you're not using this
ext = ".jpg"
fc = os.path.join(Ausgabepfad, "Orthos_Nummern.shp")
fld_oid = "OBJECT_ID" # or: arcpy.Describe(fc).OIDFieldName
fld_out = "YourOutputFieldName" # should exist in shapefile
rows = arcpy.UpdateCursor(fc)
for row in rows:
path = os.path.join(Ausgabepfad, "{0}{1}".format(row.getValue(fld_oid), ext))
row.setValue(fld_out, path)
curs.updateRow(row)
# or if you have a version >= 10.1 SP1, you could use the arc.da.UpdateCursor
flds = (fld_oid, fld_out)
with arcpy.da.UpdateCursor(fc, flds) as curs:
for row in curs:
row[1] = os.path.join(Ausgabepfad, "{0}{1}".format(row[0], ext))
curs.updateRow(row)
... View more
01-27-2015
04:42 AM
|
0
|
2
|
2935
|
|
POST
|
Here a fgdb with the joined points (they are now outside the feature dataset, and the lines are not included).
... View more
01-26-2015
06:54 PM
|
0
|
2
|
2273
|
|
POST
|
For the point featureclasses you can use the Spatial Join to join the elevation from the closest GPS point to the features. There are a lot of GPS points around the features, but the spatial join will only pass the data of the nearest feature. In this case I didn't much variation in the elevation, so that will probably not be an issue. Add the table to the TOC, right click on the table and select Display XY data: For the feature layer that is added enter the properties, activate the Fields tab and switch off all the fields that aren't relevant (this will avoid them to be joined to your features): Just leave the one with the elevation switched on (I assume it is ProjectedZ). Next right click on the featureclasses you want to enrich with the elevation, and select Join and Relates..., and Join. Select Join data from another layer based on spatial location, select the XY events (GPS data), select each point will be given all the attributes..., specify the output and click OK. A new featureclass will be created with the elevation added and a field with the distance between the features and the GPS point from which the elevation was joined. For points this is easy, for lines you cannot do this. The GPS points are also to sparse to interpolate the elevation and create a surface (TIN). Although you could try and use that to convert the lines into 3D lines. Another possibility would be to interpolate the elevations between nodes with a GPS point close, but that would require some programming.
... View more
01-26-2015
06:53 PM
|
0
|
3
|
2273
|
|
POST
|
When creating the field the field scale sets the number of decimal places stored in a field. This parameter is only used in Float and Double data field types. ... but: If the input table is a personal or file geodatabase the field scale value will be ignored. You can change the display properties of a field. In the attribute table, right click on the field header (the name) and select "properties". Next click on the button next to Numeric: In the numeric format dialog, change the number of decimals:
... View more
01-26-2015
08:04 AM
|
0
|
1
|
13100
|
|
POST
|
Create the field: ArcObjects Help for .NET developers Next use a cursor to update the content of the field: ArcObjects Help for .NET developers : Make sure you determine the index of the field outside the loop (line 4), to avoid doing this for each feature. // Use IFeatureClass.Update to populate IFeatureCursor.
IFeatureCursor updateCursor = featureClass.Update(queryFilter, false);
int typeFieldIndex = featureClass.FindField("name");
IFeature feature = null;
try
{
while ((feature = updateCursor.NextFeature()) != null)
{
feature.set_Value(typeFieldIndex, "rome");
updateCursor.UpdateFeature(feature);
}
}
catch (COMException comExc)
{
// Handle any errors that might occur on NextFeature().
}
// If the cursor is no longer needed, release it.
Marshal.ReleaseComObject(updateCursor);
... View more
01-25-2015
03:22 PM
|
1
|
1
|
2785
|
|
POST
|
Glad to hear you like it. Don't forget to mark the threat as answered. You do this by clicking on the "Correct Answer" button of the post that answered your question. In case there were posts that were helpful, you can mark them as such using the "Helpful Yes | No" links at the bottom of each post.
... View more
01-25-2015
02:31 PM
|
1
|
0
|
1046
|
|
POST
|
You should write it in the upper part: In the part below (the interpreter) you will the any error messages or information you show with the print statement.
... View more
01-25-2015
02:18 PM
|
1
|
2
|
1046
|
|
POST
|
Your featureclass is a shapefile. Your workspace in that case is a folder.
... View more
01-25-2015
02:04 PM
|
0
|
0
|
2785
|
|
POST
|
... and if you read my answer carefully, you would have noticed that I referred to adding the field before creating the cursor...
... View more
01-25-2015
02:04 PM
|
0
|
0
|
2785
|
|
POST
|
You should first add the field and then start the cursor.
... View more
01-25-2015
12:01 PM
|
0
|
6
|
2785
|
| 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 |
4 weeks ago
|