POST
|
I need to recreate the functionality of the link table in the georeferencing toolbar. I have sets of ground control points (usually between 5 to 30 gcps for an image) and need the resulting RMS errors for a given transformation - there is no need to actually rectify the images. I have trouble understanding the DefineFromControlPoints Method. The documentation says. 'Defines the best affine transformation between two sets of points' but the arguments are defined as ByRef fromPoints As IPoint which I understand is one point, not a set of points. This sample (rather old, but one of the few available I found) http://edndoc.esri.com/arcobjects/9.1/ComponentHelp/esriGeometry/DefineFromControlPoints_Example.htm states pAffineTrans2D.DefineFromControlPoints 4, pPtFrom(0), pPtTo(0) which appear to be single points from a point array, so again actually only one ground control point. I am confused... So again my question: can anybody show me how to use a set of points with DefineFromControlPoints ? Any help is appreciated! Cheers Axel ByRef fromPoints As IPoint
... View more
05-12-2016
07:38 AM
|
0
|
0
|
1905
|
POST
|
Hi all, when georeferencing a raster data set the standard link table saves only coordinates. Residuals and errors are shown but are not saved in the link table. Is there a way to export a link table including RMS errors? Thanks in advance Axel
... View more
05-03-2016
05:38 AM
|
0
|
1
|
925
|
POST
|
I solved the problem by using ITopologicalOperator2 instead of ITopologicalOperator5 (ArcGIS 10.1, .Net 4.0). No idea why ESRI has to make it so difficult converting code from VBA to .Net...
... View more
10-07-2015
02:49 AM
|
0
|
0
|
543
|
POST
|
Hi there, I obviously have the same problem with code that worked in ArcGIS 9.3 but fails in 10.1. The error code looks as follows, the last line roughly translates as : 'interface not supported' There are a number of related threads (e.g. ITopological Operator, Intermittent COMException on Union ) but following their recommandations (namely to simplify the geometries) did not help as the error already occurs hwn assigning the feature to the TopologyOperator. The code where the error occurs looks like this: If pF.Shape.GeometryType = esriGeometryType.esriGeometryPolygon Then pNewPolygon = pF.ShapeCopy pTopoOp = CType(pNewPolygon, ESRI.ArcGIS.Geometry.ITopologicalOperator5) pTopoOp.IsKnownSimple_2 = False pTopoOp.Simplify() pGeoCollection.AddGeometry(pTopoOp) End If Right now there are only two polygons with 4 points each involved so size should not be an issue. Any ideas on how to solve this problem are greatly appreciated! Regards, Axel
... View more
10-05-2015
07:18 AM
|
0
|
1
|
543
|
POST
|
Right - I think of creating a new gdb at the begin of the code which will be deleted at the end of the code. Thanks again, Xander
... View more
08-28-2015
04:49 AM
|
1
|
1
|
818
|
POST
|
Hi Xander, thanks for this one - worked perfect. One additional note: I initially received an error: RuntimeError: ERROR 010240: Raster-Dataset in_memory\ras61 could not be saved in format MEM (my translation) I assumed a memory problem on my pc and changed arcpy.env.workspace = "IN_MEMORY" to my local default gdb, e.g. arcpy.env.workspace =r"W:\user\thomasa\Default.gdb" This worked but then the code appears to run somewhat slower. Thanks again, Xander, your code saves me quite some time! Best regards, Axel
... View more
08-28-2015
03:25 AM
|
1
|
3
|
818
|
POST
|
Hi Xander, perhaps the original raster I have been working with would be helpful (please see the attachment). Regards, Axel
... View more
08-27-2015
08:07 AM
|
1
|
16
|
818
|
POST
|
Hi Xander, replaced the line as you said and the code ran happily away - until polygon 60: Processing polygon: 60 4300.2_5201 Traceback (most recent call last): File "W:\hydrogeologie\Verweilzeiten\modellierung_2010\Juelich\skripte\Perzentile_aus_raster.py", line 75, in <module> x, y = pnt.X, pnt.Y AttributeError: 'NoneType' object has no attribute 'X' I guess it means that the raster is smaller than the extent of the polygon layer and the sampled pixels contain NULL values? I checked the polygon in question and as far as I can see there should be no problem - the raster contains '0' values which I would expect to be processed by the code just as any other pixel value. Up until polygon 60 the code has processed quite a number of border polygons without problem. Polygon 60 again is a two-part polygon but with your last change the code processed other polygons of this kind without problem. Do you have an idea? .
... View more
08-27-2015
07:18 AM
|
0
|
1
|
822
|
POST
|
Xander, thanks for your fast response. I have attached the complete shape file. You can find the polygon that caused the trouble by looking at the percentile fields at the end of the table and scroll down until the values change to 0. Hope that helps to fix the error. Thanks in advance and best regards Axel
... View more
08-27-2015
01:18 AM
|
0
|
21
|
822
|
POST
|
Hi Xander, I used your code to determine percentiles from a raster but ran into trouble. After encountering a multi-part polygon the code listed the polygon vertices like that [<Point (3502785.40681, 5526822.79862, #, #)>, etc.] but failed when extracting polygons: - ExtractByPolygon... Traceback (most recent call last): File "W:\hydrogeology\scripts\percentiles.py", line 87, in <module> ras_pol = arcpy.sa.ExtractByPolygon(ras, lst_parts, "INSIDE") File "E:\Programme\ARCGIS\Desktop\Desktop10.1\arcpy\arcpy\sa\Functions.py", line 1231, in ExtractByPolygon extraction_area) File "E:\Programme\ARCGIS\Desktop\Desktop10.1\arcpy\arcpy\sa\Utils.py", line 47, in swapper result = wrapper(*args, **kwargs) File "E:\Programme\ARCGIS\Desktop\Desktop10.1\arcpy\arcpy\sa\Functions.py", line 1226, in wrapper extraction_area) File "E:\Programme\ARCGIS\Desktop\Desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) RuntimeError: Object: Error in executing tool Do you have any ideas what might cause the trouble? Your help is greatly appreciated! Best regards, Axel
... View more
08-25-2015
07:59 AM
|
0
|
23
|
823
|
POST
|
Any way to modify the Z-coordinate system values would be ok for me: manually, Python, ArcObjects - we only need the information how to do it... Cheers, Axel
... View more
05-26-2015
01:06 AM
|
1
|
2
|
1859
|
POST
|
Christine, I am having the same trouble: any modifications in the adf.prj-file are not recognized by ArcHydro. My raster coordinate system is a national reference system without a Z coordinate system. Consequently the Spatial Reference Properties window does only show a XY Coordinate System tab - there are no existing Z-coordinate systems to modify according to your post. How do I add a new one? Thank you very much in advance! Axel
... View more
05-20-2015
02:42 AM
|
0
|
0
|
1859
|
POST
|
Hi, I am converting VBA code to a 10.2 addin. The code contains several context menus that are populated with IcommandBar.CreateMacroItem calling various different routines. Called with a left click from from OnMouseDown the context menus are displayed but when I select an entry from the context menu I receive the following error message: This method can only be called for built in commands (or at least how I'guess how it should be translated from my OS message). My code looks like this: Sub CreateContextMenuExample() Dim mApp As IApplication = TryCast(Me.Hook, ESRI.ArcGIS.Framework.IApplication) Dim commandBars As ESRI.ArcGIS.Framework.ICommandBars = mApp.Document.CommandBars Dim pCMenuBar As ICommandBar Dim pCmdItem As ICommandItem Dim sContextMenuName As String = "time period" Dim sPeriod() Dim sTitel As String Dim sMacroName As String Dim j As Integer sPeriod = {sContextMenuName, "period 1", "period 2"} pCMenuBar = commandBars.Create(sContextMenuName, esriCmdBarType.esriCmdBarTypeShortcutMenu) For j = 0 To UBound(sPeriod) ' sMacroName = "View.BVE.Period" & Trim(j) 'in VBA used to be "Project.ThisDocument.period" & Trim(j) sTitel = Trim(sPeriod(j)) pCmdItem = pCMenuBar.CreateMacroItem(sTitel, j, sMacroName) Next j pCMenuBar.Popup() End Sub I do not see any information in the documentation that ICommandBar.CreateMacroItem functionality has changed and works only with built in commands - and my code worked perfect in 10.0 VBA. Did I overlook something? Any help is appreciated! Cheers, Axel
Well,
it appears that CreateMacroItem only works for VBA code... I do however not see how the same functionality could be obtained with .NET code. ICommandBar.Add requires an UID while want to start my own 'macros', that is sub routines with different, specific tasks.
Any ideas on that would be extremely helpful!
Cheers,
Axel
... View more
04-02-2015
04:47 AM
|
0
|
0
|
2939
|
POST
|
Hello, I am georeferencing scanned historical maps (RGB-tif). After rectification the images show spurious nodata pixels, usually the darkest parts of inscriptions. In the original file these pixels are not tagged as nodata so somehow during the rectifying process ArcGIS 'decides' to set these pixels to nodata. I have tried different options in the rectify menu but to no avail. To make things more clear I have attached two images: original_nodata_red shows the original file with nodata set to red to demonstrate that there are no nodata pixels. In georef_nodata_null spurious nodata pixels are set to null to demonstrate how pixels have been tagged as nodata by ArcGIS in the georeferenced image. As I have to set the wedges outside of the georeferenced image to null I need to be able to set nodata pixels. Is there any explanations why this happens and of course - any idea how to prevent it? Any ideas welcome! Regards, Axel
... View more
07-10-2014
05:33 AM
|
0
|
0
|
590
|
POST
|
Hi all, I am building a terrain from more than 10 individual overlapping low-resolution point data sources. In one region a smaller high-resolution data set is available so I intend to replace the low-resolution data with this data set locally. The 'replace terrain points'-command however allows only to replace one data set by another. If I were to replace all of the low resolution data sets (which all have data points within the extent of the high-resolution data set) in this way I had to run the replace-command several times and would add the high resolution data set just as often. In the future input data (both low and high resolution data sources) will be updated rather frequently so the approach to delete low-resolution data points prior to inclusion into the terrain is not an option. Weights for input data would be a good solution but this is obviously not implemented in the terrain concept. I guess this is a problem that occurs rather frequently so perhaps anyone has some advice on how to handle it - any ideas are welcome! Axel
... View more
03-14-2013
04:30 AM
|
0
|
0
|
844
|
Title | Kudos | Posted |
---|---|---|
1 | 08-27-2015 08:07 AM | |
1 | 08-28-2015 03:25 AM | |
1 | 08-28-2015 04:49 AM | |
2 | 04-26-2019 03:12 AM | |
1 | 01-04-2019 01:38 AM |
Online Status |
Offline
|
Date Last Visited |
05-14-2024
03:39 AM
|