|
POST
|
You might want to include a
env.overwriteOutput = True
as well at the beginning of your script. Good luck, Neil
... View more
03-17-2014
10:14 PM
|
0
|
0
|
1260
|
|
POST
|
Have you looked at the "Mosaic" toolset. The trend these days is to leave your imagery in its original format and location. Then build a mosaic of it in file geodb or sde. You can still make a service of it after that. Cheers, Neil
... View more
03-09-2014
11:22 PM
|
0
|
0
|
1286
|
|
POST
|
It helps to state which version of Arc you are using and what is the format of the data you are dealing with. But have to tried to recalculate the statistics on the new dataset? Cheers, Neil
... View more
03-09-2014
11:19 PM
|
0
|
0
|
590
|
|
POST
|
Bruce, Data Interop has some really clever stuff in it, but it is a little hard to get your head around. Those FME guys think totally different to you esri people! I have only used it in some relatively simple applications like translating CAD to geodb. Could you give us some examples of how this geometry comparator could be used in an etl tool? Thanks, Neil
... View more
03-04-2014
10:25 PM
|
0
|
0
|
2696
|
|
POST
|
But why not just use the .equals geometry method? Like :
if ogeom.equals(mgeom):
# do something....
http://resources.arcgis.com/en/help/main/10.2/#/Geometry/018z00000070000000/ This is a 2D comparison, ZM values are ignored (come on esri, when are these tools going to be truly 3d aware..) Cheers, Neil
... View more
03-03-2014
09:46 PM
|
0
|
0
|
2696
|
|
POST
|
Matt, will save that bit of code for later reference.... But surely the Arc way to do it is via the spatial reference of the data frame. Load the GCS data, change the df SR to web Mercator, then export the data into a new dataset, or calculate new XY field values using the coord sys of the data frame. In python using either an update or insert cursor use the .projectAs(arcpy.SpatialReference(3857)) method on the geometry object. 3857 is the WKID of the web Mercator aux sphere projection. Or just use the Project tool in the tool box. Cheers, Neil
... View more
03-03-2014
09:33 PM
|
0
|
0
|
5391
|
|
POST
|
You can, carefully, mark 3 other points on your map scaled off from your single origin. Then re-scan and use these for the GCP's to do the image GeoRef. Very do-able. Cheers, Neil
... View more
03-03-2014
09:07 PM
|
0
|
0
|
651
|
|
POST
|
I am surprised that you say you can find nothing to help you. The ArcGIS help is full of code samples. Try here http://resources.arcgis.com/en/help/main/10.2/#/ListFeatureClasses/03q300000023000000/ and http://resources.arcgis.com/en/help/main/10.2/#/ListRasters/03q30000005m000000/ and http://resources.arcgis.com/en/help/main/10.2/#/Describe/03q30000008q000000/ for starters. Lots of other stuff. Good luck.
... View more
02-24-2014
11:22 PM
|
0
|
0
|
899
|
|
POST
|
When creating features, it is important to specify the coordinate system. The WKID of GDA_1994 is 4283. So add this at the top of your script
SR = arcpy.SpatialReference(4283)
Then when you create the points and the polygon geometries, specify the SR as well.
ptGeoms.append(arcpy.PointGeometry(pt4, SR))
....
array = arcpy.Array([pt1,pt2,pt3,pt4,pt1])
polygon = arcpy.Polygon(array, SR)
featureList.append(polygon)
That fixed it for me. Cheers, Neil
... View more
02-20-2014
09:18 PM
|
0
|
0
|
1278
|
|
POST
|
You might consider just calculating a new centre X & Y for your new cell size like :
CentX = int(X / NewCellSize) * NewCellSize + NewCellSize / 2
ditto for the Y. Then you could summarise your data across these new XY's. Get the average of all the input points or something. Good luck, Neil
... View more
02-19-2014
08:21 PM
|
0
|
0
|
2410
|
|
POST
|
I have 10.2 and recently used the GeoRef toolbar. No issues from me. Been using it for years and it is one of the most together tools in the toolbox. Have to you tried it with other image format types, jpg perhaps or stuff in a fgdb? I usually turn off the Auto Adjust option until I have put in my GCP's. I don't like it when the image jumps around while I'm busy. Then open up the link table then click on auto adjust. But is sounds like you know all that anyway. Is there perhaps some issue with file permissions on the tiffs, that it can update some part but not another so the georeffing is getting all confussed. Not much help, I know. Good luck, Neil
... View more
02-19-2014
08:10 PM
|
0
|
0
|
8891
|
|
POST
|
Thanks Jake, I realize that .centroid would also work. But I still think that the help could be a little less misleading. Got my script to work by using .getPart() Cheers, Neil
... View more
02-13-2014
11:05 PM
|
0
|
0
|
1394
|
|
POST
|
Sorry Kim, I know exactly what NTv2 and datum transforms is about. I thought you were referring to some method to actually create a NTv2 gsb file for your control points. Or some other method to handle this. The only way now is some pretty deep C stuff. Thanks anyway, Neil
... View more
02-13-2014
10:41 AM
|
0
|
0
|
1715
|
|
POST
|
I have used this stuff before but this afternoon (because of my fading brain) I got stuck again. This page says that using point geometry objects, you can access the X,Y,Z like this: http://resources.arcgis.com/en/help/main/10.2/index.html#//002z0000001t000000
for row in arcpy.da.SearchCursor(infc, ["OID@", "SHAPE@"]):
# Print the current multipoint's ID
#
print("Feature {0}:".format(row[0]))
# For each point in the multipoint feature,
# print the x,y coordinates
for pnt in row[1]:
print("{0}, {1}".format(pnt.X, pnt.Y))
If you do this, all you get is this :
>>> geom1
<PointGeometry object at 0x128e50d0[0x128e51c0]>
>>> geom1.type
u'point'
>>> geom1.X
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
geom1.X
AttributeError: 'PointGeometry' object has no attribute 'X'
>>>
This had me stuck for about an hour until, from somewhere in my aging cortex, I remembered you had to do this :
>>> geom1.type
u'point'
>>> geom1.getPart().X
37.85577369550394
>>> geom1.getPart().Y
-5.721226269422574
>>> geom1.getPart().Z
633.8880000000063
>>>
Oh, and if you try to iterate over a geometry object like in the help, that fails as well.
>>> for p in geom1:
print p.getPart().X
Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
for p in geom1:
TypeError: 'PointGeometry' object is not iterable
>>>
Dear esri, when is either the attributes of the geometry going to get fixed, or the help files when you want to actually do this stuff? Thanks, Neil
... View more
02-13-2014
10:22 AM
|
0
|
3
|
2588
|
|
POST
|
Kim, The solution was to create a transform grid using the NTv2 tools and run a pseudo-projection by defining a custom projection. What are these "NTv2 tools" and where do I find them? Thanks in advance, Neil
... View more
02-12-2014
09:26 PM
|
0
|
0
|
1715
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-08-2015 11:28 PM | |
| 1 | 12-20-2013 08:59 PM | |
| 1 | 05-14-2014 10:38 PM | |
| 1 | 12-16-2013 09:05 PM | |
| 1 | 05-31-2019 02:50 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|